Microsoft Dynamics 365 CRM Integration

Introduction

3CX provides integration with Microsoft Dynamics 365 via the 3CX API for CRM with the following features:

  • Caller ID to Contact Name – inbound calls trigger a Microsoft Dynamics 365 contact lookup.
  • Contact Lookup in Microsoft Dynamics 365 based on Name, Number or Email if you search for a name in the 3CX Webclient
  • Call & Chat Journalling – calls and chats are logged in the Microsoft Dynamics 365 Contact Card as CRM call records.
  • Create a new Microsoft Dynamics 365 contact from the 3CX client for calls from new numbers.
  • Click to Call – launch calls straight from Microsoft Dynamics 365 via 3CX, using the 3CX Click2Call Browser extensions for Google Chrome and Microsoft Edge.

Requirements:

  • ⚠ Important: Numbers must be stored in e164 format. e.g. +18884567890 and not (888) - 456 7890. Storing numbers in Microsoft Dynamics 365 with spaces, dashes, or any non-numeric character except by the plus (+) prefix will mean the contact can’t be matched.

Step 1: Configure Microsoft Dynamics 365

  1. Go to the Microsoft Azure App Registrations page using your Microsoft Dynamics 365 Online account, i.e. “Azure services” > “App registrations”.
  1. Click on “New registration” and complete the app information
  1. “Name” - enter the app’s name, e.g. “3CX Integration”.
  2. “Supported account types” -  leave default or update based on your needs.
  3. “Redirect URI (optional)” - select “Public client/native (mobile & desktop)”. For the Redirect URI enter
    https://my-pbx.example.com/api/oauth2crm
    , using the URL for your 3CX Management Console.
  4. Click “Register” to proceed with the app registration.

Note Application ID and Directory (tenant) ID in Microsoft Dynamics 365 for configuring 3CX.

  1. In the app “Overview” page, note the values of these fields for configuring 3CX later:
  1. “Application (client) ID”.
  2. “Directory (tenant) ID”.
  1. To add the required permissions to access the Microsoft Dynamics 365 Online information, click on “API permissions” > “Add a permission” > “Dynamics CRM”.

Request API permissions for app in Microsoft Azure.

  1. Enable the “user_impersonation” permission and click on “Add permissions”.
  2. Wait for ~10 minutes for the app changes to become available.

Step 2: Configure 3CX

  1. Login to the 3CX Management Console and go to “Settings” > “CRM Integration” > “Server Side” tab.
  2. Select Microsoft Dynamics 365 from the dropdown list.
  3. Enter the values for the Application ID and Tenant, taken from the previous steps. For the domain, enter the URL you use to access your Microsoft Dynamics 365 Online account.
  4. Press the Authorize button to perform the authorization. A new tab will be opened, and you will be requested to grant access to the application you just created.

  1. Press Accept to grant access. The refresh token will be shown under the Authorize button.

Step 3: Configure Call & Chat Journaling

  1. To report external calls and chats to Microsoft Dynamics 365, the email address configured for the 3CX extension must match the email address of a Microsoft Dynamics 365 user. This way 3CX can map the 3CX extension receiving the call or chat to the Microsoft Dynamics 365 user.
  2. If you want to report external calls to the CRM, check the Enable Call Journaling checkbox and configure the parameters below.
  3. Call Journaling parameters are:
  • Call Subject: The subject of the call.
  • Answered Inbound Call: Description for answered inbound calls.
  • Missed Call: Description for missed calls.
  • Answered Outbound Call: Description for answered outbound calls.
  • Unanswered Outbound Call: Description for unanswered outbound calls
  1. Please note that you can use variables in the Call Journaling parameters. Variables are specified between [ ], for example the external number is specified as [Number]. The available variables to use are listed here.

  1. If you want to report chats to the CRM, check the Enable Chat Journaling checkbox and configure the parameters below.
  2. Chat Journaling parameters are:
  • Chat Subject: The subject of the chat session.
  1. Please note that you can use variables in the “Chat Journaling” parameters, denoted as
    [variable_name]
    , e.g. the external number is specified as
    [Number]
    . The available variables to use are listed
    here.

Step 4: Configure Contact Creation

  1. If you want to create new contacts in the CRM when a call is received from an unknown number (not found in both 3CX and CRM), check the “Allow contact creation directly to your CRM using 3CX Web Client” checkbox and configure the parameters below.
  2. Contact Creation parameters are:
  • Create Lead or Contact - The entity to be created (Lead/Contact).
  • New Lead Subject - The Lead subject when a Lead is created.
  1. Please note that you can use variables in the parameters. Variables are specified between [], for example the external number is specified as [Number]. The available variables to use are listed here.
  2. When the caller’s number can’t be matched to a contact, the 3CX client will let the user create the contact by filling the details in a dialog.

Step 5: Click to Call

Microsoft Dynamics 365 renders phone numbers as click to call with Skype links by default, which prevents the click to call functionality from working with 3CX.

In order to solve this, the following configuration must be changed in Dynamics 365:

  • On the upper right corner of the screen go to “Settings” > “Advanced Settings”.
  • Go to “System” > “Administration”, and then “System Settings” to change the following value:
  • Set the telephony provider > Skype for Business / Lync

Once this configuration has been changed, Microsoft Dynamics 365 will render phone numbers as links using the “tel” protocol. Also the Phone icon that Microsoft Dynamics 365 places on the right side of the phone number when editing a contact, triggers a call using the “tel” protocol. This protocol can be handled by the 3CX Desktop App for Windows, so you can use this client to make outbound calls from Microsoft Dynamics 365.

See Also

Last Updated

This document was last updated on 23 September 2023

https://www.3cx.com/docs/dynamics-crm-integration/ 

Discuss this article