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

Creating dynamics email with each logic

(0) ShareShare
ReportReport
Posted on by 205

Hello, 

I have a campaign targeting the customer who requests a quote for all products but one. here is my segment

pastedimage1628770643338v1.png

I like to send them an email with a Quote ID related to the Quote that makes them eligible to be part of the journey. 

can you help me to write if the condition that would look at the order line and check that product ID is not equal to the specific product? 

Also, is there any way that I can have if condition that targets the quotes created 7 days ago?

Here is what I have so far for loop, 


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

<p>{{this.quotenumber}}</p>

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

Many Thanks,

Elly

I have the same question (0)
  • Verified answer
    Nya Profile Picture
    29,060 on at

    Hi Elly,

    I’m not sure which one you specifically want to modify, the Code Block or the Dynamic Segment?

    I assume that you’d like to modify the code block:

    If you’d like to show all the quotes related to the contact, it should be:

      {{#each contact.quote_contact_customerid}}
    • name:{{this.quotenumber}}
    • {{/each}}
     

    However, the createdon field cannot be used in the code block as a condition to determine if it was created 7 days ago.

    So you can create two custom fields in Quote entity. One’s data type is Date and Time and field type is Calculated to record today’s date. The other’s data type is Two options and field type is Calculated to record if it is created 7 days ago.

     

    Then you can use the field “Is Seven Days Ago” in the HTML designer of the email. 

    Here is the related documentation:

    Conditional statements and comparisons

     

    And since Order Line entity is not related to Contact directly, it cannot be shown with the above way. The system only supports two levels of the relationship but the information you want to get is the third level of a relationship.

    Here is an idea for this issue:

    Microsoft Idea · Content Assist deeper than 2 levels/hops (dynamics.com)

    You can also submit your proposal on Idea forum to prompt it to be improved faster.

  • Elly-Farokhi Profile Picture
    205 on at

    Thank you Nya

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 197 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans