Slider 2TryLearn MoreSlash your Phone bills - Slider Image

Use SIP trunks, WebRTC & Apps

Slash your Phone Bill by 80%

Microsoft Dynamics 365 CRM Integration - Server Side

On this topic:

Introduction

Microsoft Dynamics 365 Online Configuration

General

Call Journaling

3CX CRM Server Side Configuration

General Settings

Call Journaling

Contact Creation

Introduction

3CX provides integration with Microsoft Dynamics 365 online CRM. The configuration is done server side, in an easy and straightforward way. This integration provides many benefits to users of 3CX and Microsoft Dynamics 365, these being:

  • Contact Synchronization – Inbound calls from external numbers trigger a contact lookup in your CRM, and contact details are added to 3CX Contacts. This way, the caller name is automatically shown in your phone display when you receive the call.
  • Call Pop-ups – When using the 3CX Web Client, the customer record is brought up to you automatically when you receive an inbound call.
  • Call Journals – Calls are logged as call records in the CRM.
  • Create a new contact automatically when a call is received from an unknown number.
  • Click to Call – Launch calls straight from Microsoft Dynamics 365 via 3CX, using the 3CX Click2Call browser extensions.

In this guide we will take you through the steps required in order to setup your Microsoft Dynamics 365 with 3CX - server side.

Microsoft Dynamics 365 Online Configuration

General

  1. Login to your Microsoft Dynamics 365 Online account, and go to your Azure Portal to create the app that will be used for authentication. Go to Azure Active Directory > App registrations > New application registration.

  1. Complete the app information. Enter “3CX Server Side” for the Name, Select “Native” for the Application type, and enter “https://MY_3CX_URL/api/oauth2crm” for the Redirect URI, where you need to replace MY_3CX_URL with the URL you use to access your 3CX Console. Finally click on Create.

  1. You will see the details for the app you just created. Take note of the Application ID, as you will need it later when you configure 3CX.

  1. Now we need to add the permissions to access the Microsoft Dynamics 365 Online information. Click on Settings > Required permissions > Add.

  1. Click on “Select an API”, choose the Dynamics CRM Online API, and click the Select button below.

  1. Check all the permissions from the following screen and press the Select button below.

  1. Click on the Done button to complete adding the required permissions.
  2. Next you can remove the “Windows Azure Active Directory” permissions, as they’re not required for this integration.
  3. The application is created and ready to use. However, there is one additional step we need to perform, in order to get the Tenant ID, which will be needed later. To do this, go to Azure Active Directory > App registrations > and click the Endpoints button.

  1. From any endpoint, take note of the Tenant part, as it will be needed later when configuring 3CX. For example, the “OAUTH 2.0 AUTHORIZATION ENDPOINT” looks like this: https://login.microsoftonline.com/dedc4ebb-183f-42e2-9192-92eb425a027d/oauth2/authorize
  2. The Tenant ID in that case is “dedc4ebb-183f-42e2-9192-92eb425a027d”.

Call Journaling

  1. If you want to report external calls to Microsoft Dynamics 365, you need a field on the User entity to specify the agent extension number. You can use an existing field, or you can create a custom field for this. This way 3CX can map the extension number of the agent that received the call to the Microsoft Dynamics 365 user. Information on how to add custom fields can also be found here.
  2. Customization rights are necessary to create custom fields as explained here.
  3. On the left of the page go to Settings > Advanced Settings

  1. On the new screen Select Settings > Customization > Customizations.

  1. Select Customize the system

  1. On the left side bar go to Components > Entities > User > Fields, to show a list with all the User fields.
  2. In case you want to use an existing field to hold the extension number, take note of the Name of that field and jump to step 10.
  3. In case you want to create a new field press new on the upper left corner.

  1. On the window that will appear, specify the Display Name and the Name of the field. Please take note of the Name of the field. Then set the “Type of data” to “Single text line”, as shown below, and press Save and close.

  1. Press Publish All Customizations on the upper left corner of the page.
  2. Once the field is created, it needs to be added to a form. Go to Components > Entities > User > Forms, and double click the form that will include the new field to customize it.
  3. Select the Extension field from the field explorer, and drag it to the desired location on the user form.

        

  1. Press Save and close, and then Publish All Customizations.
  2. Select Settings > System > Security.

  1. Click the Users icon to show the Users list.

  1. Open the Users for whom you need to report calls, and populate the newly created field with the extension number.

3CX CRM Server Side Configuration

General Settings

  1. Login to the management console > Settings > CRM Integration > Server Side tab.
  2. Select Microsoft Dynamics 365 from the dropdown list.

  1. 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.
  2. 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.

Call Journaling

  1. If you want to report external calls to the CRM, check the Enable Call Journaling checkbox and configure the parameters below. Please note that this feature is only available for 3CX v16 and later installations.

  1. Call Journaling parameters are:
  • Extension Field ID: The unique id (Name) of the User Form entity field created in the previous step, that holds the extension number of the agent. This parameter must be set when call journaling is enabled. This parameter is used to map the 3CX extension receiving the call to a Microsoft Dynamics 365 User, and assign the call to that specific User.
  • 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 are:
  • CallType - The type of call, it can be “Inbound”, “Outbound”, “Missed”, or “Unanswered”.
  • Number - The external contact number (the number dialed for outbound calls or the caller number for inbound calls).
  • Agent - The extension number of the agent handling the call.
  • Duration - The duration of the call in “hh:mm:ss” format.
  • DurationTimeSpan - The duration of the call as a TimeSpan object, which can be formatted as the user wants.
  • DateTime - The start date & time of the call, in local time zone, formatted using the local culture from the 3CX server.
  • CallStartTimeLocal - The start date & time of the call, in local time zone, as a DateTime object, which can be formatted as the user wants.
  • CallStartTimeUTC - The start date & time of the call, in UTC time zone, as a DateTime object, which can be formatted as the user wants.
  • CallEndTimeLocal - The end date & time of the call, in local time zone, as a DateTime object, which can be formatted as the user wants.
  • CallEndTimeUTC - The end date & time of the call, in UTC time zone, as a DateTime object, which can be formatted as the user wants.

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 Enable Contact Creation checkbox and configure the parameters below. Please note that this feature is only available for 3CX v16 and later installations.

  1. Contact Creation parameters are:
  • Create Lead or Contact - The entity to be created (Lead/Contact).
  • New Contact First Name - The first name of the newly created Contact.
  • New Contact Last Name - The last name of the newly created 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 are:
  • Number - The external contact number (the number dialed for outbound calls or the caller number for inbound calls).

Free for up to 1 year! Select preferred deployment:

On-Premise

for Linux on a $200 appliance or as a VM

Get the ISO

On-Premise

for Windows as a VM

Download the setup file

On the cloud

In your Google, Amazon, Azure account

Take the PBX Express