Integrating with phone and NICE CXone contact center
IBM Cloud
Connect your assistant to a NICE CXone contact center with live agents.
Transfer customers from a chat with your assistant to live agents who can help them by phone. If customers ask to speak to someone, your assistant can forward them directly to customer support with the conversation history.
This integration creates a connection between your assistant and a contact center with NICE CXone.
You need a Plus or Enterprise Plan to use this feature.
Before you begin
You must have a NICE CXone account and phone numbers that are allocated for this integration.
- Go to the NICE website.
- Create an account.
- Follow the instructions to get phone numbers or select existing phone numbers.
Generate NICE CXone access keys
Access keys are used for authentication and consist of two parts: an access key ID and a secret access key.
To generate NICE CXone access keys to use with your assistant:
-
Log in to the NICE CXone console.
-
Click the app selector and select Admin.
-
Click Users, and then locate and click the user account that you want to use for the integration.
-
Click the Access Keys tab.
-
Click Generate New Access Key.
-
Click Show Secret Key, and copy the secret key to a secure location.
You cannot retrieve the secret key again after you complete the next step and Save. You must generate a new key if the current one is lost or forgotten.
-
Click Save.
Set up the integration
To complete setup, you must have an assistant ready to deploy, your NICE CXone access keys, and phone numbers allocated for this integration.
To integrate your assistant with NICE CXone:
-
In the Integrations section on the main page for your assistant under Essential Channels, you see a tile for Phone.
-
On the Phone tile, click Add.
-
On the pop-up window, click Add again.
-
Select NICE CXone on the Select contact center page.
Click Next.
-
On the Connect to contact center page, specify the following values: - the Access key ID - the Access key secret.
Click Test connection to verify the credentials.
Click Next.
-
On the Phone number page, enter a phone number that you allocated for the NICE CXone integration. You can add more phone numbers later.
Click Next.
-
On the Speech to Text page, select the instance of the Speech to Text service that you want to use.
-
If you have existing Speech to Text instances, select the instance from the list.
-
If you do not have any existing Speech to Text instances, click Create new instance to create a new Plus or Enterprise instance.
-
-
In the Choose your Speech to Text language model field, select the language that you want to use.
The list of language models is automatically filtered to use the same language as your assistant. To see all language models, toggle the Filter models based on assistant language switch to Off.
If you created specialized custom models that you want your assistant to use, choose the Speech to Text service instance that hosts the custom models now, and you can configure your assistant to use them later. The Speech to Text service instance must be hosted in the same location as your watsonx Assistant service instance. For more information, see Using a custom language model.
For more information about language models, see Languages and models in the Speech to Text documentation.
Click Next.
-
On the Text to Speech page, select the instance of the Text to Speech service that you want to use.
-
If you have existing Text to Speech instances, select the instance from the list.
-
If you do not have any existing Text to Speech instances, click Create new instance to create a new Standard instance.
Click Next.
-
-
On the Contact center integrations page, click Test connection near the setup information you entered.
-
If Invalid, check your credentials and enter each again.
-
If the credentials are correct, the Save and exit button becomes clickable.
Click Save and exit.
-
The connection between your assistant and NICE CXone is complete.
For security reasons, the authentication fields are removed from view after initial setup. If a field required for authentication is changed, then all entries in related fields must be filled and validated again.
Configuring the NICE CXone script
NICE CXone provides a scripting tool that allows workflow developers to define routing flows for their contact centers in CXone.
The following actions and settings in the workflow are necessary for integration to work properly.
Connecting a caller to your assistant
Use the Sipputheader action. In the headerName property, enter the name of the SIP header field that contains the Contact ID. This header field is included in outgoing SIP INVITE messages to watsonx Assistant.
- headerName X-ContactID
- headerValue {ContactId}
Transferring a caller to a live agent
You can configure your assistant to transfer a customer to a NICE CXone live agent.
The phone integration uses the signal REST API. The p1 attribute is preserved for the session history key. The key can be used to fetch the conversation history and present it to a live agent.
-
Use Onsignal to process the signal event.
-
Save the value of the p1 attribute:
sessionKey = "{p1}"
For example, you can use the Snippet action:
ASSIGN sessionKey = "{p1}"
Use Reqagent to transfer a call to a live agent.
Displaying conversation history to a live agent
Configure your script to provide a transcript of the assistant conversation to a live agent in a pop-out window, so the agent can better understand and address a customer's needs.
-
Add an Onanswer event to your script. The Onanswer event is triggered when an agent answers the call.
-
Use Assign to store the link to the conversation history into a variable. Variable watson_url Value https://web-chat.global.assistant.watson.appdomain.cloud/loadAgentAppFrame.html?session_history_key={sessionKey}
-
Use the PopURL action to display the conversation transcript to a live agent. URL {watson_url}
Disconnecting a call
The phone integration uses the same signal REST API for disconnecting a call.
The p1 attribute is set to hangup
. You need to design your script so it can distinguish between transferring a call to a live agent and disconnecting a call. If p1 is set to hangup
when an Onsignal event is triggered, use Hangup to terminate a script.
Transferring to a live agent when an error occurs
If an error occurs during a conversation, the phone integration disconnects the call by sending a SIP BYE
request.
Use Onrelease to process the BYE request and transfer a call to a live agent.
In this example, when Onrelease is triggered, the script verifies whether the call was already transferred. If not, it calls the Signal action and sets an indication that the call is being transferred to a live agent. The indication is set using the Assign action.
- Variable transferred
- Value true
If the Hangup action is executed and an Onrelease event action is present, CXone hangs up on the caller, and the script jumps to the OnRelease action. Design your script so it can distinguish whether the OnRelease event is triggered due to a transfer or hangup.
Adding transfer support to your assistant
Use the Connect To Agent response_type to configure your assistant to transfer calls to an agent. For instructions, see Transferring a call to a live agent.
Use the following format:
{
"generic": [
{
"response_type": "connect_to_agent",
"transfer_info": {
"target": {
"nice_cxone": {
"custom_data": {
"p2": "test"
}
}
}
},
"agent_available": {
"message": "Ok, I'm transferring you to an agent."
},
"agent_unavailable": {
"message": "Agent is unavailable."
}
}
]
}
Parameters listed in the custom_data
object are transferred to the signal REST API.
Supported parameters are p2
, p3
, ... p9
. p1
is preserved and used by the phone integration for passing the session history key into the NICE CXone script.