Enable a tenant for Digital Channels
Contents
- 1 Prerequisites
- 2 Get contact center ID from GWS
- 3 Add GWS to the list of available GWS services for Nexus
- 4 Provision Digital Channels in GWS
- 5 Get the authentication token
- 6 Provision the Universal Contact Service connection
- 7 Provision the tenant in Digital Channels
- 8 Enable routing using Designer Applications
Learn how to enable your tenant for Digital Channels.
Prerequisites
Review the Prerequisites table and make sure you have all the listed information before you get started. The values in this table are referenced later by the name in the Variable column.
Parameter | Variable | Type | Example | Notes |
---|---|---|---|---|
GWS URL | $gwsURL | HTTPS URL string | https://gws.mydomain.com | Host of the Web Services and Applications load balancer. |
Auth URL | $authURL | HTTPS URL string | https://auth.mydomain.com | Host of the Auth Services load balancer. |
GWS admin username | $gwsAdminName | string | ops | The GWS ops credentials. See Provision Genesys Web Services and Applications. |
GWS admin password | $gwsAdminPass | string | ops | The GWS ops credentials. See Provision Genesys Web Services and Applications. |
Tenant User | $tenantUser | string | nexus | The Person username from your tenant configuration. See Create a Person object. |
Tenant User Password | $tenantUserPassword | string | nexus_password | The Person password from your tenant configuration. See Create a Person object. |
Contact Center ID | $ccId | string | 578ec98e-f07c-46ad-9675-f36c22f3ba9f | The contact center ID provisioned in Web Services and Applications. If you don't have this ID, see Get contact center ID from GWS below. |
Tenant Name | $tenantName | string | premise_tenant | The tenant name you used as <$tenantName/$ccId> in the Enable Nexus UX step. |
Digital Channels FQDN URL | $nexusURL | HTTPS URL string | https://nexus.mydomain.com | The fully qualified domain name (FQDN) for Digital Channels. |
UCS URL | $ucsURL | HTTPS URL string | https://ucs.mydomain.com | A URL pointing on the Universal Contact Service (UCS) entry point. |
Get contact center ID from GWS
curl --user $gwsAdminName:$gwsAdminPass --request GET '$authURL/environment/v3/contact-centers'
{
"data": {
"contactCenters": [
{
"id": "<your contact center id ($ccId)>",
"environmentId": "<your environment id>",
"domains": [
<list of domains for your contact center>
],
"auth": "configServer"
}
]
}
}
Add GWS to the list of available GWS services for Nexus
Complete the steps in this section to add GWS to the list of available GWS services for Nexus.
Create the authentication client
To create the authentication client, send a POST request to GWS that includes a body parameter called data in JSON format. Give data the following properties:
Property | Value |
---|---|
clientType | CONFIDENTIAL |
internalClient | true |
authorizedGrantTypes | refresh_token, password, client_credentials, authorization_code |
redirectURIs | $nexusURL |
authorities | ROLE_INTERNAL_CLIENT |
scope | * |
description | nexus_client |
name | nexus_client |
client_id | nexus_client |
client_secret | <client secret token> - randomly generated and saved for further use |
accessTokenExpirationTimeout | 43200 |
refreshTokenExpirationTimeout | 2592000 |
Sample request
curl --user ops:ops --request POST '$gwsURL' \
--header 'Content-Type: application/json' \
--data '{"data": {
"internalClient": true,
"name": "nexus_client",
"clientType": "CONFIDENTIAL",
"client_id": "nexus_client",
"client_secret": "<client secret token>",
"authorities": ["ROLE_INTERNAL_CLIENT"],
"scope": ["*"],
"authorizedGrantTypes": ["client_credentials", "authorization_code", "refresh_token", "implicit", "password"],
"redirectURIs": ["$nexusURL"],
"accessTokenExpirationTimeout": 43200,
"refreshTokenExpirationTimeout": 2592000
}
}'
ops:ops
GWS superuser is different for your environment.
Expected response
The expected response is 200 OK.
Verify client
To verify that authentication was successful, send a POST request to GWS:
curl --user nexus_client:<client secret token> \
--request POST '$authURL/auth/v3/oauth/token?grant_type=client_credentials&scope=*&client_id=nexus_client&client_secret=<client secret token>'
{"access_token":"<bearer token>","token_type":"bearer","expires_in":43199,"scope":"*"}
Add GWS to the nex_gapis table for Nexus
Execute the following query in the PostgreSQL command line interface:
NSERT INTO nex_gapis (url, clientid, apikey, clientsecret, created) VALUES ('$gwsURL', 'nexus_client', 'NA', '<client secret token>', now());
Provision Digital Channels in GWS
curl --user $gwsAdminName:$gwsAdminPass --request POST '$authURL/environment/v3/contact-centers/$ccId/settings' \
--header 'Content-Type: application/json' \
--data '{
"data":
{
"name":"chatservice-uri",
"location":"/",
"value":"$nexusURL",
"shared":false
}
}
Get the authentication token
curl --user nexus_client:<client secret token> --request POST '$authURL/auth/v3/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=$ccId\\$tenantUser' \
--data-urlencode 'client_id=nexus_client' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'password=$tenantUserPassword'
{"access_token":"<$outGWSAccessToken>","token_type":"bearer","refresh_token":"<refresh_token>","expires_in":43199,"scope":"*"}
As an output of this step, you will have the GWS access token:
Parameter | Variable | Type | Example | Notes |
---|---|---|---|---|
Nexus API Key | $outGWSAccessToken | UUID string | 9b7682b7-cbce-422f-9bbb-ecda85e61695 | The access_token from the response example. |
Provision the Universal Contact Service connection
You must complete this step if you are using Universal Contact Service in your environment.
Make the following POST request to create the PlatformUCS service:
curl -X POST \ $nexusURL/nexus/v3/provisioning/services/$ccid/PlatformUCS \ -H 'Content-Type: application/json' \ -H 'x-api-key: $apiKey' \ -H 'x-ccid: $ccid' \ -d '{ "url" : "$ucsURL", "secret": {}, "data" : {} }'
Provision the tenant in Digital Channels
curl --request POST '$nexusURL/nexus/v3/provisioning/tenants' \
--header 'Authorization: Bearer $outGWSAccessToken' \
--header 'Content-Type: application/json' \
--data '{
"id": "$ccId",
"name": "$tenantName",
"type": "PureEngage",
"backendurl": "$gwsURL",
"username": "$tenantUser",
"token": "$tenantUserPassword",
"genesystenantid": 1
}'
The expected response:
{
"status": {
"code": 0
},
"data": {
"xapikey": "$nexusApiKey"
},
"operationId": "ec90f3d2-f4b5-47fd-9004-2c309398ab38"
}
Parameter | Variable | Type | Example | Notes |
---|---|---|---|---|
Nexus API Key | $nexusApiKey | UUID string | 9b7682b7-cbce-422f-9bbb-ecda85e61695 | The xapikey from the response example. For creating chat. |
Enable routing using Designer Applications
Use Agent Setup to add the following values to the "DesignerEnv" transaction in the Environment tenant. If the transaction doesn't exist, create it with a type of List and "DesignerEnv" as Name and Alias.
Property | Value |
---|---|
baseurl | <Nexus FQDN URL>/nexus/v1 |
password | <consumer api-key> |
url | <Nexus FQDN url>/nexus/v3 |