Can you merge two ERPs into one?

Yes, you can merge two enterprise systems like Microsoft Dynamics 365 (backend) and Salesforce (frontend) but doing so requires clear architecture, robust integration, and a well-defined use case. 

Below is how you can approach this setup:

Use Case Example

Let’s say:

  • You want to use Salesforce for customer-facing activities (sales, service).
  • You want to use Dynamics 365 Finance & Operations for ERP/backend (invoicing, order fulfillment, inventory, finance).

Integration Architecture Options

ComponentApproachTools/Tech Stack
Data Sync (2-way)MiddlewareAzure Logic Apps, Power Automate, MuleSoft, Boomi, KingswaySoft, or Jitterbit
API IntegrationReal-time communicationDynamics 365 Web APIs + Salesforce REST APIs
Events/WebhooksEvent-driven updatesAzure Event Grid, Salesforce Platform Events
Data VirtualizationRead data without duplicatingOData feeds, Salesforce Connect, Power BI direct connections

Example Integration Flow

1. Sales Order Flow (Frontend in Salesforce)

  • A user creates a Sales Order in Salesforce.
  • Salesforce sends the data via API or middleware to Dynamics 365 F&O.
  • Dynamics processes order (inventory, finance) and returns the order status.
  • Salesforce receives the update and displays it to the user.

2. Customer Master Sync

  • Dynamics 365 is the master for financial data (billing, tax info).
  • Salesforce syncs only what’s needed for customer interactions.
  • Use a scheduled sync or triggered events for updates.

Security & Identity

Use Azure AD B2B or SSO integration between Salesforce and Microsoft environments for consistent identity and access control. Use OAuth 2.0 tokens for secure API communication.

Best Practices

  1. Define system ownership – Which system is the source of truth for each data entity?
  2. Ensure data mapping consistency – Use standard fields or map custom fields properly.
  3. Use error logging & retries – Especially for middleware-based integrations.
  4. Consider licensing impact – Cross-system usage may trigger additional licensing requirements.
  5. Use a Data Lake or Dataverse – To consolidate data for analytics if needed.

Tooling Options Summary

NeedTools
Middleware IntegrationAzure Logic Apps, Power Automate, MuleSoft, Boomi
Custom API IntegrationAzure Functions + D365 Web APIs + Salesforce REST APIs
Data VisualizationPower BI, Tableau, embedded dashboards
Master Data ManagementMicrosoft Purview, Profisee, Salesforce MDM partners

Here is a sample integration architecture diagram:

Can you create a Power Automate sample flow between Salesforce and Dynamics 365?

Here’s a Power Automate sample flow that integrates Salesforce (frontend) with Microsoft Dynamics 365 Finance & Operations (backend).

This example shows how to create a sales order in D365 when an opportunity is closed-won in Salesforce.

Flow: Create Sales Order in D365 when Salesforce Opportunity is Closed-Won

Tools Needed

  • Power Automate.
  • Salesforce Connector.
  • HTTP or Custom Connector for Dynamics 365 F&O (if Finance & Operations isn’t in standard connectors).
  • Azure AD App Registration (for authenticating D365 API access).

Flow Steps

1. Trigger

  • Trigger: When an Opportunity is updated in Salesforce.
  • Condition: Stage = Closed-Won.

2. Get Opportunity Details

  • Action: Get Record by ID.
  • Object: Opportunity.
  • Pull: Account Name, Amount, Close Date, Product Line Items.

3. Get Account Details (Optional)

  • Action: Get Related Account.
  • For billing/shipping/customer info to pass to Dynamics.

4. Prepare Sales Order Payload

  • Use Compose or Data Operation – JSON.
  • Structure data to match Dynamics 365 Sales Order schema

{

  “customerAccount”: “AccountNumber”,

  “orderDate”: “CloseDate”,

  “salesLines”: [

    {

      “productNumber”: “ProductID”,

      “quantity”: 2,

      “unitPrice”: 500

    }

  ]

}

5. Create Sales Order in Dynamics 365

  • Action: HTTP.
  • Method: POST.
  • URL: https://<your-d365-env>.cloudax.dynamics.com/data/SalesOrders
  • Headers:
    • Authorization: Bearer <AccessToken>.
    • Content-Type: application/json.
  • Body: Use the payload from Step 4

Use Azure AD + OAuth 2.0 client credentials to authenticate (through HTTP action or custom connector).

6. Log Success/Error

  • Action: Append to SharePoint/Dataverse/Email for logging.
  • Send response or error to Power BI, SharePoint, or email admin.

Authentication Notes

If you’re not using a premium/custom connector for D365:

  • Register an Azure AD App.
  • Grant it permissions to Dynamics ERP.
  • Use Power Automate’s HTTP with Azure AD or Azure Key Vault for token management

Optional Enhancements

  • Bi-directional sync: Update Salesforce once Dynamics confirms sales order creation.
  • Use Error Handling Branch in Power Automate for retries/logging.
  • Trigger webhook from Salesforce instead for real-time performance.

Here is a visual diagram of this flow:

You can also add logging to your Power Automate flow to track integration success or failures.

Here’s how it works for each option:

1. SharePoint Logging

  • Use Case: Quick setup, easy access for business users.
  • How to Implement:
    • Create a SharePoint list with columns like OpportunityId, Status, Timestamp, ErrorDetails.
    • Add a “Create Item” action in your flow after success or failure.
  • Pros: No extra licensing, native support.
  • Cons: Not ideal for high-volume or relational data.

2. Dataverse Logging

  • Use Case: Enterprise-grade logging for structured, relational data.
  • How to Implement:
    • Create a custom Dataverse table (e.g., IntegrationLog).
    • Use the “Add a new row” Dataverse connector action.
  • Pros: Integrates with model-driven apps, better for analytics/reporting.
  • Cons: Requires Dataverse licensing.

3. Email Logging (Alerting)

  • Use Case: Notify admins or stakeholders on failures.
  • How to Implement:
    • Use the “Send an email (V2)” action in a failure branch.
    • Include dynamic content (e.g., Opportunity ID, error message).
  • Pros: Fast alerting, no storage setup.
  • Cons: Not a permanent log, easy to overlook in inbox.

Suggested Setup

For a robust solution:

  • Use Dataverse or SharePoint for logging,

  • Use email alerts only for errors or critical issues.
error: Content is protected !!