In this blog we will work with three recently provided features within Dynamics 365 Marketing. The objective is to bring to life how these features can work together to address real scenarios and problems faced in implementations. The three features we will work with are:
In this scenario, Contoso offered their customers the ability to specify a designated email address to receive all email communications regarding a service request. Contoso’s Customer Service team has implemented this using an email address field on the Case entity and geared all its processes around it.
As part of an enhanced communication program, Contoso wants to provide a satisfaction survey to the service request’s primary contact upon the resolution of the service request. With Dynamics 365 Marketing, users can create content rich communications as desired by Contoso. These communications are by default sent to the primary email address of the service request’s contact, which can leave the satisfaction surveys going to the wrong email address if an alternate address is specified within the service request itself.
In order to build out the solution, we will:
- Complete preparation tasks
- Build the automation
- Trigger the journey
To prepare to build out the required logic, we first need to:
- Update Audience Configuration Settings
- Create a new trigger for data preparation
- Create a Power Automate Flow for data preparation
Updating Audience Configuration Settings
By default, Dynamics 365 Marketing uses the primary email address field on the contact entity as the address to which email communications are sent. With Real-Time Marketing, this capability now includes the flexibility to define a different field, such as an alternate email address, if desired. This is explained in detail here (https://docs.microsoft.com/en-us/dynamics365/marketing/real-time-marketing-audience-data).
In our example, we update the Audience Configuration settings to use a custom field named “Email for CJO.”
This field collects the email address to be used in the specific communication, overriding it on every journey execution the contact becomes a part of. By using a custom field instead, the existing email addresses for the contact’s primary email address won’t be affected.
Create a new trigger for data preparation
Next, we will create a new Real-Time Marketing trigger that will be called every time a customer journey needs to send an email. We are making this a generic, reusable component that can be used across multiple journeys. The trigger uses the contact and email parameters for the communication.
Create a Power Automate Flow for data preparation
The second part of our reusable component is a Power Automate Flow that is instantiated when the Trigger defined above is called. To do this, the Flow is set up to automatically execute when “When an action is performed” of the “Dataverse Connector.”
The Flow Trigger configuration uses the custom action of the Cxp catalog that is named the same as the Marketing trigger created in the second step of the preparation.
Finally, the logic within the Flow updates the contact received by the action, setting the received email address into the custom field specified as the default email field in the first step of the preparation.
In this example we assume no further logic is required, but the Flow can be extended for more complexity if necessary.
Building the automation
To address the scenario, we use the capabilities of Real-Time Marketing which allows us to trigger communications based on a given event. In our example, that event is the resolution of a Case. We also ensure that in that trigger we pass the email address specified in the Case as a parameter. This approach of passing the email address for communication as part of the definition of the trigger is something that can be used for other similar scenarios, like event registrations, form submissions, etc.
As a first step, in Marketing we create a trigger called “Case Solved.” In this trigger, we will use the new feature that allows to create triggers without code upon events in Dynamics. More information on trigger creation can be found here.
During the specification of the trigger, we will associated with Case updates on Status Reason as we are looking for cases being resolved.
With the trigger built, the next step is to create an email which will be sent to the customer with information about the resolved Case and the link to the satisfaction survey. This survey would have been previously created in Customer Voice. Email authoring and personalization are discussed in detail here. The resulting email, which could include additional information received in the trigger, and look like this.
After marking the email as ready to send, we are ready to use the content in the customer journey. Because the journey is to be executed after a Case has been resolved, using the Trigger-based journey option in Real-Time Marketing is more appropriate. We also will add a condition so that only solved cases trigger the journey and not all changes to the status.
Upon the journey starting, we want to ensure that the email address passed in the trigger is the one used in the communications. For this reason, the first step in our journey is to execute our custom trigger created during the preparation and map the email field from the Case
This allows for the execution of the Power Automate Flow created in the preparation. After the Flow executes, we have completed the data preparation, setting the correct email address to use for email communications based on the audience settings.
Because Flow executes asynchronously, we need to add a wait tile to our journey to allow for the completion of Flow before proceeding, thus ensuring the data update is complete. The wait time needs to be appropriate for the type of update being done. In the example, it is set for 10 minutes.
Lastly, we can add the email to the journey.
Once the journey is saved and published, resolving a case will start the journey, which will start by executing the Power Automate Flow defined, updating our custom field on the Contact and then sending the resolution email to the address specified in the Case.
When going through the above scenario and solutions, the following should also be considered:
- When sending an email in Real-Time Marketing that includes links to customer voice surveys, the responses are recorded but are not currently linked to the contact.
- The above solution makes the assumption that consent for all email addresses used has already been obtained. If that is not the case, additional steps should be taken to ensure consent is provided and recorded in Dynamics 365 Marketing.