Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Maximum number of traversal leaves has been exceeded.

(4) ShareShare
ReportReport
Posted on by 43
Hi, marketing team say they cannot add anymore attributes to any segment they have created because of the following issue:
 

Maximum number of traversal leaves has been exceeded. Further traversal will lead to thousands of possible paths.
 
 
There have been no changes or tables added to Customer Insight- Journeys that I know of. Can anyone provide guidance as to how to resolve? It is currently only impacting one environment.
 
Thanks.
  • MA-01051425-0 Profile Picture
    43 on at
    Maximum number of traversal leaves has been exceeded.
    @ thank you kindly for the detailed advice we did carry this out and we created a simple segment based on one segment and knowing the exact number of members but received the same error.
     
    Microsoft applied a fix (unsure if this is a workaround or actual fix) and the problem has not reoccurred.  As of today, we haven't received and further issues.
     
    Thanks for your help Vahid Ghafarpour.
  • Vahid Ghafarpour Profile Picture
    9,768 Super User 2025 Season 1 on at
    Maximum number of traversal leaves has been exceeded.
    If any of the responses helped resolve your issue, please take a moment to mark the best answer. This helps others in the community quickly find solutions to similar problems.

    To do this, simply click the "Does this answer your question?" button on the most helpful response and like the helpful posts. If your issue is still unresolved, feel free to provide more details so the community can assist further!

    Thanks for being an active part of the Dynamics 365 Community! 😊
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    6,651 Super User 2025 Season 1 on at
    Maximum number of traversal leaves has been exceeded.
    Hello MA-01051425-0,
     

    The error message "Maximum number of traversal leaves has been exceeded. Further traversal will lead to thousands of possible paths" in Dynamics 365 Customer Insights - Journeys (formerly Marketing) indicates that your segment query has become too complex. Specifically, it's hitting a limit on the number of related entities (traversal leaves) that can be included in a single segment query.

    Here's a breakdown of the problem and how to resolve it:

    Understanding the Problem:

    • Traversal Leaves: In segment queries, "traversal leaves" refer to the related entities you're referencing through relationships. For example, if you're querying Contacts and then adding criteria based on their related Accounts, the Accounts are traversal leaves.

    • Complexity Limit: Dynamics 365 Customer Insights - Journeys imposes a limit on the number of traversal leaves to prevent excessively complex queries that could impact performance.

    • Thousands of Paths: The error indicates that adding more attributes would lead to a massive number of possible query paths, which the system is designed to avoid.

    • Environment Specific: The fact that it's only affecting one environment suggests that the problem is related to the specific data or segment configurations within that environment.

    •  

    Troubleshooting and Solutions:

    1. Simplify Segment Queries:

      • Review Segment Logic: Carefully examine the segment queries causing the issue. Look for opportunities to simplify the logic.

      • Reduce Related Entities: Minimize the number of related entities referenced in the queries.

      • Consolidate Criteria: Combine multiple criteria into fewer, more efficient expressions.

      • Use Static Segments (Where Appropriate): If the segment membership doesn't change frequently, consider using a static segment instead of a dynamic one.

      • Break Down Complex Segments: If you have exceptionally complex segments, break them down into smaller, more manageable segments and combine the results using compound segments. 

    2. Optimize Relationships:

      • Relationship Cardinality: Ensure that the relationships between entities are correctly defined (1:N, N:N).

      • Relationship Performance: Check for any performance issues related to the relationships used in the segment queries. 

    3. Data Cleanup:

      • Data Duplication: Excessive data duplication can increase the complexity of segment queries.

      • Orphaned Records: Orphaned records (records with missing related records) can also contribute to query complexity.

      • Data Consistency: Ensure that data is consistent and accurate. 

    4. Check for Recent Changes:

       

      • Recent Customizations: Even if you haven't added tables, recent customizations to entities or relationships could have introduced the problem.

      • Data Imports: Large data imports can sometimes lead to data inconsistencies that affect segment performance.

      • Solution Deployments: Check if any solutions have been deployed recently that might have changed the data model.

    5. Microsoft Support:

      • Contact Support: If you've tried these troubleshooting steps and the problem persists, contact Microsoft Support. They have access to more detailed logs and diagnostic tools.

      • Provide Environment Details: Be prepared to provide detailed information about your environment, including the segment queries causing the issue. 

    6. Segment Performance Analysis:

       

      • If possible, use the segment performance analysis tools provided by dynamics 365. This may give you some insight into what is causing the long traversal paths.


      •  

    Important Considerations:

    • Performance Impact: Complex segment queries can significantly impact the performance of Dynamics 365 Customer Insights - Journeys.

    • Data Volume: The volume of data in your environment can also contribute to the complexity of segment queries.

    • Segment Design Best Practices: Follow segment design best practices to ensure optimal performance.

    •  

    By systematically reviewing your segment queries and optimizing your data model, you should be able to resolve the "Maximum number of traversal leaves" error and enable your marketing team to add attributes to their segments.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Verified answer
    MA-01051425-0 Profile Picture
    43 on at
    Maximum number of traversal leaves has been exceeded.
    Ok for those experiencing similar issues, I believe Microsoft are working on fixing the issue: 
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,310 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans