Contents
Table of Contents |
---|
...
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. licenses.
Creating app registration
Configuring Azure App registrations is done by the following steps:
...
Tick user_impersonation selection and choose Add permissions
...
Figure 9 Add permissions
Creating a Secret for app registration
For authentication purposes, a client secret is needed.
Info |
---|
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
...
Figure 10 Copy Object ID
Replace OBJECT_ID in the following script with the copied value
Code Block | ||
---|---|---|
| ||
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
...
|
---|
Anchor | ||||
---|---|---|---|---|
|
...
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.
Anchor | ||||
---|---|---|---|---|
|
...
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.
...
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:
If no redirection has to be done (e.g. customer not found) then HTTP 204 No Content response must be returned
Returning the same bnum from the request as InitialTarget is forbidden because it would cause an infinite loop in Enreach cloud. In such a case returning HTTP 204 is recommended.
...
Anchor | ||||
---|---|---|---|---|
|
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)
...