Try WSO2 Cloud for Free
Sign in

All docs This doc

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  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 accounts that you use in this scenario using environment variables. Download this file and change the values of the variables according to your requirements.

    titleClick 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"


    If you wanted to send an email alert in case of a failure, set the gmail_alert_to_user property to true and specify the following environment variables:

    Code Block
    "gmail_alert_to_user" : "true",
    "gmail_to" : "",
    "gmail_from" : "",
    "gmail_userId" : "",
    "gmail_accessToken" : "ya29.GlvGBJDbA27tW9f9yyvosfZGL68EYAqi5i_ROMwS7QcI0",
    "gmail_apiUrl" : "",
    "gmail_clientId" : "",
    "gmail_clientSecret" : "yZbHNaM3O1laa8FA6_3Phbaj",
    "gmail_refreshToken" : "1/tvfRH9edFtVylT_AsI4_E98cI9wUbbDuSBhR6Ih4dFU"

    Here's a description of all the properties:

      • salesforcerest_accessToken: Access token from the Salesforce account.
      • salesforcerest_apiUrl: The apiUrl to access the salesforce REST API.
      • salesforcerest_apiVersion: The version of the Salesforce REST API.
      • salesforcerest_hostName: The SalesforceOAuth endpoint when issuing authentication requests in your application.
      • task_interval_time: The interval time of the scheduled task in seconds. The default is 120 seconds. 
      • salesforcerest_clientSecret: The value of the client secret that you get when registering your application with Salesforce.
      • salesforcerest_clientId: The value of the client ID that you get when registering your application with Salesforce.
      • salesforcerest_refreshToken: The value of your client secret that you obtain at the Google developer console.
      • salesforcerest_registryPath: The registry path of the connector where the values are stored. You must give the value as connectors/<value>.
      • msdynamics365_apiUrl: The API URL of the Microsoft Dynamics 365 Web API.
      • msdynamics365_accessToken: The access token used 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 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.
      • gmail_userId: User's mail ID.
      • gmail_accessToken: The access token used to access the Gmail REST API.
      • gmail_apiUrl: The API URL of Gmail (
      • gmail_clientId: The client ID that you get when registering your application with the Gmail API.
      • gmail_clientSecret: The client-secret that you get when registering your application with the Gmail API.
      • gmail_refreshToken: The refresh token that is used to get a new access token when the previous token has expired.
      • gmail_to: The email address of the stakeholder to whom an email alert will be sent in case of a failure.
      • gmail_from: The email address of the sender .
      • gmail_alert_to_user: Optional. If this value is set to true, an email alert will be sent to the stakeholders if in case of a failure.
  8. Click the  Advanced Setting...  link, expand the  Environment Variables  section, and upload the 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 (say First Test Account).

  12. Go to Microsoft Dynamics CRM and find a new account entity by the name of the Salesforce account that you created earlier.