In this blog post, we will explore how to send ClickDimensions emails via Microsoft flow. Because ClickDimensions is native to Dynamics: Customer Engagement, we can utilize the Common Data Service actions and triggers to send ClickDimensions Emails.
To start, we’ll need to determine what triggers the sending of the email. In later blog posts we’ll explore this in more detail. Once you have determined how you want to trigger the sending of the email, we’ll create that email send record:
We’ll start by filling out some of the required fields on the record:
In this section, it’s important to make the Editor Type Value the same as the Email Template that you intend on using for these sends.
Once this has been set up, we need to do a little bit of magic on the Email Send form to create the relationships between the Send and the individual you are sending to.
First, create a lookup field on the Email Send to the entity you want to send to. In my case, I want to send to a contact:
This field can be populated in many ways and we will explore some of those options in later examples. In my case, this field will be populated on creation of the Email Send record by Flow from the Contact GUID:
And finally we will need to include the GUID of the template we want to send:
Our next step is to create the relationship between the Contact and the Email send. To do this we will use a workflow plugin from Demian Rasko. This plugin will associate the two entities and allow us to send the email. Download the plugin tool here.
Once that has been installed, we’re going to create a real time workflow that fires on creation of an Email Send:
Once the record is created, we’re going to look for a value in that lookup field we added to the Email Send record:
If our custom lookup field contains data, we will associate that record with the Created Email send:
The names of these relationships come directly from the Entity Relationships on the Email Send:
If you were associating a Marketing List instead, be sure to use that Marketing List relationship.
So now, once the Email Send is created, this workflow will fire and create that association between your desired recipient(s) and the Email Send. Our final step is to now send the email. To do this, we will update the Email Send record:
Our main goal here is to set the record to Inactive and Scheduled:
Once that’s done, the ClickDimensions Execute Send will kick in and send your email! Many thanks to Matt Wittemann for his assistance with building this process!