V3 Microsoft Dynamics 365
How It Works
Microsoft Dynamics 365 integration is used to automatically open a ticket for every call, according the conditions (Queue, Call status or Outbound) set in the trigger.
The ticket will be populated with information about the call and displayed for the agent in the Dynamics 365 environment.
The following are list of things you have to do to make the integration work:
- Activate Dynamics 365 and its Admin account
- Create Dynamics 365 Users on Office 365 Administration Panel
- Register the Dynamics 365 XCALLY Motion integration on the Company Azure Active Directory (AKA tenant) to obtain the data keys for the integration
- Create V3 Triggers (Tools → Triggers), set the conditions you want to trigger the integration and add integrations action (for info see V3 Voice Triggers) by selecting: dynamics 365 integration, the account you have configured and the configuration you want to use.
At the end of the configuration steps, every time there is an outgoing/incoming call, the trigger conditions are checked and a Dynamics 365 ticket is created and assigned to the Agent managing the call (if the conditions are met).
Any interaction occurred through this integration can be searched by the Agent from the list by:
- contact's telephone1
- user's email
Configuration Steps
Follow the next steps to configure the integration between XCALLY Motion and MS Dynamics 365.
Create Application Profiles on Office 365
To activate the integration, you must register it as a new company application on the Microsoft Azure Organization profile (https://portal.azure.com) and create one or more System Administration profiles. These will be the user profiles that can create contacts and tickets instances on Dynamics365: one of those profiles should be created specifically for the Motion Integration, in order to create contacts and tickets, but in a remote way from XCALLY Motion.
To create Microsoft profiles for your company Dynamics365 instance, go to the Administration environment inside Office 365:
and enter the Microsoft 365 Admin Center, where you will find the accounts previously created.
Now you can create other profiles (Add Users), as many as needed, for your agents:
You must now assign product licenses (the main license you have to manage is Customer Engagement Plan, but you can add more):
The user registered on Dynamics must be at least a Dynamics Service Administrator (that can enter the Dynamics365 platform to read the created items) or a General Admin User:
You can review any value of the user profile before saving:
Remember: there must be at least one General Administrator role UserId to manage all the others profiles.
You can for example reserve the System Administrator Role to the Application itself (e.g. in our case, motion@xcallyteam.onmicrosoft.com): in other words, the UserId that will be used on Xcally Motion to create a Dynamics365 Integration account
Register the application on company Azure Active Directory
To obtain the data keys useful to complete the integration configuration on XCALLY Motion, the Dynamics365 application must be registered on Azure, inside the company Azure Active Directory:
Go to https://portal.azure.com, login with your WindowsLiveId (the one obtained when registered on Dynamics365), and open the Dashboard.
Click on Azure Active Directory:
Switch on the profile chosen for the integration (eg. in our case, Xenialab) than go to Users to see all the integration users you have created:
Check the Licenses menu of each user, to control if Dynamics365 Customer Engagement Plan is properly configured:
Now you have to implement the XCALLY Motion Dynamics Integration registration on Azure. Go to App Registration and click on New Registration:
and the application is registered. Here you can manage the list of all applications registered on Azure by your company:
Remember to take note of the data-keys generated after app registration: XCALLY Motion integration with Dynamics365 needs Application Client Id and Directory (Tenant) Id to work.
Now, follow the next configuration steps:
- go to API permission, and give administration privilege to the Tenant folder (eg. in our case, Xenialab): specific permission to read, sign, access information (data, profiles) on Azure
- grant the Tenant permission to access the common data service of Dynamics CRM (or no REST operations will be possible).
One of the data-keys required to configure Dynamics365 integration on XCALLY Motion is the ClientSecret code for the System Admin profile, used to allow to the XCALLY Integration Account to remotely connect to Dynamics365 WebAPI in order to perform REST operation.
Go to Certificates & Secrets to create one or more client_secret:
Another data-key is required to implement the Integration on Motion: that is the weburl of the company Dynamics365 installation.
Simply copy the URL domain from the browser: https://[companyprofile].[crm_region_version].dynamics.com (eg. In our example, this is https://xcallyteam.crm4.dynamics.com/).
Now we can create a Microsoft Dynamics365 Integration Account, having all the required data-keys: username (e.g. motion@xcallyteam.onmicrosoft.com ), password, ClientId, TenantId, ClientSecret, weburl (e.g. https://xcallyteam.crm4.dynamics.com/ ).
The Dynamics 365 Accounts Section
From Integrations Menu, there is the Dynamics 365 Accounts Section :
Create a Dynamics 365 Account
To create a new Dynamics 365 Account click on
From the Accounts list, click on the icon and it is possible to:
- Edit Dynamics365 Account
- Test Dynamics365 Account
- Delete Dynamics365 Account
- Modern Authentication: Enable the Modern Authenitication for the Dynamics365 Account
- Username: the WindowsLiveId of the user with System Administration main privileges. As said before a good practice is to create an administrator user profile for the integration Account in itself (XCALLY Motion). In our example, it’s motion@xcallyteam.onmicrosoft.com
- Password: the same one used to login inside Microsoft site, Office365, Dynamics365 and Azure as a Dynamics365 user
- URL: the web location of Dynamics365 CRM installation (in our example https://xcallyteam.crm4.dynamics.com/)
- Tenant Id: the id code of the company directory on Azure, AKA ‘Tenant’. You can find it on the Azure Site > Azure Active Directory > App Registration > the application (in our example it is Motion Dynamics 365)
- Client Id: the application specific registration Id on Azure. You can find it at the same address of the Tenant Id
- ClientSecret: the secret code to obtain access to web api Rest operations. It is not the authorization token, but it is used to create the token during web api login remote calls (XCALLY Motion will perform all the job for you, but you must provide that code here). You can retrieve it, as explained before: go to Azure > Azure Active Directory > App registration > the App > Certificates and Secrets. Generate (if not done before) and copy the Client Secret
- Motion or Proxy Address: it is reqired if you want to fill the ticket body with Recording URL.
- Description: optional descriptive field
Edit a Dynamics 365 Account
Account
You can edit all the information entered during the Account creation phase.
Here you can find an Example:
Configuration
Now let’s customize our integration: From the Configurations section, click on the plus button to open the Create Configuration menu:
Set configurations for the action triggered by the telephone call event: choose a Name, a channel (Voice), a Type (Inbound = customer-to-agent call, Outbound = agent-to-customer call).
The Dynamics365 peculiarity consists in the possibility of choosing between:
- Case (a CRM ticket based on a timeline, to manage the whole case in a period of time, from the real start to the definitive solution)
- Phonecall (a simple CRM ticket, that reports all the phone-call information in a snapshot).
Once the configuration is created, we can choose the custom fields, built on Dynamics365 by the System Administrator User to customize the schema of cases and phonecall objects, in order to manage specific company additional information needs. To retrieve them, go to Fields tab, and click on plus button:
XCALLY Motion will do a remote call to Dynamics365 database to retrieve all the fields: choose one, select (or write) its value, and pass to another field.
Under Standard Fields you will find Dynamics365 ‘default’ data used to create the ticket: if you choose Case as a ticketType, you’ll find Case fields, if Phonecall, you’ll find PhoneCall fields instead. You’ll also find your custom fields, if any of them exists.
Advanced
Tab
If the integration trigger is active (see next paragraph), when the Agent answers to a Voice channel call, then a Case/Phonecall is automatically created and opened in the Dynamics365 Account in a new browser tab by default.
Deactivating the toggle button, you can choose not to automatically open a new tab in the agent's browser for Microsoft Dynamics 365 Integration. The Agent will still see the Case/Phonecall created in his Dynamics365 Account.
Contact
- When a ticket is opened in Dynamics365, if the contact of the interaction is already saved, the ticket will be associated to the saved contact.
The contact will be searched in Dynamics365 by the default parameter telephone 1.
A different parameter can be set in the "Additional Search Contact " field to search for the contact in Dynamics365.
In the example: the contact will be searched by mobile (and not by telephone 1).
- Whether the contact is not saved on Dynamics365, it is possible to choose:
- Create a new contact (Select Advanced→ Module create → Contact)
- Not to create a new contact (Select Advanced→ Module create → Nothing)
Create a Trigger
It is mandatory to create a trigger to make the Dynamics 365 integration work. Let’s see how to setup the action triggered by the Voice Channel phonecall in order to create Case and Phonecall tickets on Dynamics365 CRM.
Go to Tools > Triggers. Create a new trigger, give it a name and then edit it. Remember to set the trigger status as Active (blue) under the Settings section:
Now choose the Conditions and Actions to apply to the trigger:
(eg. Queue Equals Sales, Call status equals Answer, and so on).
The last step is the Action configuration:
You need to choose Action (Integration), Integration (Dynamics365), Account (the name of one of your implemented accounts; in our example, Motion Dynamics 365), and one of the configurations you created before (in our example, the ‘Dynamics365 Configuration Inbound Phonecall’ one).
From now on, anytime the Agents manage phonecalls with a contact, this will trigger an XCALLY Motion REST Api action that will remotely create contacts ( if set) and tickets on Dynamics365.
These will be shown in a new browser window (tab) as soon as they are created.