web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

limitation on personalization email / iteration

(0) ShareShare
ReportReport
Posted on by 386

Hi

I try to describe below a limitation if you know a workaround (posted this on a different topic as well)

We're using segment query to filter data

in the marketing email we have iteration as below:

<p>You have purchased:</p>
<ul>
<!-- {{#each contact.contact_product_productid}} -->
<li>{{this.name}}</li>
<!-- {{/each}} -->
</ul>

This displays ALL DATA regardless of segment query (which is a subset of records)

What is a solution as I mark this as big limitation on the personalisation as a D365 feature

kind regards

I have the same question (0)
  • Verified answer
    Steve Zhao2 Profile Picture
    Microsoft Employee on at

    Hi slx,

    The segment query is used to get the list of contacts who you want to send Marketing emails to. And the personalization code you provide would list the products contact purchased.

    Only those contacts as a member of segment would receive this marketing email, other contacts would not. So, I am not clear what does “This displays ALL DATA regardless of segment query” mean.

  • slx Profile Picture
    386 on at

    Thank you, trying to give more updates

    scenario

    - segment query to extract all contacts that have product type = X and many other conditions (as query builder is not limited to depth 2 relationships)

    - the same contact can have different other product types Y, Z etc

    Segment is created for contacts that fullfil the conditions which creates a sub-collection of contact records

    When marketing email is created the code below will display all products associated with the contacts, not the actual results for the query (as the query cannot be replicated below):

    <p>You have purchased:</p>

    <ul>

    <!-- {{#each contact.contact_product_productid}} -->

    <li>{{this.name}}</li>

    <!-- {{/each}} -->

    </ul>

  • Suggested answer
    Steve Zhao2 Profile Picture
    Microsoft Employee on at

    Hi slx wrote,

    I got you. Yes, the personalization code displays ALL DATA regardless of segment query. (You would also get product types Y, Z)

    But I think, this is a normal behavior. The segment query is only used to filter the contacts. It would not affect personalization code result.

    So, what you need to do is to modify your code like this:

    <p>You have purchased:</p>

    <ul>

     {{#each contact.contact_product_productid}} 

    {{#if (eq this.productType 'X')}}

    <li>{{this.name}}</li>

    {{/if}}

    {{/each}} 

    </ul>

  • slx Profile Picture
    386 on at

    Thank you, you are right for this example.

    But segment query block allows more advanced query than the personalisation email conditions that can be hardcoded in the html/javascript body

    (example depth 2 on relationship query which is not a restriction for query block)

    Kind regards,

    slx

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 120 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans