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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Send vouchers to contacts based on a dynamic segment

(0) ShareShare
ReportReport
Posted on by 905

Hello everyone,

I have created a voucher table that has a relationship with the contact entity of N:1 (Multiple vouchers can be assigned to a single contact). Please correct me if the relationship type is wrong.

The voucher table has the following sample data:

Title: Voucher A, Expiry date: 1/31/2022

The scenario I need to achieve:

  1. I want to send a voucher for a targeted segment that has today's birthdays of our contacts in an Marketing email, and the voucher must be valid by date and not expired.
  2. I would like to know the logs of the vouchers that have been sent to all contacts previously.

For example, if we sent voucher A to a customer on 1/12/2022 and the following year 1/12/2023 we sent them another voucher (voucher B), I want a simple grid in the contact table that shows me these logs.

       3. For logs, do I need to have a separate table between vouchers and contacts for transactions to get the necessary logs? Or is there an OOB feature that already does this? If not, how can I feed the contacts with this data to show the previous vouchers were sent to a specific contact?

I saw a great post that is very similar to my case Send coupon code. However, I still need guidance on the above requirements and would greatly appreciate it if you could provide a useful example or resource that shows how to implement something similar to this case.

Any help is most welcome.

Thank you!

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

    Hi,

    If you have created the relationship, you need to add the entity into Dataset configuration in Settings > Data management > Dataset configuration.

     Image

    As I haven’t created the relationship, I'll use Lead as an example, which also have an N: 1 relationship with Contact.

    Refer to the following section to add a code block into the email.

    Add dynamic content to email messages (Dynamics 365 Marketing) | Microsoft Docs

     Image

    The code is something like:

    Your leads:

      {{#each contact.lead_contact_parentcontactid}}
    • name:{{this.fullname}} topic:{{this.subject}}
    • {{/each}}

    It will get a list of the leads with their names and topics which belongs to each contact.

    Image

    And if you'd like to show the grid of the related vouchers in the Contact form, it can be just shown as a sub grid as there is an N:1 relationship.

    You can add a date field to record the date and time when the vouchers are assigned to the contact.

    I don't think it is necessary to create a separate table.

  • EBMRay Profile Picture
    905 on at

    Hi Nya ,

    Thank you very much for providing all of these details, I will follow the steps mentioned give it a try and get back to you.

    Regarding the grid that will show the related vouchers of contact, I have the below concerns:

    1. How are the vouchers attached to a specific contact in a grid? Is this done automatically whenever we send the marketing email based on the expression mentioned or does this step should be done manually to assign voucher A for contact A?

    If it is manually, I need to find a way to automate this process because if we have 100k of contacts and we want to send them vouchers the user will spend 2 weeks assigning vouchers for the 100k's.

    2. You mentioned adding a date field to record the date/time when the vouchers are sent or assigned, how we can automate that process based on whenever the marketing email has been sent?

    I would greatly appreciate your detailed responses regarding the above.

    Best regards,

    EBMRay

  • EBMRay Profile Picture
    905 on at

    Hello everyone,

    I have a custom table called Vouchers that have a relationship with the contacts entity 1:N. (1 voucher can be assigned to many contacts). In the voucher table, I have a sample data as below:

    Title: Voucher A, Voucher B...

    The scenario that I need to achieve in the Marketing Module using Power Automate:

    1. I want to automate the process of allocating the vouchers to a dynamic segment that has the contacts for today's birthdays on a daily basis.
      (I thought about creating a Power Automate cloud flow that triggers at 6:00 AM and does the job but I am stuck on the steps needed to achieve the scenario)
    2. I want to automate the process to feed the logs data in the contact's table that will show the previous vouchers were sent to a specific contact.
      (Example: if we sent voucher A to a customer on 1/12/2022 and the following year 1/12/2023 we sent them another voucher (voucher B), I want a simple grid in the contact table that shows me this history). Also, do I need a custom table for the logs?

    Regarding step 1, what are the actions that should be used to query a specific dynamic segment from the marketing module that has the above data? what about if we have 10k of contacts how the flow will allocate the vouchers to the contacts and in that case what is the best practice to perform a batch update?

    Can you please provide an example and the right solution for the above scenario?

    I would highly appreciate your inputs   and any help is greatly appreciated.

    Thank you!

  • EBMRay Profile Picture
    905 on at

    Hi Nya ,

    Would highly appreciate if you have any updates based on the concerns I raised.

    Best regards,

    EBMRay

  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi EBMRay,

    Sorry for the late reply.

    1. You can create an on-demand workflow to assign the voucher to the contacts in customer journey.

    The target entity of the workflow should be Contact so that it can be inserted into the journey.

    2. The population of the date field can also be achieved with a workflow.

    For example, create a calculated field to record the time now.

    When the lookup field of contact in the voucher entity is filled in, set the value of the calculated field as the value of the date field.

  • EBMRay Profile Picture
    905 on at

    Hello Nya ,

    Thank you for your response.

    I have the below concern regarding the on-demand workflow:

    How the on-demand workflow will be triggered?

    The scenario that I thought about is to trigger the flow every day at 6:00 AM to assign the vouchers for the contacts. After the vouchers are allocated, the customer journey should trigger to send the vouchers for the contacts from the marketing mail.

    I look forward to your response.

    Best regards,
    EBMRay

  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi EBMRay,

    There is a workflow tile in Customer Journey which can select on-demand workflows targeting at Contact entity.

    pastedimage1642145343755v1.png

    pastedimage1642145355505v2.png

    You can set the journey as a recurring one so that you can trigger the flow every day at 6:00 AM.

    Set up a recurring journey

  • EBMRay Profile Picture
    905 on at

    Hi Nya ,

    Thank you very much for providing screenshots.

    What is the recommended number of rows for bulk updates during the workflow run?

    I will try all the steps mentioned in this article and get back to you if I have any problems.

    Best regards,

    EBMRay

  • Nya Profile Picture
    29,060 on at

    Hi EBMRay,

    You don't need to be concerned about the number of rows as the workflow in the customer journey will handle all the contacts in the audience of the journey.

  • EBMRay Profile Picture
    905 on at

    Hi Nya ,

    Thank you for your prompt response.

    How can I link the workflow to generate the records from the dynamic segment that will fetch the contact's data?

    The customer journey is already related to the dynamic segment needed.

    I look forward to your response.

    Thank you!

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans