Contents

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:

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 +
Omnichannel

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

https://dynamics.microsoft.com/en-us/pricing/customer-service/#plans

Note: Please send your Microsoft Dynamics 365 environment URL-information to your Enreach contact before installation.

1.1.1 Setting up Channel Integration Framework

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.

https://docs.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/get-channel-integration-framework

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:

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.

Choose API permissions from the navigation panel

Figure 7 Select API Permissions

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.

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

Once secret key is created, send the following details to Enreach:

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:


1.3.1 The installation process for the customer’s administrator

The incoming zip package should be unblocked and unpacked

image-20250402-112027.png

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.

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:

https://docs.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/configure-channel-provider-channel-integration-framework

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,

  • Sign in to Dynamics.

  • Switch to Customer Service Admin Center app.

  • On the left menu, click Workspaces within Agent experience section.

  • In the right pane, click Manage next to Agent experience profiles.

  • Select your Agent Experience Profile or create a new one if you don’t have any custom app profile yet. It is recommended to create a dedicated profile for Voice for Dynamics 365 by Enreach.

  • Within Channel providers section of Agent experience profile editor (at the bottom-right of the page), click Edit.

  • Below Third party voice channel providers, open the drop-down and select Voice for Dynamics 365 by Enreach item.

  • Click Save and Close.

1.5.2 Users

1.5.2.1 Update Enreach Cloud User ID

Open Voice Configurator App

Changing any of the followings automatically triggers Enreach user ID update:

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:

1.5.2.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.3 Phone Call Synchronization (Enterprise Calls)

Phone Call Synchronization settings are in General Settings -> Phone Call sync settings view:

The value can be any Enreach user id chosen by the customer organization.

Phone call synchronization Azure WebJob runs continuously. After executing the business logic, it sleeps for 60 seconds. It means that in practice synchronization runs nearly every minute.

Important to note that to make call synchronization work, DefaultCrmAssignee setting must be set properly (see in the list above).

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:

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):

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.4 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:

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.4.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.

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.5 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.


1.5.6 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:

Do the same steps for all the phone fields you want to enable.

1.6 Smart Routing in Voice for Dynamics 365

There are multiple ways to enable smart routing for Voice for Dynamics 365. Smart Routing setup is always dependant on the specific customer needs and use case scenarios. The best way to plan the smart routing setup is to consult both Enreach deployment team and the Dynamics 365 Integrator partner before the deployment & configuration of Voice for Dynamics 365. In this configuration guide we present the REST API based model for smart routing.

By utilizing Smart Routing capabilities, calls arriving to a voice pool can be redirected to another pool or to a certain agent, based on data in Dynamics 365. For example if the call is coming from a number which is – either directly or indirectly – related to a VIP customer then the call can be redirected to a queue dedicated to such customers.

The following steps have to be carried out by the Dynamics 365 integrator partner to set up Smart Routing:

The whole mechanism is visualized on the following diagram:

1.6.1 Receiving data

The API has to accept data in JSON format according to the following schema:

{

  "type""object",
  "properties": {
    "anum": {
      "type""string"
    },
    "bnum": {
      "type""string"
    }
  }
}

Example payload:

{

  "anum""+35850454564", // phone number of caller
  "bnum""+35840675644" // phone number of pool the call is in at the moment
}

Business logic will then find the caller in Dynamics CRM based anum and determine the needed action. Phone numbers have to be saved to CRM in the correct format, with no spaces or other characters, and starting with international calling prefix (plus sign). If phone numbers happen to be saved to CRM in local format then by removing first few (3-4) characters of anum, the rest can be matched to CRM data using contains comparison.

1.6.2 Authentication

Besides the payload, Enreach Cloud is sending an X-Benemen-APIKey HTTP header as a means of authentication. The API key must be validated by the business logic and return HTTP 401 Unauthorized if doesn’t match.

1.6.3 Redirecting the call

When the phone number of target queue has been determined by the business logic, it is returned as an HTTP response.

Example payload:

{

  "InitialTarget""+35853445657", // phone number of target queue or agent
}

Things to notice:

The implementation of a Power Automate flow can be seen on the screnshot as an example.

Figure 39 Example Power Automate flow

1.6.4 Useful links to technical documentation for Smart Routing scenarios

More detailed technical documentation for developer needs:

https://benemen.atlassian.net/wiki/spaces/PD/pages/1215791782/SmartRouting+HTTP+Integrator+Guide

Azure function App example:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-serverless-api

1.7 Omnichannel user presence integration

If the Dynamics environment is running Omnichannel (user status feature is available as in the upper right screenshot), which uses Unified Routing engine to distribute work items to the user, it is essential to keep user status of Omnichannel and Web Phone in sync. If the status of user becomes Do not Disturb – either because of reaching maximum capacity or the user manually changed the status –, the system automatically blocks incoming calls by setting the user DND in Web Phone as well.

There are two basic use cases regarding this feature:

When user status is changed when not in a call, status is mirrored between Omnichannel and Web Phone according to the following mappings:

OC state

Web Phone state

AVAILABLE

Available (0)

BUSY

Busy (1)

BUSY_DO_NOT_DISTURB

DND (2)

OFFLINE

OffWork (3)

AWAY

Away (5)

When the agent is receiving or making a call, Omnichannel status is se to Do not Disturb, to prevent Unified Routing from distributing any work item to the user during a call.

When the call ends, Omnichannel status is reset to the value which was active right before the call.

The feature is implemented within the following built-in JavaScript plugins:

Plugin

Event

Purpose

Enreach.Plugins.HandleOCPresenceChange

onPresenceChange

Mirrors OC presence to WebRTC

Enreach.Plugins.HandleWebRTCPresenceChange

user-status-changed

Mirrors WebRTC presence to OC

Enreach.Plugins.OCPresenceDND

call-incoming

call-answered

call-started

Saves the value of current OC presence, then changes OC presence to DND

Enreach.Plugins.OCPresenceReset

call-ended

Resets OC presence to the saved value

All the plugins above are deployed automatically to the system and are by default enabled, no need to configure the feature in any way.

1.8 Test Voice for Dynamics 365 functionality

If everything was set up correctly, you should see the Voice for Dynamics 365 sidebar in the configured applications. Inbound& outbound calls, automatic phone call activity creation, Click-toDial and callback handling (if configured) are now available for the end users.

Figure 40 Voice for Dynamics 365, Customer Service Workspace (CIF2) (On the left side of Dynamics 365 UI)

Figure 41 Voice for Dynamics 365 Model Driven App (CIF1) (on the right side of Dynamics 365 UI)