Skip to main content

Notifications

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

  • slx Profile Picture
    slx 386 on at
    RE: limitation on personalization email / iteration

    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
    Steve Zhao2 on at
    RE: limitation on personalization email / iteration

    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
    slx 386 on at
    RE: limitation on personalization email / iteration

    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
    Steve Zhao2 on at
    RE: limitation on personalization email / iteration

    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

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans