Voice for Dynamics 365 configuration guide
This section describes the installation and configuration of the Voice for Dynamics 365
Contents
- 1 Contents
- 2 1 Microsoft Dynamics 365 tenant level configuration
- 2.1 1.1 Installation Prerequisites
- 2.2 1.2 Configure Azure app registration
- 2.3 1.3 Install Voice for Dynamics 365 package to Dynamics 365 Instance
- 2.4 1.4 Configure application user in D365
- 2.5 1.5 Voice for D365 Configuration
- 2.5.1 1.5.1 Channel Provider Configuration
- 2.5.2 1.5.1.1 Configuration for Channel Integration Framework 1.0
- 2.5.3 1.5.1.2 Configuration for Channel Integration Framework 2.0
- 2.5.4 1.5.2 General Settings
- 2.5.4.1 1.5.2.1 Callback Sync Settings
- 2.5.4.2 1.5.2.2 Common Azure Settings
- 2.5.4.3 1.5.2.3 General settings
- 2.5.4.4 1.5.2.4 Omnichannel Settings
- 2.5.4.5 1.5.2.5 Phone Call Sync Settings
- 2.5.5 1.5.3 Users
- 2.5.6 1.5.3.1 Update Enreach Cloud User ID
- 2.5.7 1.5.3.2 Assign users to Agent Experience Profile (CIF2)
- 2.5.8 1.5.4 Phone Call Synchronization (Enterprise Calls)
- 2.5.9 1.5.5 Callback Synchronization
- 2.5.10 1.5.5.1 Synchronization methods
- 2.5.10.1 Setting up polling sync
- 2.5.10.2 Setting up webhook sync
- 2.5.11 1.5.6 Dynamics 365 apply Phone call form
- 2.5.12 1.5.7 Dynamics 365 Click-to-Dial configuration
- 2.6 1.6 Smart Routing in Voice for Dynamics 365
- 2.7 1.7 Omnichannel user presence integration
- 2.8 1.8 Test Voice for Dynamics 365 functionality
1 Microsoft Dynamics 365 tenant level configuration
The guide applies to Voice for Dynamics 365 version 1.0 onwards.
Voice for D365 is suitable for three different scenarios from the viewpoint of how Dynamics is configured, depending on what capabilities of Dynamics 365 the customer wants to use.
These are:
Used in a classic model driven app (CIF1)
Used in a multisession app (CIF2)
Used in a multisession app with Omnichannel (CIF2)
The way how Dynamics must be configured and what components need to be installed or provisioned are different.
The following table visualizes the steps that need to be carried out.
| CIF1 | CIF2 | CIF2 + |
Configure Azure App Registration | X | X | X |
Provision Omnichannel |
|
| X |
Install Channel Integration Framework from AppSource | X | X |
|
Install Voice for D365 package | X | X | X |
Configure Application User in D365 | X | X | X |
Configure Agent Experience Profile |
| X | X |
Assign users to Agent Experience Profile |
| X | X |
Update Enreach Cloud User ID | X | X | X |
Click-to-Dial configuration | X | X | X |
1.1 Installation Prerequisites
A functioning Microsoft Dynamics 365 tenant with the needed Dynamics 365 target instances (environments) for installation.
Microsoft Dynamics 365 Unified Interface (Online version).
Required suitable Microsoft Dynamics 365 licenses for single-session Customer service Apps (CIF 1.0) or multi-session e.g. Omnichannel for Customer Service and Customer Service Workspace App use (CIF 2.0).
https://dynamics.microsoft.com/en-us/pricing/customer-service/#plans
Install Channel Integration Framework in your target environment, or
Provision Omnichannel
Note: Please send your Microsoft Dynamics 365 environment URL-information to your Enreach contact before installation.
1.1.1 Setting up Channel Integration Framework
This setup is used for customers who are using
a single-session Dynamics 365 model-driven apps, such as:
Dynamics 365 Customer Service
Dynamics 365 Sales
Dynamics 365 Project Service
Dynamics 365 Field Service, or
have Dynamics 365 Enterprise license and want to use Customer Service Workspace multi-session app without Omnichannel capabilities
Install Channel Integration Framework in your target environment. The following documentation from Microsoft describes the steps which need to be carried out, in addition a few screenshots help to guide the installation.
1.1.2 Provision Omnichannel
This section applies to customers that use Omnichannel capabilities in Dynamics 365, have Digital Messaging or Chat licenses and want to use Voice for D365 in a multi-session app, like:
Omnichannel for Customer Service
Customer Service Workspace
To provision Omnichannel please follow the material provided by Microsoft:
https://docs.microsoft.com/en-us/dynamics365/omnichannel/administrator/omnichannel-provision-license
1.2 Configure Azure app registration
For Voice for Dynamics 365 to work, an Azure App registration is needed for authentication purposes. Giving access to your D365 though an Azure App registration does not consume D365 licenses.
Creating app registration
Configuring Azure App registrations is done by the following steps:
Sign in to Azure portal (https://portal.azure.com) From the navigation menu, choose Azure Active Directory and Application registration Choose New Registration from top of the page
| Figure 4 Create App Registration |
Fill in a name, for example Voice for Dynamics 365 for the app registration. All the other settings can be left as default. Choose Register.
| Figure 5 Register an Application |
Once deployment is done, you should see a similar window than below:
App registration needs API permissions to be able to authenticate to your Dynamics 365 environment. | Figure 7 Select API Permissions |
Choose Add a permission
Select Dynamics CRM from the pop-up window
Tick user_impersonation selection and choose Add permissions
Creating a Secret for app registration
For authentication purposes, a client secret is needed.
Since Microsoft limits the expiration of secret keys created on the user interface to 2 years, the client secret should be added using Azure PowerShell or Azure CLI script.
Navigate to main properties of App Registration by clicking Overview on the left
Copy the value of Object ID attribute to clipboard
Replace OBJECT_ID in the following script with the copied value
Connect-AzureAD
$startDate = Get-Date
$endDate = $startDate.AddYears(100)
$aadAppsecret01 = New-AzureADApplicationPasswordCredential `
-ObjectId OBJECT_ID `
-CustomKeyIdentifier 'Voice' `
-StartDate $startDate `
-EndDate $endDate
Write-Output $aadAppsecret01
Running Azure Powershell via Cloud Shell in Azure portal
Open Cloud Shell by clicking the icon on top menu bar
Paste the script and hit Enter. A client secret is created with 100 years expiration.
Save the secret key value into a secure place as it is not visible afterwards.
Once secret key is created, send the following details to Enreach:
secret key value
application id
directory id (from overview page)
Enreach will then deploy back-end components for integrations to work.
After the Azure App registration is completed, next step is to Install Voice for Dynamics 365 package and set up an application user in Dynamics 365.
1.3 Install Voice for Dynamics 365 package to Dynamics 365 Instance
Install Voice for D365 managed package provided by Enreach and login to appropriate Microsoft Dynamics 365 organization with System Administrator credentials.
VoiceForD365Package contains the following:
The package contains solutions with base entities, configuration data and settings, links for the Azure apps/functions.
Voice channel provider
Multisession configuration data (session, notification templates) are to be installed within the solution package automatically. Note: for the Channel Integration Framework v2.0 only
1.3.1 The installation process for the customer’s administrator
The incoming zip package should be unblocked and unpacked
Right-click on the zipped package and verify that the archive is not blocked. If it is, unblock and then apply. Otherwise, an error might occur during the deployment (no solution found).
Next, navigate to the unpackaged folder, run PackageDeployer.exe, and follow through the installation wizard.
The wizard will guide the user through all the needed steps for installation.
PLEASE NOTE: All future updates after the first installation are also done with the Package Deployer / Wizard!
1.4 Configure application user in D365
Please complete Azure App registration before proceeding to configuring the application user in Dynamics 365.
Navigate to Power Platform admin center and sign in as System Adminstrator
Click Environment on the top-left and select the environment from the list.
Click Settings on the top ribbon.
Click Users + permissions, and then select Application users.
Click New app user on top ribbon.
Click Add an app and select the application created in chapter 1.2 Configure Azure app registration.
Select a Business Unit from the drop-down list. It is recommended to select the root business unit.
Click
next to Security roles.
Select Voice ApiUser role.
Click Save to select the role.
Click Create to create the application user.
1.5 Voice for D365 Configuration
Configuration settings are divided on the following parts
1.5.1 Channel Provider Configuration
1.5.1.1 Configuration for Channel Integration Framework 1.0
Open Dynamics and open Channel Integration Framework App:
This configuration is used for customers not using the multisession capabilities and do not use Omnichannel licensing in their Dynamics 365 environment.
Channel integration configuration record with settings is to be created with deployment package during the installation but needs to fill in access-based settings:
Select which Apps and User Roles will have access to the channel provider.
See more about Channel Integration Framework configuration:
1.5.1.2 Configuration for Channel Integration Framework 2.0
Channel configuration for CIF2 is maintained by the Deployment Package. However, the channel itself must be added to an Agent Experience Profile.
To do it,
|
|
---|
1.5.2 General Settings
The “General Settings“ view allows you to configure aspects affecting functionality within the Dynamics solution, as well as the background resources such as phonecall synchronization
1.5.2.1 Callback Sync Settings
Settings related to background tasks synchronizing callback records
CallbackRequestDefaultSubject
Default - “Callback Request“
Default subject of callback requests. Can be amended freely
CallbackRequestRecipientRule
Default - “Queue“
Defines if the recipient (“to” field) of callback requests should be the referenced queue or the owner of that queue. Valid values:
QueueOwner: “to” field points to the owner of queue
Any other value: “to” field points to the queue referenced by the callback profile
1.5.2.2 Common Azure Settings
Settings on integrating Azure services with the CRM environment. Set initially during installation process, and generally not meant to be manually configured
BeneApiProxyService
Default - Set during install
Points to the environment specific Azure proxy resource
QueueMsgReceiver
Default - Set during install
Points to the environment specific Azure listener resource
1.5.2.3 General settings
Settings that affect functionality within the dynamics solution
CallbackCloseIncludeAttempts
Default - False
Boolean value. Specifies if all calls (including callback attempts) are closed by Close All button on callback request Phone Call form
True: All phone calls of the bundle will be closed, including all callback requests and all attempts of all requests of the bundle
False: Only callback requests are closed
CallIncomingDefaultSubject
Default - “Incoming call“
String value. Subject for answered incoming phone calls
CallOutgoingDefaultSubject
Default - “Outgoing call“
String value. Subject for answered outgoing phone calls
CRMMultipleMatchesPickFirst
Default - False
Boolean value. Controls if the first customer (contact or account) should be picked creating a phonecall when multiple customers were found by phone number within the CRM
False: Caller field is left empty in case of duplicates. User needs to choose the desired contact manually
True: First one of the contacts is picked
NumbersToCut
Default - 4
Integer value, defines the number of characters to be cut off from the start of the phone number, before searching in D365
SearchPhoneFieldsAccount
Default - Empty
String value. List of schema names of the phone call fields to be used in the search for account
SearchPhoneFieldsContact
Default - Empty
String value. List of schema names of the phone call fields to be used in the search for contact
When set as empty, “mobilephone” & “telephone1” are selected
ShowFetchButton
Default - False
Boolean value. Control if user can see “Fetch ongoing calls” button.
When enabled, button appears and there is possibility to retrieve an ongoing call information to CRM
UseExactPhoneNumberSearch
Default - False
Boolean value. Determined whether exact phonenumber search is used
When enabled search is faster but, requires phonenumbers to be stored in international format
WebRTCPluginResourceName
Default - Empty
String value. Name of webresource which implements custom JS phone plugins
Generally doesn’t need to be configured
WebRTCVersion
Default - Empty
String value. Can be defined to load a specific version of the embedded Voice for Browser webphone
If a value isn't defined, a version specific to each version of the Enreach dynamics solution will be loaded instead
Available versions: https://phone.enreachvoice.com/versions.html (Example: 2025.1.0)
1.5.2.4 Omnichannel Settings
Settings on configuring the templates utilized by CIF2 omnichannel functionality. Generally doesn’t need to be manually configured.
NotificationAccessDenied
Default - “ben_accessdenied“
String value. Unique name of the notification template is shown when a user does not have the proper configuration
NotificationIncomingCall
Default - “ben_notificationincoming“
String value. Unique name of the notification template to be shown when an incoming call comes
SessionCallIdentified
Default - “ben_callcomingidentified“
String value. Unique name of the session template for an incoming call when the caller is identified (Account or Contact)
SessionCallUnidentified
Default - “ben_callcomingunidentified“
String value. Unique name of the session template for an incoming call when the caller is unidentified (Account or Contact)
SessionDefault
Default - “ben_sessiondefault“
String value. Unique name of the default session template to be created when the omnichannel is opened
TabRecordTemplate
Default - “ben_entityrecord“
String value. Unique name of the application Tab Template which is to be used for opening created PhoneCall record
1.5.2.5 Phone Call Sync Settings
Settings that affect how phonecall activities are synchronized in background tasks from Enreach Core to the CRM dataverse
CallDurationLimit
Default - 0
Minimum duration of calls (in seconds). If the duration of a call is below this limit then the call is not synchronised to Dynamics
CallStartMargin
Default - 15
Value in seconds, used to set a range of searching existing phone calls, to avoid creating duplicates
DefaultCrmAssignee
Default - Empty
Enreach user id, which is set as the owner of a phone call, in case user Enreach user was not found in D365. Current value e.g. fbc423f5-74f9-e911-80e0-…
The value can be any Enreach user id (ben_benemenuserid) chosen by the customer organization
Defaults to API user’s id when empty
EnableAudit
Default - True
Boolean value, which defines to set in Enreach Api Audit field of a phone call in D365. In case it is false, the field will be set as CallId is {Enreach call id}, in other cases, all the values retrieved from the Enreach regarding this phone call will be set
EnableMultipleMatchCreate
Default - True
Boolean value, which defines if service calls should be created when multiple contacts/accounts/leads found in synchronization
If “MultipleMatchesPickFirst“ is false, call will be created with empty contact information
ExecutionInterval
Default - 5
Value in minutes, which is taken from execution start and set into start date for phone calls retrieval from Enreach API
IncomingDirectCallSubject
Default - “Incoming direct call“
String value, defines the subject of a direct phone call.
IncomingQueueCallSubject
Default - “Incoming queue call“
String value, defines the subject for service phone calls
MultipleMatchesPickFirst
Default - False
Boolean value. When set to true, the first account or contact is picked by Enterprise Call Sync and Callback Sync if multiple accounts/contacts found
Overrides “EnableMultipleMatchCreate“, since a contact is always selected for numbers with multiple contact records
MultipleMatchPhoneCallStatus
Default - 1
Integer value, which should exist as status reason value of phone call in D365. Set when multiple contacts/leads/accounts found and EnableMultipleMatchCreate is true
OutgoingDirectCallSubject
Default - “Outgoing direct call“
String value, subject for outgoing phone calls
OutgoingQueueCallSubject
Default - “Outgoing queue call“
String value, subject for outgoing phone calls made with a queue role
ProcessDirectCalls
Default - True
Boolean value, defines whether direct answered calls should be retrieved and processed
ProcessServiceCalls
Default - True
Boolean value, defines weather service answered calls should be retrieved and processed
ProcessServiceCallsUnanswered
Default - True
Boolean value, defines weather service unanswered calls should be retrieved and processed
RunInDebugMode
Default - False
Boolean value. When set true, the start date of phone calls retrieved from Enreach API is execution date - 45 days and the end date is now
SkipCallSynchronizationForUnknownCallers
Default - True
Boolean value. Controls whether calls from phonenumbers without a corresponding contact/account/lead entity in the dataverse should be synchronized or not.
True = Calls from unknown numbers will not be synchronized
False = Calls from unknown numbers will be synchronized
1.5.3 Users
1.5.3.1 Update Enreach Cloud User ID
Open Voice Configurator App
Changing any of the followings automatically triggers Enreach user ID update:
Setting Enreach Cloud User Email
Assigning Voice User role
User IDs can be updated manually as well:
Navigate to Users Settings and choose Update Enreach User Ids –button (at the top of the page)
Wait couple of seconds and Enreach User Ids should appear on the user list for the users that have same email address than in Enreach Cloud.
After updating the ids, if some user is missing the Enreach User id, then you need to manually update the correct Enreach Cloud Email to Enreach User Email field on the user record:
Enreach User Id – unique identifier of the user in Enreach Cloud
Enreach User Email (optional) - should be filled in if email user in D365 differ from Enreach Cloud
1.5.3.2 Assign users to Agent Experience Profile (CIF2)
After creating the Agent Experience Profile and Customer Service Admin Center (see chapter 1.5.1.2 Configuration for Channel Integration Framework 2.0), users who will be authorized to use the phone widget need to be assigned to the Agent Experience Profile.
To do this, click Edit next to the user list on Agent Experience Profile page.
On the Edit Users pop-up, click Add users.
Select the user from the list you want to add to the Agent Experience Profile. You can also search for the user in question.
Click Add at the bottom of pop-up.
1.5.4 Phone Call Synchronization (Enterprise Calls)
Phone Call Synchronization settings are in General Settings -> Phone Call sync settings view:
Phone call synchronization Azure WebJob runs continuously and executes once every minute
Important to note
If DefaultCrmAssignee setting is left empty, it will default to the environment’s ApiUser
It’s best practice to set this setting value manually to one that you prefer
When synchronizing phone calls, the following fields are set based on the identity of the user who made or answered the call within the organization:
Owner
Activity party (Call From/Call To, based on call direction)
If the user who made the phone call is not a Dynamics user, a fallback (default) user is set to the fields above. The value of DefaultCrmAssignee setting determines this fallback user.
The value of this setting must be the Enreach Id (NOT Dynamics CRM Id) of the fallback user. It can be any user with an Enreach Id - either a real or a technical user. To avoid any confusion to the users (because of a different user appearing on a call than who actually made that call) it is recommended to set the Id of API user (or any other technical user):
Open Voice for D365 Configurator app
Navigate to User Settings
From the list, find your API user (see 1.2 Configure Azure app registration)
Open the user record and set the Enreach email of API user to Enreach Cloud User Email (e.g. mycompany.apiuser@mycompany.com). Enreach support can help you to have this value.
After saving the record, Enreach Cloud User Id of the user gets populated
Copy the id
Navigate to General Settings -> Phone call Sync Settings -> DefaultCrmAssignee
Paste the id to Value field and save the record
At night, between 10:00PM and 11:30PM UTC a so-called retroactive call synchronization is carried out. The exact time of execution is picked randomly to avoid overloading the back-end infrastructure by executing simultaneously for multiple environments.
Retroactive sync retrieves all calls from Enreach API wich were made in the past 24 hours. Then tries to create the calls in CRM. As a result, if a user adds a contact or account with identical phone number to CRM after the call was made but before retroactive sync kicks in, such calls will be synced at night.
Note: Users mobile number needs to be saved to User form in Dynamics 365 for all users that are going to need their phonecalls to be synced from mobile to Dynamics 365. By default calls that are classified as Work calls (Call information Privacy setting in Voice Center side) are synchronized. Unclassified and Private calls are not Synced to D365.
1.5.5 Callback Synchronization
Callbacks are synchronized from Enreach API into Dynamics 365 by an Azure WebJob, hosted in Enreach’s Microsoft Azure tenant, maintained by Enreach. Application retrieves callback requests from Enreach API, transforms data into corresponding D365 format, maps to D365 contact/account/lead, and creates corresponding phone call records in D365.
Callback synchronization Azure WebJob runs continuously, similarly to call synchrnonization. After executing the business logic, it sleeps for 60 seconds. It means that in practice synchronization runs nearly every minute.
Callback functionality can be configured for organizations that receive callback requests e.g. for Sales or Customer Service purposes to reconnect with the customer at a more suitable time.
Callback Syncronization configuration
Note: Callbacks can be configured only after you get a confirmation from Enreach.
By going to General Settings area within Voice for D365 Configurator app and selecting Callback Sync Settings view, the default subject of callback request phone call activities can be adjusted by amending the value of CallbackRequestDefaultSubject setting.
Besides the global setting, a subject can be specified on callback profile-level as well (see below), which overrides the global setting.
To configure callbacks in Dynamics 365, at least one callback profile needs to be added with the following (example) settings:
Callback List
Lookup to a virtual entity, which is retrieved from Enreach API.
Queue
Lookup to OOB D365 entity Queue. Defines to which queue callbacks should be assigned to.
Ownership Rule
Controls how callback requests are assigned to users
API User: Callback requests will be owned by the API user (application user)
Owner of Queue: Owner of callback requests will be identical to owner of target queue
Phone Call Subject
The subject set to phone calls created by the integration. It can optionally be specified here, on callback profile level
If no value is given then the global setting is used (see above)
Duplicate Handling Rule
Specifies how multiple callback requests from the same number are handled
Bundle calls: All callback requests are synced to Dynamics. If at the same time more than one open callback requests exist, the calls are linked to each other and can be seen on Phone Call form.
Ignore additional calls: Additional callback requests from the same number within the same call queue are ignored, only one callback request is created in Dynamics
Synchronization method
See chapter 1.5.4.1 Synchronization methods
Age Time Unit
A unit of the time-period, can be Days, Hours or Minutes
Controls the size of time window when querying callbacks from Enreach API
Visible in case of certain synchronization methods only
See chapter 1.5.4.1 Synchronization methods.
Callback Age
Number value of defined periods in the previous field
Visible in case of certain synchronization methods only
See chapter 1.5.4.1 Synchronization methods
All active callback profiles will be proceeded during execution of the callback synchronization job.
Global callback settings configurable within Voice for D365 Configurator app’s General Settings -> Callback Sync Settings:
1.5.5.1 Synchronization methods
Callback integration supports two ways to bring callbacks to Dynamics: polling (Dynamics reaches out to Enreach API on a regular basis to fetch callbacks) and webhook (Enreach API pushes callbacks right after creation).
Synchronization Method field of callback profile controls how the callbacks are getting synchronized.
Polling: Dynamics fetches callbacks from Enreach API every minute. The age of callbacks retrieved is specified by Age Time Unit and Callback Age fields.
Webhook: Enreach API pushes callbacks to the webhook listener web service of Voice for Dynamics 365. Provides more efficient operation in case of large number of callbacks.
Webhook backed with polling: Same as webhook, but polling on a regular basis is also active as a backup. If callbacks are for any reason left behind by webhook sync, the service executed on a regular basis will still synchronize those.
Setting up polling sync
This section applies to synchronization methods Polling and Webhook backed with polling.
The value of Age Time Unit and Callback Age have an influence on performance; the wider the time window, the more data the component will have to handle on each execution. Callback synchronization is triggered every minute, therefore, in a production environment (where it is likely to have more calls) doesn’t make sense to set the value to more than one hour. In QA and DEV environments it may be longer, several hours or even days.
Callback Synchronizer service caches the settings, refreshing the cached data every 60 minutes. It means that any change to callback configuration (activating-deactivating callback profiles, creating new ones, amending any detail) will take place at the next refresh (within max. 60 minutes).
No other actions are needed to set up polling sync. After the callback profile has been created and the service picked up the new settings, synchronization starts automatically.
Setting up webhook sync
Webhook synchronization is not enabled on the back-end services by default. To make webhook sync work, additional actions must be taken by Enreach staff to configure integration through webhook listener.
If you would like to utilize this synchronization method, please contact Enreach support.
1.5.6 Dynamics 365 apply Phone call form
Voice for D365 – Phone Call form should be chosen as the main form for the Phone Call entity. Please consider if your organization has done customizations to the phone call forms.
Navigate to customize the Unified Interface App (one or many) that your organization uses in your Dynamics 365 environment.
Open in App Designer (click the three dots on the right-side corner of the App)
Add Phone Call table to the list of pages, if it is not already included
Change the Main form to Voice for D365 – Phone Call
Include Quick View and Quick Create Forms to the app solution.
Save and Publish
1.5.7 Dynamics 365 Click-to-Dial configuration
Click-to-Dial gives the possibility to make a phone call directly by clicking a button in Dynamics 365 Phone number /mobile number field.
Customize the forms where you want to enable the Click2Dial functionality for the phone number fields:
Go to form customizations, then target form
Select the field properties for the field.
Choose Controls tab and add a new control, choose Channel Communication Control.
Select the radio buttons to Channel Communication Control
© Enreach, Mannerheimintie 117, 00280 Helsinki, Finland
+358 40 450 3000, www.enreach.fi