*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***

If you’re a good marketer, you give your subscribers options. You allow people to sign up to get content about Events or new Products or Services you offer. Ideally they want to get all of your content, but letting them pick and choose might mean you still have the ability to send someone marketing emails about one or two topics rather than them unsubscribing altogether. In D365 Marketing you can create your own custom subscription page, and use it for both Outbound and Real-time Marketing. This is great, but what about when someone opts out of everything, or a user changes things and opts a Contact out of getting marketing emails. Have you ever considered how they then get taken out of your subscription lists? If not, this is one for you.

Contact Information

First things first, understand what is used when sending out content using either Outbound (OBM) or Real-time Journeys. The Do Not Bulk Email field (donotbulkemail) is the key field used to determine if a Contact will be sent emails while on a Journey. However, with Real-time Marketing (RTM) you have the Consent center with records by email address to determine if it’s Opted In or Opted Out of marketing communication and tracking.

  • If there is no Consent record, and the Bulk Email field is set to Allow, emails can (currently) go out via both OBM and RTM.
  • If the Bulk Email field is set to Do Not Allow, Contacts will not get emails from either OBM or RTM.
  • If the Consent record is Opted Out and the Bulk Email field is set to Allow, Contacts can get emails from OBM
  • If the Consent record is Opted In and the Bulk Email is set to Do Not Allow, Contacts cannot get emails from either OBM or RTM

So you can see, the Bulk Email field rules it all really.

Click to view in detail

Now that you understand what controls the types of emails that can be sent to a Contact (OBM or RTM), what about if someone unsubscribes but they are currently in one or more of your Subscription Lists? The answer is nothing, absolutely nothing. They will still be in there. This means, if someone creates an Outbound Journey with the ability to send the Journey to everyone that is in a Subscription List, those Contacts will start the Journey. They won’t get any of the emails because their Bulk Email field is Do Not Allow, but you will have an over inflated number of those going through the Journey. Likewise, if you do any reporting of how impressive the numbers of people in your various subscription lists is, you will be reporting incorrect numbers. We can fix this though, by creating one of two different flows in Power Automate.

Click to view in detail

Flow For Outbound Marketing

If you are only doing OBM or are doing a mixture of OBM and RTM, but are using an outbound subscription centre (which is definitely always my choice of approaches), this is the flow for you. We will start off with a simple flow that triggers when the donotbulkemail field is changed and the field equals true, which means it’s been changed to Do Not Allow. All actions are from the Dataverse connector. We can run it on the Contact table, and only when the record is modified. Reason for this being you can’t add a Subscription List to a record that hasn’t been created yet, so no point in running it on the Add change type.

Click to view in detail

Our next step is a List rows action to find any related subscription lists that the Contact is a member of. This is actually the Marketing Lists table. Using a Fetch XML query, we can find all marketing lists where the Contact that triggered the flow is a member of. We include a filter that only pulls back lists that have a flag indicating it’s a subscription list so we don’t remove them from any other marketing lists people may have added them to.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="list">
    <attribute name="listname" />
    <attribute name="listid" />
    <order attribute="listname" descending="true" />
    <filter type="and">
      <condition attribute="msdyncrm_issubscription" operator="eq" value="1" />
    </filter>
    <link-entity name="listmember" from="listid" to="listid" visible="false" intersect="true">
      <link-entity name="contact" from="contactid" to="entityid" alias="ae">
        <filter type="and">
          <condition attribute="contactid" operator="eq" value="@{triggerOutputs()?['body/contactid']}" />
        </filter>
      </link-entity>
    </link-entity>
  </entity>
</fetch>
Click to view in detail

The last part of the flow is an Apply to each that will run on each list returned in the step above. This is the Perform a bound action step and should have the Marketing Lists table selected, and the Action Name of Remove Member List. Find the Marketing List value from your list rows step and add that as the Row ID. Then add the Contact value from the trigger and add that to the Entity ID field. I think something may have been updated recently, because it used to have a space just for the EntityID. Now it seems to show all fields for the Marketing List, so go with the one that says listmember listmemberid.

Click to view in detail

Now go and change the Bulk Email field on a Contact that has already been added to some of your Subscription Lists and wait for the flow to run. The Contact will no longer be a part of those lists now and your Subscription Lists Member count will be accurate.

Flow For Real-time Marketing

Don’t create both flows (or you will end up in a loop between the two), but if you are using Real-time Marketing AND using the Consent Centre page rather than a pretty outbound subscription centre, you will want to take this approach. The idea with this one is we want to always make sure that Bulk Email field is kept up to date and in line with the Consent record for the matching email address on the Contact. Again, it’s the Dataverse connector, and this flow will trigger on the Contact Point Consents table. Make sure you pick the second table that shows in the list, as for some silly reason it’s in there 4 times. You can run this when the record is Added or Modified.

Click to view in detail

Now we will have a condition that will check to see if someone Opted Out rather than back in via the Consent record. So the three fields conditions to add are as follows:

  • Consent Status is equal to 534120002 (Opted Out)
  • Consent Type is equal to 534120000 (Marketing Communication)
  • Type is equal to 534120000 (Email)
Click to view in detail

If all of those conditions are met, we go down the Yes branch. To keep this in line with all Contacts who have this email address on their record, a List rows step is used to search for any Contact who has the same email address on their record that is linked to the Contact Point Consent record. You can use this Fetch XML Query below.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="contact">
    <attribute name="emailaddress1" />
    <attribute name="contactid" />
    <order attribute="fullname" descending="false" />
    <filter type="and">
      <condition attribute="emailaddress1" operator="eq" value="@{triggerOutputs()?['body/msdynmkt_contactpointvalue']}" />
    </filter>
  </entity>
</fetch>
Click to view in detail

Now we add in an Apply to each step to update each Contact that was returned. Keep in mind that you could have duplicates and people could also share an email address. Our next action is an Update row step where we update the Contact using the ID of the records returned, and change the Bulk Email field to Yes, which will be what we know as Do Not Allow. This means that not only will the Contact not get RTM emails, but they also now won’t get OBM emails. This makes sense as your Contacts won’t have any concept of OBM and RTM, they only know that they have opted out and don’t want any more marketing emails from you.

Click to view in detail

Now we are just repeating the steps that were used in flow number 1 and finding all of the Marketing Lists that each Contact is a member of and use the same Fetch XML in a List rows step. The only difference will be the reference to where the Contact ID is coming from. Notice that in the query below, the value comes from the step I named ‘For Each Contact Make Opt Out Changes’. After the step where we find all the subscription lists, add in an Apply to each step, and for each list found, we have a Perform a bound action to remove the member from the list.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="list">
    <attribute name="listname" />
    <attribute name="listid" />
    <order attribute="listname" descending="true" />
    <filter type="and">
      <condition attribute="msdyncrm_issubscription" operator="eq" value="1" />
    </filter>
    <link-entity name="listmember" from="listid" to="listid" visible="false" intersect="true">
      <link-entity name="contact" from="contactid" to="entityid" alias="ae">
        <filter type="and">
          <condition attribute="contactid" operator="eq" value="@{items('For_Each_Contact_Make_Opt_Out_Changes')?['contactid']}" />
        </filter>
      </link-entity>
    </link-entity>
  </entity>
</fetch>
Click to view in detail

Going back up to the second step of the flow where we added the condition, we can add some logic to the No branch. I’ve got another condition to check and make sure the Consent record that was changed is because someone Opted In. There is only one change and that’s in the id used for the Consent Status.

  • Consent Status is equal to 534120001 (Opted In)
  • Consent Type is equal to 534120000 (Marketing Communication)
  • Type is equal to 534120000 (Email)

If the Contact was opted back in, we want to make sure (just in case) that the Bulk Email field is also set to Allow. Without that change, if it’s still set to Do Not Allow, no emails will go out. So we follow down the Yes branch and do the exact same this as before with the Fetch XML query to find Contacts with the same email address. Then an Apply to each is used to Update a row and change the Bulk Email field to No, which makes it set to Allow.

Click to view in detail

You don’t HAVE to have this type of process in place but it definitely helps to make sure you aren’t looking at incorrect numbers for your Subscription List Member counts, and aren’t starting Contacts down a Journey when they might not ever be sent an email. Having something like this in place when someone opts out is a great way to keep your Subscription Lists clean, and make sure the OBM and RTM mechanisms for allowing emails to go out are in sync.


Check out the latest post:
Removing Issues With Mobile Phone Numbers On Realtime Forms


D365 Marketing Weekly
Have you seen the D365 Marketing Weekly newsletter yet?
A weekly issue covering features, functionality and news on the topic of Marketing, specifically covering Dynamics 365 Marketing and other interesting tools and tips for anyone interested in the subject.
Subscribe Here
This is just 1 of 447 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.




9 thoughts on “Keeping Your Subscription Lists Up To Date In D365 Marketing

  1. Great information!

    This is only needed if the OBM subscription centre form does not have the subscription lists in them, correct?

    To my understanding, the contacts are taken out of the subscription list if they are exposed in the Subscription Centre forms.

    Thanks!

    1. Hi Deepak, if you visit a subscription centre form with subscription list check boxes on it, and tick to opt out of everything, it does not remove the person from the subscription lists that are still ticked. This is out of the box functionality. Likewise, if you have other forms that you add the opt out (do not allow bulk email) field to and someone changes that to do not allow, it will not remove the person from the subscription lists they are currently in.

  2. Hi Megan, thanks for the article. When you say that the bulk email field rules it all, I admit I was confused. What role does the oob „consent level“ drop-down field play? I thought this is directly mapped to the data processing, marketing and other levels of consent and controls/restricts marketing emails accordingly. Do you have any advice?

    1. Hi Susanne, the consent level drop down is only used on Outbound Journeys and not used in Real-time Marketing Journeys. You also DO NOT have to use the Consent field to determine if Contacts go on Journeys. By saying the bulk email field rules it all, I mean exactly that. It’s this field that would determine if a Contact gets send Commercial Emails over and above anything else. If this is set to Allow on a Contact, and the Consent field has not been used on a Journey, the Contact will be sent emails from that Journey.

  3. Hi Megan,
    For a new project I am working on, I want to start using RTM more than OBM, but I have these dilemnas:

    1. Subscription Lists: I can’t see how to send email comms to a Subscription List using an RTM Journey.
    2. Topics: The new approach, however, I can’t create an RTM segment based on Topics.
    3. RTM Preference Centre: I can’t use the new Preference Centre as my unsubscribe link as I can’t include Subscription Lists on it.
    4. OBM Subscription Centre: If I only use the OBM Subscription Centre as the unsubscribe link then I can’t get my recipients to opt-in/out of Text Messages.
    5. Custom Analytics: I can’t build custom Power BI dashboards off of RTM interactions until October ’23, I think.

    Have I got that all correct? Not sure which way to go.

    1. Hi Michelle, I will try and give some kind of answer to each point you have listed.

      1. You would need to create a Segment that pulls in people who belong to a subscription list. You can do this by adding the Marketing List table and then using the Marketing List look up to find your Subscription List. Then you would use that Segment in your Real-time Marketing Journey
      2. That is correct, currently you cannot create a segment based on Topics. I know it is coming, and hopefully soon, but no date has been published yet.
      3. You will need to move to Topics to be able to allow people to opt in and out from the new Preference Centre. If you don’t market to Leads in your Journeys then you can probably wait a while before switching, but ultimately at some point you will need to move over to Preference centers in your Compliance Profiles and using Topics instead of Subscription Lists
      4. You are correct. You would need to build something custom for Text Messages if you continue to use OBM Subscription Centre. I wrote this previously, but it’s not a long term solution. https://meganvwalker.com/manage-text-message-subscriptions-d365-marketing/
      5. You are in the same situation as everyone here. It’s frustrating that we can’t do anything sooner, I agree 100%!

      I hope this helps Michelle!

Leave a Reply

Your email address will not be published. Required fields are marked *