Genesys Cloud | Rasa Documentation
Build Your First Agent in Just a Few Minutes with Rasa Copilot
New in 3.12
The Genesys Cloud connector is available from Rasa Pro 3.12.
There are two ways to connect a Voice Assistant to Genesys Cloud:
- Using the built-in Genesys Channel to stream conversation audio from Genesys to your Rasa Assistant. This is a Voice-Stream channel connector. Steps for setting this up are described in section Stream Conversation Audio From Genesys.
- A Voice Ready channel connector can also be made using Data Actions where transcription (speech-recognition) and speech-to-text is handled within Genesys Architect. Go to Integration With Data Action section for more details.
Stream Conversation Audio From Genesys
Genesys Channel Connector allows you to stream conversation audio to your Voice Assistant from Genesys using AudioConnector Integration.
Before You Begin, Ensure:
- You have AudioConnector Integration available on your Genesys Account.
- You have the required permissions for creating Architect flows for Inbound or Outbound Calls.
- You have permissions to create/modify Call Routing.
Prepare Rasa Assistant
Create a file credentials.yml at the root of Rasa assistant project and add Genesys channel configuration:
# websocket_url: wss://<your-domain>/webhooks/genesys/websocket
genesys:
api_key: "<api_key>"
client_secret: "<client_secret>"
server_url: "<your-domain>"
asr:
name: deepgram
tts:
name: cartesia
wss or ws?
Depending on your domain's TLS configuration, the WebSocket URL could be ws://example.com or wss://example.com.
Genesys channel configuration accepts the following properties:
api_key(required): API Key configured on Genesys with AudioConnector integration. It is the value ofX-Api-Keyheader.server_url(required): The domain at which Rasa server is available. Do not include protocol (ws:// or wss://).asr(required): Configuration for Automatic Speech Recognition.tts(required): Configuration for Text-To-Speech.client_secret(optional): Client Secret configured on Genesys with AudioConnector Integration.
You can run the assistant using the command rasa run.
Install AudioConnector Integration
To install & configure AudioConnector Integration,
Go to Integrations Page, it should be listed on Genesys Cloud Admin Home.
Click "+ Integrations" button on the top right corner to install a new Integration.
Search for "AudioConnector" and install it.
Now that you have installed AudioConnector Integration, you can add an appropriate name and description. Go to the Configuration page to set a Base Connection URI to your Rasa Assistant.
The webhook URL will be in the format (with a trailing slash!):
- With TLS:
wss://example.com/webhooks/genesys/ - Without TLS:
ws://example.com/webhooks/genesys/
- Advanced Tab can be left blank. In Credentials tab, create a credential with an API Key and an optional client secret.
- Hit Save button and change the status of Integration to Active.
Create a Call Flow in Architect
Once you have installed the AudioConnector Integration, you can use it in a Call Flow with Genesys Architect.
Create a new call flow in Architect. Create a reusable task that should use "Call Audio Connector" action from Toolbox. Set the Connector ID to websocket.
Set Call Routing
If you have created an Inbound Call Flow, setup a Call Route to connect a Phone Number to this Call Flow.
Navigate to Admin Home > Routing > Call Routing.
Create a new Call Route or modify an existing one. Select Inbound numbers that you would like to activate for the flow.
In the section "What call flow should be used?" select the Architect flow that you created in the previous step.
Rate Limits
Audio is sent to Genesys over WebSocket as binary messages. Genesys enforces rate limits on binary messages.
These rate limits are:
- The allowed average rate per second of inbound binary data: 5
- The maximum number of inbound binary data messages that can be sent instantaneously: 25
Call Metadata
Metadata about the call can be accessed by the slot session_started_metadata in the beginning of the call. Following fields are available:
| Field Name | Description | Source |
|---|---|---|
call_id |
The unique call identifier from Genesys | conversationId parameter as sent by Genesys |
user_phone |
The phone number of the user | ani parameter, with tel: prefix removed |
bot_phone |
The phone number of the bot | dnis parameter as sent by Genesys |
Integration With Data Action
A voice-ready channel connector with Genesys can also be created using Rasa's REST channel connector and Genesys Data Actions. You can create a Call flow in Architect with a reusable-task that would:
- Capture caller's speech using Transcribe action.
- Send the transcribed text to Rasa using Call Data Action.
- Get the bot's response and play it back to the caller using Play Audio action.
Prepare Rasa Assistant
Add the REST channel to your credentials.yml:
# webhook URL: https://<your-domain>/webhooks/rest/webhook
rest:
# you don't need to provide anything here - this channel doesn't require any credentials
You can test your Rasa server with a curl request,
curl -X POST \
http://localhost:5005/webhooks/rest/webhook \
-H 'Content-Type: application/json' \
-d '{
"sender": "unique-sender-id",
"message": "Hi bot, what can you do?"
}'
Create a Data Action
On Genesys, create a Data Action. Ensure the payload sent by the Data Action to Rasa is:
{
"sender": "<genesys-call-id>",
"message": "<transcribed-user-message>"
}
Disconnecting a Call
You cannot use a Data Action to perform actions on conversations, like disconnecting the call. However, you can modify your Architect Call Flow to disconnect a call based on the response from Data Action.