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

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)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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  

  • cloflyMao Profile Picture
    25,210 on at

    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

  • Community Member Profile Picture
    on at

    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

    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

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans