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:

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:

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:

You can run the assistant using the command rasa run.

Install AudioConnector Integration

To install & configure AudioConnector Integration,

  1. Go to Integrations Page, it should be listed on Genesys Cloud Admin Home.

  2. Click "+ Integrations" button on the top right corner to install a new Integration.

  3. Search for "AudioConnector" and install it.

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

  1. Advanced Tab can be left blank. In Credentials tab, create a credential with an API Key and an optional client secret.
  2. 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.

  1. Navigate to Admin Home > Routing > Call Routing.

  2. Create a new Call Route or modify an existing one. Select Inbound numbers that you would like to activate for the flow.

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

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:

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.