Microsoft Dynamics 365 Customer Insights Journeys integration
This guide walks you through connecting Better Email to Microsoft Dynamics 365 Customer Insights - Journeys using an app-only Microsoft Entra setup. Better Email exports the finished campaign as a draft asset in Dataverse, ready for your team to review and use inside Journeys.
Before you start
To connect Customer Insights - Journeys, you will need:
- a Customer Insights - Journeys environment with Dataverse access
- the Dataverse organization URL for that environment
- permission to create an app registration in Microsoft Entra
- permission to create an Application User in the Power Platform environment
- a security role in Dynamics that can create and update marketing email assets
- an admin user in Better Email who can create and edit integrations
1. Register an app in Microsoft Entra
In Microsoft Entra admin center:
- Go to
App registrations. - Create a new registration for Better Email.
- Choose the tenant you want Better Email to connect to.
- Copy the
Application (client) ID. - Copy the
Directory (tenant) ID.
For this integration, a single-tenant app is usually the simplest choice.
2. Create a client secret
Still in the app registration:
- Go to
Certificates & secrets. - Create a new client secret.
- Copy the secret value right away.
Microsoft only shows the secret value once. If you lose it, create a new one and update the Better Email integration.
3. Create an Application User in Dynamics
In Power Platform admin center for the target environment:
- Open the environment used by Customer Insights - Journeys.
- Go to
Settings. - Open
Users + permissions. - Open
Application users. - Create a new application user based on the app registration you just created.
- Assign a role that can create and update marketing email assets in Journeys.
In many setups this is a marketing-focused role such as Marketing Manager - Business, but some teams use a custom role instead.
4. Set up the integration in Better Email
In Better Email:
- Go to
Integrations. - Create a new integration.
- Enter a clear name for the integration.
- Choose
Microsoft Dynamics 365 Customer Insights Journeysas the type. - Optional: under
Access, restrict the integration to specific users or groups. - Enter:
Organization URLTenant IDClient IDClient Secret- optional
Dataverse API Versionif you need something other thanv9.2
- Enable the integration.
- Save the integration.
Better Email handles the token request and refresh flow automatically during export. There is no separate OAuth approval popup in this setup.
5. Subject line and preheader
This integration syncs the campaign's subject line and preheader to Customer Insights - Journeys. Set both in the Campaign Workspace on the Edit tab, using the inbox preview row above the email.
6. Export behavior
When you export a campaign to this integration:
- Better Email renders the final HTML with recipient fields and segmentation output for this provider.
- Better Email creates a draft
msdynmkt_emailrecord in Dataverse. - On later exports, Better Email updates the same Dataverse email instead of creating a duplicate.
Important to know:
- Better Email exports the email asset only in v1.
- Better Email writes the export preheader to the Dynamics
preview textfield. - Better Email does not create journeys, segments, or send schedules in Microsoft Dynamics.
- The exported asset stays in draft so your Dynamics team can review it before use.
7. Personalization with recipient fields
Recipient fields work in this integration, in the campaign body as well as the subject line and preheader. On export, Better Email turns each one into a Journeys placeholder bound to the contact record, and writes the matching definition onto the email so the Journeys designer resolves it.
This integration does not sync fields from Dynamics, so you add them yourself on the Recipient Fields page.
Set each field's ESP field name to the Dataverse logical name of the contact attribute — jobtitle, firstname, numberofchildren — not the display label you see in the Journeys UI.
The logical name is what Dataverse stores the column under. It is lowercase, has no spaces, and often differs from the label: Job title is jobtitle, and custom columns carry a publisher prefix such as new_loyaltytier. You can find it in Power Apps under Tables → your table → Columns.
If the ESP field name is left blank, Better Email falls back to the field's key. When that key is not a real attribute, Journeys reports:
Placeholder "…": The binding attribute is invalid or does not exist
which means the field name, not the integration, needs fixing.
Data types map straight through, so use the same type in Better Email as the Dataverse column uses: text, number, boolean, and date are all handled. Other column kinds — option sets, lookups, currency — are exported as text, so verify the result in Journeys before relying on them.
Once the field exists and is marked insertable, marketers use it like any other recipient field. See Recipient Fields / Merge Tags for the general setup.
8. Segmentation and block variants
Segmentation works too. Conditions built in Better Email become Journeys conditional content: each variant's rule is exported as a condition on the email, and the body switches between variants exactly as it does in the editor.
All six condition operators are supported — is, is not, greater than, less than, is set, is not set — along with AND/OR groups, nested groups, and negation. Variants keep their editor order, and the Everybody else fallback becomes the final branch, so the first matching variant wins just like it does in preview.
Conditions read the same contact attributes as recipient fields, so the ESP field name rule above applies to segmentation as well.
Previewing a segmented email in Journeys
Journeys previews personalization and conditions in two separate places, which surprises people the first time:
- Personalization in the designer's sidebar lets you pick a sample contact. Recipient field values fill in from that contact's record.
- Conditions appear further down as their own entries you switch true or false by hand. They do not follow the sample contact.
So to check a segmented email, toggle each condition and confirm the right variant appears. To QA the rules themselves against realistic data, use preview profiles in Better Email before exporting.
Code segments
A code saved segment for this integration must be the name of a single condition you already maintain in the Journeys designer — for example VipCustomers — and nothing else. Journeys only accepts a placeholder name in a conditional, so ESP snippets that work for other providers do not apply here.
Because such a condition is opaque to Better Email, it cannot be combined with other rules inside one group. If you need "VIP and in Germany", either add the country test to the condition in Journeys, or build the whole rule visually from recipient fields. An export that mixes the two fails with a clear error rather than quietly sending to a wider audience.
9. Performance data
Campaign performance data is not available for this integration. Customer Insights - Journeys does not expose send-level analytics through the Dataverse API — the numbers live in a separate analytics store that requires a Microsoft Fabric link — so results have to be read in Journeys itself for now.
10. Required Dynamics tokens for sending
Some Customer Insights - Journeys setups validate that the email contains these tokens before the email can be sent:
{{Companyaddress}}{{Preferencecenter}}
These are Dynamics tokens, not Better Email Liquid variables.
Because Better Email uses Liquid syntax, writing those tokens directly in design system code can cause Liquid to try to evaluate them. To output them literally, wrap them in Liquid raw tags:
{% raw %}{{Companyaddress}}{% endraw %}
{% raw %}{{Preferencecenter}}{% endraw %}
Use this pattern anywhere you need those Dynamics tokens to survive export exactly as written.
Troubleshooting
If export fails, double-check:
- the organization URL points to the right Dataverse environment
- the tenant ID, client ID, and client secret all come from the same Entra app registration
- the client secret is still active
- the Application User exists in the target environment
- the assigned security role can create and update marketing email assets
- the integration is enabled in Better Email
If Customer Insights blocks send or validation because required footer tokens are missing, make sure the exported email includes literal {{Companyaddress}} and {{Preferencecenter}} tokens, and that they are wrapped in {% raw %}...{% endraw %} in Better Email design system code so Liquid does not consume them.
If the Entra app or secret was rotated recently, updating the credentials in Better Email is the fastest first step.
If Journeys reports The binding attribute is invalid or does not exist for a placeholder, a recipient field is pointing at something that is not a contact attribute. Set that field's ESP field name to the Dataverse logical name — see Personalization with recipient fields.
If a condition evaluates the wrong way in preview, check whether you are toggling it by hand in the Journeys sidebar rather than expecting the sample contact to drive it. That is how Journeys previews conditions.