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

Notifications

Announcements

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)
  • 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

  • Suggested answer
    Steve Zhao2 Profile Picture
    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, 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>

  • Verified answer
    Steve Zhao2 Profile Picture
    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.

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 94

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 69 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans