Skip to main content
Microsoft Dynamics 365 Sales is an enterprise CRM solution that manages customer relationships through contacts, leads, opportunities, and activities. This integration uses Power Automate to automatically push real-time sales data from Microsoft Dynamics 365 (D365) Sales to the MoEngage platform. This automatic data synchronization helps marketing and support teams trigger highly contextual and personalized engagement campaigns based on sales activities and the customer lifecycle.

MoEngage and Microsoft Dynamics 365

The integration of D365 Sales and MoEngage enables enhanced alignment between marketing and sales. With this integration, you can:
  • Synchronize Contacts, Leads, and Opportunities from D365 Sales to MoEngage.
  • Import sales activities like Calls, Meetings, and Tasks as behavioral events.
  • Capture custom attributes and relationships for comprehensive customer profiling.
  • Trigger contextual campaigns based on sales interactions and opportunity lifecycle events.

Use cases

Integrating Microsoft Dynamics 365 with MoEngage helps you solve the following use cases:
  • Lead-to-engagement: When a new Lead is created in D365, the complete lead data is automatically pushed to MoEngage, allowing you to instantly trigger a personalized welcome campaign and enroll the lead in relevant nurturing sequences based on their source or score.
  • Contact synchronization: When Opportunity stages change (for example, from Qualify to Propose), push updates to MoEngage to send targeted content, deal status notifications, or win/loss analysis.
  • Sales activity events: When Calls, Meetings, or Tasks are logged, capture these as behavioral events in MoEngage for engagement attribution.
  • CSAT and re-engagement: When Opportunities are closed or deals are won, trigger satisfaction surveys or customer onboarding campaigns.

Sync modules

The following table outlines the data synchronization type for each D365 Sales module.

Integration

PrerequisitesAdmin access to your Power Automate and D365 Sales environment.

Step 1: Get your MoEngage endpoint

To get a dedicated endpoint for your integration, contact the MoEngage Support team. In your request, specify the common identifier used to link user profiles between MoEngage and the partner platform.

Step 2: Create a Power Automate flow

1

Open Power Automate

2

Create an automated cloud flow

Click Create > Automated Cloud Flow.
3

Name your flow

Provide a flow name. For example, D365 - Sync Contact to MoEngage.
4

Select the trigger

Select the trigger When a row is added, modified, or deleted (Dataverse).
5

Configure trigger details

Configure the following trigger details:
  • Table: Select the entity you want to sync (for example, Contact, Lead, Opportunity).
  • Scope: Select Organization.
  • Trigger on: Select Added or Modified.
Power Automate trigger configuration screen with Table, Scope, and Trigger on fields

Step 3: Configure the HTTP webhook action

1

Add a new HTTP step

Click New Step > HTTP.
2

Provide the HTTP request details

Configure the HTTP webhook with the following values.Custom headersTo generate your Authorization token:
  1. Use a Basic Auth Header Generator tool.
  2. Enter your Workspace ID as the username and your Data API Key as the password.
To find your credentials:
  1. On the MoEngage UI, navigate to Settings > Account > APIs.
  2. Copy the ID under Workspace ID (earlier called App ID).
  3. Copy the Data key under API keys.
Your Basic Authentication Token is the Base64-encoded combination of Workspace ID and Data:
Ensure the token is copied completely without extra spaces.
Power Automate HTTP webhook action configured with method, URL, and custom headers

Step 4: Add the request body payload

To add the request body payload:
  1. Copy the appropriate payload template from below and paste it into the Body field of the HTTP action.
  2. Replace placeholder values (for example, @{triggerBody()?['firstname']}) with the corresponding dynamic content fields from the D365 trigger.
  • For each activity type, set the event_name to the {{activity name}} or a custom value.
  • Add additional custom event fields under event_attributes.
  • Add additional custom user fields under user_attributes.

Required fields

Data mapping guidelines

  • Unique identifier (Customer ID): Use a consistent, immutable identifier to link user profiles between D365 and MoEngage. Map this value to the customer_id field in your MoEngage payload. This is critical for data merging and preventing duplicate user profiles. Use one of:
    • Email address (if unique).
    • D365 record GUID (for example, contactid, leadid).
    • External ID (if configured in D365).
  • Event name (event_name): Always include a descriptive event_name to identify and categorize actions in MoEngage. This ensures all events are tracked accurately for analysis and segmentation.

Step 5: Test the integration

1

Trigger the flow

In Power Automate, click Test and then manually trigger a cloud flow.
2

Create or update a test record in D365 Sales

For example, create a new Contact in D365 Sales.
3

Monitor the flow execution

Watch the flow execution in Power Automate for a successful HTTP 200 or 201 response.
4

Verify in MoEngage

Verify in the MoEngage UI that the test data has synced correctly within 1–5 minutes.
MoEngage UI showing a synced D365 contact with the expected attributes
The test record appears in MoEngage with all mapped attributes populated.

Rate limits

To maintain platform stability, MoEngage limits ingestion of Microsoft Dynamics 365 Sales data to a maximum of 500 requests per second (RPS) per workspace. If your workspace exceeds this limit, MoEngage returns an HTTP 429 (Too Many Requests) status code. Refer to the Microsoft Dynamics 365 Sales default retry policy to understand how rate limiting affects your data flow.
Retry exhaustion: If Microsoft Dynamics 365 Sales exhausts all retry attempts for a batch of data, you must contact the Microsoft Support Team to replay the failed requests.