Try WSO2 Cloud for Free
Sign in

All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

When your organization creates new account in Salesforce, you might want to create the same account in Microsoft Dynamics CRM as well.

In this guide, we explain how to use the Salesforce REST connector to get details of your new accounts (e.g., Id, name and etc) from Salesforce, use the Microsoft dynamics CRM connector to add that information to Microsoft Dynamics CRM.

How the solution works

The following diagram illustrates how the solution works:

  •     Get the account details from Salesforce using the query operation (poll using scheduled tasks).
  •     Add the account details to a Microsoft Dynamics CRM using the createEntity operation.

Before you begin, make sure you get credentials from Salesforce and Microsoft Dynamics CRM.

Let's get started.

  1. Go to WSO2 Cloud and sign up if you haven't done so already. The UI guides you through the sign-up process.
  2. Sign in to WSO2 Cloud and select the Integration Cloud from the list of Clouds that are available.
  3. The Integration Cloud opens. Click CREATE APPLICATION.
  4. Click WSO2 ESB Composite Application.
  5. Select the Local File System option and click Continue.
  6. Give an application name (e.g., SalesforceToMsDynamics) and upload this CAR file.

    What is a CAR file? A Composite Application (CAR) is an archive file that has the collection of artifacts that you want to deploy in a WSO2 product instance. These artifacts are usually JAVA-based or XML configurations, designed differently for each product in the WSO2 Carbon platform. You can deploy these artifacts to generate services.

  7. You link to the Salesforce and the Microsoft Dynamics CRM account that you use in this scenario using environment variables. Download this file and change the values of the variables according to your requirements.

     Click here to read more information about the environment variables used in this file...

    "salesforcerest_accessToken" : "00D7F000001bgeT!ARkAQMIj3BLrLwW74YIY8cP50SKAWc3k",
    "salesforcerest_apiUrl" : "",
    "salesforcerest_apiVersion" : "v32.0",
    "salesforcerest_hostName" : "",
    "salesforcerest_clientSecret" : "##############",
    "salesforcerest_clientId" : "#############################",
    "salesforcerest_refreshToken" : "5A613hy0tHCYdhxrWr6MmIbH3FIe4l4lFddmjfLo.K1aIgVEfrgfrACD59HVcUdJzdwefewfewfHI6WyI",
    "salesforcerest_registryPath" : "connectors/salesforcerest",
    "msdynamics365_apiUrl" : "",
    "msdynamics365_accessToken": VlMTAiXX0.bTyWq4NznbAbJqpBKQ6PotrzR6UPxIGHEc95Lr13VGquEyf4HNdOCA",
    "msdynamics365_refreshToken" : "AQABAAAAAAA9kTklhVy7SJTGAzR-VStVQG3uxgpqTvz8_dA6VrUgAA",
    "msdynamics365_apiVersion" : "v8.2",
    "msdynamics365_resource" : "",
    "msdynamics365_clientSecret" : "te576hyjhjk/MkEotJsF8MIleWQdEovHBoprpH9I=",
    "msdynamics365_clientId" : "2972350d-yuio-4614-9ac1-detreyhu",
    "task_interval_time" : "120"

    Here's a description of the properties:

      • salesforcerest_accessToken: access token from salesforce account.
      • salesforcerest_apiUrl :  The apiUrl to access the salesforce REST api.
      • salesforcerest_apiVersion : The version of salesforce REST api.
      • salesforcerest_hostName :  SalesforceOAuth endpoint when issuing authentication requests in your application.
      • task_interval_time : The interval time of the scheduled task in seconds(default 120 seconds). 
      • salesforcerest_clientSecret :  Value of your client secret given when you registered your application with Salesforce.
      • salesforcerest_clientId :  Value of your client ID given when you registered your application with Salesforce.
      • salesforcerest_refreshToken : Value of your client secret, which can be obtained at Google developer console.
      • salesforcerest_registryPath :Registry path of the connector where the values are stored. You must give the value as : connectors/<value>
      • msdynamics365_apiUrl : The API URL of Microsoft Dynamics 365 Web API.
      • msdynamics365_accessToken : The value of the access token to access the Microsoft Dynamics 365 Web API via request.
      • msdynamics365_apiVersion : The API version of the Microsoft Dynamics 365 (v8.2).
      • msdynamics365_refreshToken: An OAuth 2.0 refresh token. The application can use this token to acquire other access tokens after the current one is expires.
      • msdynamics365_resource : The App ID URI of the web API (E.g., "
      • msdynamics365_clientSecret: The secret key of the application that is registered in the Azure AD.
      • msdynamics365_clientId : The client ID of the client application that is registered in Azure AD.

  8. Click the Advanced Setting... link, expand the Environment Variables section, and upload this JSON file that you created in the previous step.
  9. Click the Create button at the end of the form to complete creating the application.
  10. Note that you see the application's Overview page once the application is deployed in the Cloud.

    You have now created an application in WSO2 Integration Cloud. Let's see how to test the scenario.
  11. Go to Salesforce and create a new account and note the following same account records in the Microsoft Dynamics CRM :
     Create a new account (First Test Account) in salesforce :

    You can find the new Account Entity with name First Test Account in your Microsoft Dynamics CRM.

    You have now used the WSO2 connectors in the Connector store to create Account Entity in Microsoft Dynamics CRM with Salesforce Accounts details.

  • No labels