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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Abandon Cart Email - Show Last Web Order

(0) ShareShare
ReportReport
Posted on by 50

Hi,

I have created a Marketing Email containing Dynamic Content which represents Web Order related to each Contact record.

Example. If a contact leaves their shopping cart online an email will be triggered from Dynamics Marketing. The email will then contain a link to their cart. 

Currently, the email lists all Web Order records related to a Contact but I only want to show the most recent one. What do I need to add to my function to solve this? 

Below you can see how it is currently set up: 

{{#each contact.orkla_weborder_contact_orkla_consumerid}}

{{#if (eq this.orkla_status 'Abandoned Basket')}}

{{this.orkla_link}}

{{/if}}

{{/each}}

Thanks in advance!

Br, Joakim

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,060 on at
    RE: Abandon Cart Email - Show Last Web Order

    Hi Joakim,

    It is recommended to create a custom field whose data type is Lookup in Contact entity. It can ensure a 1: N relationship between Web Order and Contact entity.

     pastedimage1622513846150v1.png

    When a Web Order is being related to a contact (the contact of the web order changed), update the field with a workflow or flow.

    pastedimage1622513925973v3.png

    pastedimage1622513966322v6.png

    pastedimage1622513948939v4.png

    After setting these above, you can insert the record with Content assist instead of Code block.

     pastedimage1622513977072v7.png

    It allows to insert the most recent record of Web Order.

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • Joakim Gunstad Profile Picture
    50 on at
    RE: Abandon Cart Email - Show Last Web Order

    Thanks for your reply, Nya.

    With your suggestion, how will we be able to only identify those orders with status = Abandoned Cart?

    What we need to display in the email is the actual link that goes to the shopping cart. We don't simply want to show the GUID or ID of the most recent order.

    Example:

    On the Web Order table there are two columns of interest: link & status.

    If a contact has a related web order and the status = abandon cart, then the cart url in on the link column should be displayed in the marketing email.

    I am not too sure if that is possible to do with your suggestion by simply using assist edit?

  • Suggested answer
    Nya Profile Picture
    29,060 on at
    RE: Abandon Cart Email - Show Last Web Order

    Hi,

    To show the link of the order, you can set the Content assist as the following way

     pastedimage1622613239299v2.png

    To filter the order with certain status, you can add a condition in the workflow:

     pastedimage1622613235932v1.png

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • Joakim Gunstad Profile Picture
    50 on at
    RE: Abandon Cart Email - Show Last Web Order

    Hi Nya.

    Thanks for the suggestion, I will definitively look in to this.

    However, would it be possible to simply add a {{return false}} parameter into the code to break the loop?

    I haven't worked out how to properly add it to the code as I am getting some syntax errors.

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

Responsible AI policies

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

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 195 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 117

#3
Pallavi Phade Profile Picture

Pallavi Phade 68

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans