*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***
If you are managing your organisations D365 Marketing activities, I am SURE you are well aware of the email policies Microsoft have in place in terms of the percentage of hard bounces, spam reports and direct complaints they will ‘allow’ before you start getting warnings and then even potentially getting your account suspended. Those are not places anyone wants to be! To help people combat email bounces and keep their data clean, I wrote about managing email bounces in D365 Marketing but this only would work for Outbound Marketing emails and journeys. Real-time Marketing is the place to be now, but there still isn’t an easy way to review Hard and Soft Bounces, and even less easy is a way to make sure the right people are reviewing records to make sure the right Contacts are actually available to continue sending emails to. In this post I will look at a process you can build to help make sure your Hard and (some) Soft Bounces are documented and actioned accordingly.
First thing we need to do is have a clean way for someone to review when there is a bounce, and also indicate they have actually done something about it (made the Contact Inactive, changed the Bulk Email field, fixed a typo in their email etc.). I’ve added a simple table but made sure it has the type of Activity.
Make sure you go into the advanced options and turn on track changes. This will then allow you to include it in the Marketing App as an entity to use in segments and other areas as needed.
I have only added one additional field to the table called Bounce Type as a yes/no field. I have No set as Soft, and Yes set as Hard. You could use a choice field if you wanted also, but as I only had two options, this felt like a good fit. I then adjusted the Status Reason field and changed the Open value to Needs Reviewing and the Completed value as Resolved. Not needed, but the wording fits better for this scenario.
Next, from the Marketing App, navigate to Dataset configuration in the Settings area and find your new table in the list. If it’s not there, you likely didn’t set the track changes field. Select the table and then save the changes. You are done with configuration changes, easy.
A flow will be used to create the new Marketing Email Bounce activities. It’s important to note, the standard triggers below are essentially all actions that are performed when each thing occurs. So although currently nothing is added to a Contact record when an email bounces, there is actually an action that completes. We can leverage that to start our flow.
It would also be a good idea to go back and read my previous article on managing email bounces that I did for Outbound Marketing where I discuss the various email bounce categories and what to consider as a bounce you should be really paying attention to. You can find the full list of categories from Microsoft here.
So the trigger of the flow is ‘When an action is perfomed’ from the Dataverse connector. The Catalog is CXP (stands for Customer Experience), the category is Email Channel, table is none, and action name is Email bounced.
Next the ‘Get a row by ID’ step will let us find the Contact that is linked to this Email Bounce action. The action passes back a ton of action inputs, one of them being the msdynmkt_profileid, which is the Contact in this case (unless you are doing Leads, then it would be a Lead). We use that value in the row id to get the person from the Contacts table. I don’t want much else, so rather than pulling back the entire thing, I am going with the fullname field from the Contact by adding it to the Select columns. I then want to get the firstname and systemuserid from the Contacts Owning User. We can do this be adding information in to the Expand Query field.
Next, we will get the Journey. Again, I only want the name of the Journey, so using the ‘Get a row by ID’ step and looking in the Journeys table, I can use the msdynmkt_journeyid from the Action Inputs, and just pull back the msdynmkt_name field from the Journey that the Email Bounce is linked to.
The next step I have used is a Condition. This is where you really need to consider your own requirements. You might want to only have notifications for hard bounces, or just have one for any of them, but for this example I am splitting out the following email bounce categories and considering them all hard bounces that should be reviewed. We have invalid mailbox, invalid domain and inactive mailbox. Technically inactive mailbox isn’t a hard bounce, but it’s rare that this would resolve itself so you really shouldn’t be emailing them anymore. The condition used is the msdynmkt_category value from the Action Inputs. The condition uses Or logic, and I have named the categories exactly as they are listed in the documentation from Microsoft.
For the Yes branch (meaning the category of the Email Bounce matches one of the three above), we will create a new Marketing Email Bounce activity. We can set the subject as anything, but I am using the Name field from the Journey we retrieved so it’s clear where this came from.
I am then setting the Bounce Type as Yes which correlates to Hard in my Bounce Type field. You can then put whatever description you would like, but I am pulling in the name of the Journey again, along with the name of the Contact. I am then indicating it was a hard bounce and then showing the category. The msdynmkt_details is useful to add in for additional information because it contains a bit more for some of the categories that could be helpful. For the Owner, I am assigning it to the owner of the Contact, and setting the Priority as High. I want to set a Due Date on the activity and make sure it’s done within 2 days of the bounce occurring. For that, you can use an expression of addDays from now, and then set the number of days, then the format of the date.
The last thing in this step is to set the activity regarding the Contact. This can be done again using the msdynmkt_profileid and setting it in the Regarding (Contacts) field with it enclosed like you see below.
Now for the No path which is about the Soft Bounces. There are four that I consider should be reviewed, but that’s up to you to decide which ones you want to focus on. I don’t for example care that someones mailbox is full, because it could be resolved by the next time we send them an email. What I do think is important are the following.
For this Condition (that goes at the top of the No path) we have an Or logic to check if the category is any of those above. Note that I am going off the wording on the Microsoft documentation but obviously not able to test these out. You could just set it to start creating these then add your conditions in at a later point once you start to see the kind of bounces you are getting. If the condition is met, do the same thing as before and create a new Marketing Email Bounce activity. You can then adjust the description, set the Bounce Type to Soft, and even change the priority and due date to be lower than that for a Hard Bounce. It’s your choice.
In order to make the most from the new Marketing Email Bounce activities, we can use them in the building of some segments. You can combine them if you like, or do one for Hard Bounces and one for Soft Bounces.
The first time you build a segment and need to use the new table, it needs to be added to the list of related tables. Click the Add table option.
Find the table then select it and click Next to add it to the list of available related tables.
After you’ve added it, the table will show that it is syncing. Although you can start building your query, you won’t be able to see any results for a few hours. It seems to take a while before it’s all completely synced through, so just keep that in mind.
When you are ready, you can then build the query. Add in the Status Reason from the Marketing Email Bounce table with a link to the Contact via the Regarding Contact field. Do the same with the Bounce Type field. In this query I only want Contacts that have one of those activities and the Status Reason is Needs Review, and when the Bounce Type is Hard. The other fields in the query are all pulling directly from the Contact and are showing people that are Active, where their email address contains data, and where the Bulk Email field is set to Allow. Those last three fields, I suggest always including an ANY of your segments for cleaner lists.
Once the segment is ready, you can make it live and ready to use. Here we can see there are two Contacts who have fallen into the segment that have a Marketing Email Bounce activity that needs reviewing. Now make a second segment exactly the same but where the Bounce Type is Soft.
When a Journey is sent out, and if there is an Email Bounce action triggered, this will run the flow in Power Automate and generate an activity. Here we can see an activity with the Bounce Type of Hard was generated for Peter Paul. This was due to an inactive-mailbox. It’s been set with a High Priority with a Due Date in a couple of days. It’s also been assigned to the Owner of the Contact to review.
The Owner can now review the details, and then decide what to do. If it’s a Customer, this is really important to make sure messages are getting through to them, especially if the emails are about a service or their account in general. Sometimes picking up the phone is the easiest thing to do. Maybe their organisation had issues with email company wide? Or perhaps you will find out they have actually left the company. Whatever the approach, someone should review and take action. Some suggestions might be:
- Make the Contact Inactive if they are no longer working for the Account
- Change their Bulk Email field to Do Not Allow
- Review their email address and make sure there aren’t any typos
Once the record has been reviewed, the owner of the Contact can then add information in the Marketing Email Bounce activity then mark it as Complete. This will make it read only, update the date resolved (actual end date), and change the Status Reason to Resolved. Nice and neat and tidy with a trail to show what happened and who took action.
You can use the same logic in the Bounce Segments created above and include it in all of your other Segments. Or you can use the Bounce Segments in your Real-time Marketing Journeys to exclude people from going through Journeys. You can do this by creating your Journey, then clicking on the Journey Settings on the right and then in to the Start criteria by clicking Edit. This is where it shows you the segment or trigger being used, but then also gives you a field for ‘Exclude by segments’. You can add multiple segments, so just adding the two bounce segments for Hard and Soft bounces will make sure anyone in those two lists will be excluded from your Journey. Simple!
Check out the latest post:
Using An Unmapped Form Field To Capture The Referral URL In D365 Marketing
This is just 1 of 363 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.