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,...
Answered

Send coupon code to marketing segment

(0) ShareShare
ReportReport
Posted on by

Hi.

I have some discount codes (coupons) that I need to send to a Marketing Segment. An external provider already generated coupon codes and sent them to me. I have created a custom entity 'coupons' where the codes are stored.

I need a way to do the following:

  • Create a Marketing Email targeted to the segment (I know how to do that)
  • Have Dynamics 'pick' a coupon code from the coupon entity and associate it with the email

For example, assuming coupons are numbered 1, 2, 3, etc, I need Dynamics to send an email John and offer cupon code 1, send the next email to Peter and offer coupon code 2, etc. Each coupon code should be used in one email only, and I'd like to know which customer was offered which coupon code.

I hope the explanation is clear, otherwise let me know.

Regards,

Guillermo.-

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at
    RE: Send coupon code to marketing segment

    Hi Guillermo,

    When Contact entity is added as the source entity of lookup field of Coupon entity, then the association/relationship between them will be automatically created.

    Regards,

    Clofly

  • Community Member Profile Picture
    on at
    RE: Send coupon code to marketing segment

    Hi Clofly.

    Thanks for your reply and apologies for not coming back to you earlier.

    I am rushing to launch a campaign tomorrow, and do not have the time to test what you suggested me. I tried briefly to do it but found I don't have the requiered permission. However it looks promising. I will resume next week.

    However there is doubt that I still have and perhaps you can help me:

    In the solution you propose, is it required for the coupons to be associated with the contacts "beforehand" (i.e. using the relationship 1:N) or the solution dynamically assigns each contact the next unused coupon?

    Thanks again. Regards,

    Guillermo.-

  • cloflyMao Profile Picture
    25,210 on at
    RE: Send coupon code to marketing segment

    Hi Guillermo,

    Please let me know whether you still have any doubt on this topic.

    Regards,

    Clofly

    Please kindly mark as verified if you had found any answer helped, it would be really appreciated.

    12.JPG

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at
    RE: Send coupon code to marketing segment

    Hi Guillermo,

    Firstly you should sync Coupon entity with the marketing-insights service with tutorial below, then the entity will be available in assist-edit tool.

    https://docs.microsoft.com/en-us/dynamics365/marketing/mkt-settings-sync

    Secondly,  based on your business requirement, what is the relationship between Contact entity and Coupon entity? 

    Because from what you described, it seems that different contacts will receive different coupon code, so I guess the relationship(Contact <-> Coupon) would be 1:N.

    Then you could list all coupon codes of current contact with expression below:(a coupon code might be associated with specific contact and campaign)

    Hi {{contact.firstname}}, here is your coupon code: 
    
    {{#each contact.relationshipname}}
    
        {{#if (eq this.new_campaign_name 'xxx')  }}
        
            {{this.new_couponcode}}
        
        {{/if}}
    
    {{/each}}

    This section introduced how to add advanced dynamic expression in marketing email:

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#advanced-dynamic-content

    Regards,

    Clofly  

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
DAnny3211 Profile Picture

DAnny3211 134

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 115

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans