Microsoft Dynamics 365
Dynamics 365 Customer Insights - Journeys starts and advances real-time journeys from custom triggers. Datafly Signal raises a custom trigger server-side by calling the trigger’s Custom API on the Dataverse Web API (POST https://<org>/api/data/v9.2/<trigger>), so an order confirmation, abandoned-cart or lead follow-up journey starts from first-party server data.
Why route Microsoft Dynamics 365 through Datafly Signal
- Records come from your server, not the browser. They reach Microsoft Dynamics 365 even when a tracker blocker or a failed page unload would have dropped a client-side call, and no form integration or browser tag is needed.
- Delivery is queued and retried. Signal buffers to Kafka and retries on 429 or a transient failure rather than dropping the event; a permanent rejection goes to the dead-letter queue with the vendor’s reason.
- One consent decision governs every destination. Microsoft Dynamics 365 is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.
Get your Microsoft Dynamics 365 credentials
Create the custom trigger
In Customer Insights - Journeys open Triggers > New trigger, choose When a customer interacts with a website/app, pick the Customer data type (Contact, Lead or Customer Insights - Data profile) and add the attributes the preset sends (for example orderid, ordertotal, currency). Open Go to code snippet and copy the trigger’s unique name (it starts msdynmkt_).
Register an app for server-to-server access
In the Microsoft Entra admin centre register an application, create a client secret and note the tenant ID and application (client) ID. In the Power Platform admin centre add the app as an application user of the environment, with a security role that can run the trigger’s Custom API.
Find your environment host
Your environment URL without https://, for example contoso.api.crm4.dynamics.com.
Configuration
| Field | Required | Description |
|---|---|---|
org_url_host | Yes | Your Dynamics 365 / Dataverse environment host, without https:// or a trailing slash. Find it under Settings > Advanced settings > Developer Resources, or in your environment URL (e.g. contoso.crm4.dynamics.com). This is also used as the OAuth resource scope. |
tenant_id | Yes | Your Microsoft Entra ID (Azure AD) directory/tenant ID. Found in the Entra admin centre under Overview, or in Azure portal > Microsoft Entra ID > Tenant ID. |
client_id | Yes | The Application (client) ID of the Entra app registration used for server-to-server access. This app must be added as an application user in your Dynamics environment with privilege to invoke the trigger’s Custom API. |
client_secret | Yes | A client secret generated for the Entra app registration (Certificates & secrets > New client secret). Used for the OAuth client-credentials grant. |
trigger_name | Yes | The msdynmkt_-prefixed Custom API unique name of the custom trigger to raise, shown in the trigger’s ‘Go to code snippet’ panel in Customer Insights - Journeys. Each pipeline raises one trigger; create separate integrations to drive different journeys. |
customer_data | No | What the trigger’s Customer data attribute points to. Signal sends the user ID as the customer’s ID, so it must be the Dataverse contact or lead ID, or the Customer Insights - Data profile ID. Choose ‘profile’ to also send contactpoint_email, the email fallback such triggers have. |
Management UI setup
- Go to Integrations in the sidebar and open the Integration Library tab.
- Find Microsoft Dynamics 365 under CRM and click Install.
- Choose a preset, enter the fields above and click Install Integration.
Management API setup
curl -X POST http://localhost:8084/v1/admin/integration-catalog/microsoft_dynamics365/install \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Microsoft Dynamics 365",
"variant": "default",
"config": {
"org_url_host": "your_org_url_host",
"tenant_id": "your_tenant_id",
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"trigger_name": "your_trigger_name"
},
"delivery_mode": "server_side"
}'What Signal sends
An example request, rendered from the default preset for purchase:
POST https://contoso.api.crm4.dynamics.com/api/data/v9.2/msdynmkt_ordercompleted_1
{
"msdynmkt_currency": "GBP",
"msdynmkt_orderid": "ORD-1001",
"msdynmkt_ordertotal": 279.98,
"msdynmkt_profileid": "0f8fad5b-d9cb-469f-a165-70867728950e",
"msdynmkt_signalingestiontimestamp": "2025-09-22T00:13:20Z",
"msdynmkt_signaltimestamp": "2025-09-22T00:13:20Z",
"msdynmkt_signaluserauthid": "0f8fad5b-d9cb-469f-a165-70867728950e"
}| Field | Source |
|---|---|
msdynmkt_profileid, msdynmkt_signaluserauthid | The user ID. It must be the ID the trigger’s Customer data points to: the Dataverse contact or lead ID, or the Customer Insights - Data profile ID (a GUID). An event whose user ID is not a GUID is not sent. |
msdynmkt_signaltimestamp | When the event happened, ISO 8601. |
msdynmkt_signalingestiontimestamp | When Signal received it, ISO 8601. |
Trigger attributes (msdynmkt_orderid, msdynmkt_ordertotal, msdynmkt_currency …) | The preset’s event fields, each required: a trigger with a null attribute fails. Currency is ISO 4217, upper-cased; values are numbers. |
contactpoint_email | Only when Trigger Customer Data is profile: the email, trimmed and lower-cased, as the fallback such triggers use when the full profile is not available. |
The customer is identified by the Dataverse or Customer Insights - Data ID. The email is sent in plain text only as contactpoint_email on a Customer Insights - Data profile trigger, the only trigger type that has it, so the journey can reach the customer.
Presets
| Preset | Signal events |
|---|---|
Default (default) | purchase |
Retail (ecommerce) | add_to_cart |
B2B / SaaS (saas) | sign_up |
Lead Generation (lead_gen) | generate_lead |
Insurance (insurance) | quote_requested |
Automotive (automotive) | test_drive_booked |
Travel (travel) | purchase |
Events not listed are not sent. Each preset is a starting point: add, rename or remove mappings on the installed integration.
Notes and limits
- One integration raises one custom trigger (the Trigger (Custom API) Name setting), so each preset maps exactly one event. Install one integration per trigger (for example one for order confirmation and one for abandoned cart).
- The attribute names are the targets in the preset. If your trigger’s attributes are named differently, rename the targets on the installed integration to match the code snippet.
- Authentication is the OAuth 2.0 client-credentials grant against
login.microsoftonline.com/<tenant>, scopehttps://<org host>/.default.
Consent
Assign the consent category you use for this processing when you install Microsoft Dynamics 365, so an event is delivered only when the visitor has granted it. Signal never writes a cookie-banner choice into Microsoft Dynamics 365’s contact permissions (no consent field is sent): consent to cookies is not consent to be emailed, called or messaged. Record communication opt-in and opt-out in Microsoft Dynamics 365.
Verify it’s working
- Open the integration in the Signal Management UI and watch Live Events while you trigger a mapped event.
- Confirm a 2xx response from Microsoft Dynamics 365.
- Find the record in Microsoft Dynamics 365 and check it arrived.
Troubleshooting
| Symptom | Resolution |
|---|---|
401 / 403 | The app is not an application user of the environment, or its security role cannot run the trigger’s Custom API. |
404 | The trigger name or environment host is wrong. |
400 naming a parameter | The trigger does not define an attribute the preset sends; add it to the trigger or rename the target. |
| Nothing sent for an event | The user ID is not a GUID, or an attribute the preset requires is missing from the event. |