Amey Holden

View Original

Add the Contact Point Preferences control for Dynamics 365 Marketing to Contact forms

NOTE: The contact point preferences control is currently out of action (not working/caput/dead). It is possible to show the control on custom forms where the JavaScript for the consent is not applied but the control does not seem to be working and I’m pretty sure it doesn’t know how to handle multiple compliance profiles. Hopefully something will come along soon. I’m also working on a custom page to help in the meantime. Watch this space!

One of the biggest changes in real-time marketing for Dynamics 365 is how consent is stored and managed. In outbound marketing the ‘Bulk Email’ field on the Contact record was the key determinant of consent, this is ‘Record (row)/Contact based consent’. However, with the ability to market to Leads and Contacts , comes a need for a new way to manage consent. Real-time marketing captures consent as ‘Contact Points’, so each contact detail you have such as an email address, or a phone number; has its own consent of Opted In or Opted Out. If there are duplicate contacts or leads with the same email address there will still be only one contact point consent for the email address.

I’m not going to go into too much more detail on all this right now, it’s a topic for another day. Further reading on compliance/consent here, it’s important to understand it -> https://learn.microsoft.com/en-us/dynamics365/marketing/real-time-marketing-email-text-consent

NOTE: Currently this ‘Contact point preference’ widget is not available to add to a lead form, but I’m sure it will be along soon along with the new interests (aka the new way to do subscriptions) and multi-brand consent features!

This post is quite similar to my previous in terms of steps to export/import but I’m feeling kind and will not make you flick back there for anything you need, but I will therefore repeat myself here instead 😉

For obvious reasons - do this in a development environment, test it and check it before sharing your insightful magic with the rest of your users!

Export the form

Create a new solution into which we will add the custom Contact form that you want to add the contact point preferences control on to. Before exporting, edit the custom form with a section clearly labelled to show that this is where the contact point preferences control should be, we can change this later but having an obvious name will help you dig around in the XML a bit more easily in the next step. See below ‘I want my contact point preferences here’ as an example. Ensure you save and publish your changes.

Export as an unmanaged solution.

Edit the Form XML

Download the solution you just exported and in your download file explorer, right click and ‘Extract All…’. Open the customizations.xml file in whatever plain text program you use (I use visual studio code which beats notepad hands down, but entirely optional).

In the customizations.xml file search for the tab that you want to add the insights into (that handy tab name you added earlier becomes very useful now! Replace everything inside the <section> and </section> tags with the below Tab snippet, note its section not sections.

See this content in the original post

Then find the tag for </controlDescriptions> and just above that, add this Control Description snippet

See this content in the original post

Import your changes

Save your changes from above then navigate into your extracted folder from earlier. Select the three files (customizations,solution,[Content_Types]), right click and ‘Compress to zip file’. The name of the folder doesn’t really matter so call it something useful e.g. ‘Contact point consent magic stuff’.

Return to the Power Apps maker studio and import your solution, ensuring you select the new zipped folder you created.

Publish your changes. You can now open the Contact form from the maker studio to edit your section label accordingly, publish and go consent-fully manage consent!

Lead consent widget pending

Unlike the awesome insights tab, the contact point consent widget is not available to show on the lead form (yet!) but in the meantime you can also view and manage contact point consent in the the real-time marketing ‘Consent centre’.