Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

Microsoft Dynamics CRM Connector 3.2 - Mule 4

Anypoint Connector for Microsoft Dynamics CRM enables Mule apps to interact with Microsoft Dynamics CRM’s SOAP Organization Service.

For compatibility information and fixed issues, see the release notes.

Before You Begin

To use this connector, you must be familiar with:

  • Microsoft Dynamics CRM API

  • Anypoint Connectors

  • Mule runtime engine (Mule)

  • Elements and global elements in a Mule flow

  • How to create a Mule app using Anypoint Studio (Studio)

Before creating an app, you must have login credentials for Microsoft Dynamics CRM SOAP Organization Service to test your connection to your target resource.

Any created or expired date in the Web service header created by the Microsoft CRM instance must conform to the constraints specified in the Basic Security Profile validation for Web services, http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.htmlLeaving the Site, as summarized below:

  • A created or expired date must not contain a seconds value with more than three digits to the right of the decimal (milliseconds).

  • A created or expired date that contains a seconds value must specify a seconds value less than 60.

  • A created or expired date must not include the ValueType attribute.

  • A created or expired date must contain time values in UTC format, as specified by the XML Schema type (dateTime).

Add a POM File Depedency

<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-microsoft-dynamics-crm-connector</artifactId>
  <version>x.x.x</version>
  <classifier>mule-plugin</classifier>
</dependency>
xml

Replace x.x.x with the version that corresponds to the connector you are using.

To obtain the most up-to-date pom.xml file information:

  1. Go to Anypoint ExchangeLeaving the Site.

  2. In Exchange, click Login and supply your Anypoint Platform username and password.

  3. In Exchange, search for <connector-name>.

  4. Select the connector.

  5. Click Dependency Snippets near the upper right of the screen.

Add the Connector to a Studio Project

Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange button in the Studio taskbar or from the Mule Palette view.

  1. In Studio, create a Mule project.

  2. In the Mule Palette view, click (X) Search in Exchange.

  3. In Add Modules to Project, type crm in the search field.

  4. Click this connector’s name in Available modules.

  5. Click Add.

  6. Click Finish.

Configure the Connector in Studio

  1. Drag the connector to the Studio Canvas.

  2. To create a global element for the connector, set these fields:

    Online Authentication (Default):

    • Username: Enter the Dynamics CRM username.

    • Password: Enter the corresponding password.

    • Organization Service URL: Enter the corresponding organization service URL.

    • Authentication retries: Enter the desired number of retries for authentication.

    • Disable cn check: Choose if you want to bypass SSL Certificates.

      Credentials configuration

Use Case - Microsoft Dynamics CRM Operations Demo

This demo includes the following options:

  • Return all accounts: http://localhost:8081/accounts

  • Query accounts by name containing a substring: http://localhost:8081/query-accounts?name=li

  • Create a new account with the specified name: http://localhost:8081/create-account?name=your-account-name

  • Retrieve account by ID: http://localhost:8081/retrieve-account?accountid={account-guid}

  • Delete an account: http://localhost:8081/delete-account?accountid={account-guid}

  • Return all contacts: http://localhost:8081/contacts

  • Return all contacts for an account: http://localhost:8081/contacts-by-account?accountid={account-guid}

  • Associate a contact to an account: http://localhost:8081/associate?accountid={account-guid}&contactid={contact-guid}

  • Disassociate a contact from an account: http://localhost:8081/disassociate?accountid={account-guid}&contactid={contact-guid}

  • Create an opportunity: http://localhost:8081/create-opportunity?accountid={account-guid}&contactid={contact-guid}

  • Query opportunities by parent account: http://localhost:8081/opportunities-by-account?accountid={account-guid}

  • Activate an account by executing the SetState operation: http://localhost:8081/activate-account?accountid={account-guid}

  • Deactivate an account by executing the SetState operation: http://localhost:8081/deactivate-account?accountid={account-guid}

  • Create multiple entities in a single request: http://localhost:8081/create-multiple

  • Update the property 'Description' of multiple contacts in a single request: http://localhost:8081/update-multiple

  • Retrieve updated contacts: http://localhost:8081/updated-contacts

  • Delete multiple contacts in a single request: http://localhost:8081/delete-multiple

Use Case Studio Visual Flow

Studio app flows for all accounts, query account by name, and create account
Studio app flows for deleting account, retrieving account, all contacts, and getting associated contacts
Studio app flows for associate contact to account, disassociate contact to account, get opportunities, and create opportunity
Studio app flows for execute and activate account, execute and deactivate account, create multiple contacts, and delete multiple contacts
Studio app flows for updating multiple contacts and retrieving and updating contacts

Use Case XML Flow

View on GitHub