IBM Cloud Docs
Integrating with Genesys Audio Connector

Integrating with Genesys Audio Connector

IBM Cloud

You can integrate the Genesys Audio Connector with your assistant to stream the conversation audio between assistant and Genesys Cloud.

Before you begin

You must have the following set up before you start integrating Genesys Audio Connector:

  • A Genesys Cloud account with an Audio Connector instance that is hosted in the same region like your assistant.
  • Access to the Genesys Architect.

Create the Audio Connector integration in your assistant

  1. Go to the Integrations page by clicking the integrations icon (Integrations icon) in the left menu.

  2. Click Add on the Phone tile.

  3. Click Genesys Audio Connector tile.

  4. In the Credentials section, copy and store the automatically generated credentials in the following fields:

    • API key
    • Client secret
    • Genesys audio connect URI

    Store the credentials because you cannot see them after you click Save. You require these credentials to set up the Genesys Audio Connector.

  5. Click Save and Exit.

Set up Audio Connector to integrate assistant

To set up Genesys Audio Connector, you complete the steps in the Configure and activate Audio Connector in Genesys Cloud topic.

In the Genesys Admin page, go to Integrations > Configuration to add the Genesys audio connect URI value that you copied while creating the Audio Connector integration in your assistant.

In the Base Connection URI field of Genesys, you must enter the first part of the Genesys audio connect URI value, which is in the following format:
wss://<data-center>/<region>/genesysaudioconnector. You must enter the second part of the Genesys audio connect URI value, which is <instance-id>/connect?version=<api-version>, in the Connector ID field.

In the Genesys Admin page, go to Integrations > Credentials to add the credentials for the API key and Client secret fields that you copied while creating the Audio Connector integration in your assistant.

Call Flow

Use the Call Audio Connector action in Genesys to activate the Audio Connector integration in your assistant.

See Call Audio Connector action for more details.

You need the Genesys audio connect URI from the previous step.

  1. Go to the Genesys Admin page.
  2. Under Architect, click Architect, and create an Inbound Call Flow.
  3. In the Toolbox, click Bot, and then Call Audio Connector.
  4. Select the values:
    • Enter a name for your Call Flow.
    • Choose your Audio Connector integration from the Integration drop-down menu.
    • You must copy the Genesys audio connect URI part starting from the <integration-id> and paste it into the Connector ID field. <instance-id>/connect?version=<api-version>
    • Enter session variables you want to be passed to and from watsonx Assistant. For more information, see Context Sharing through Session Variables.
    • Click at the bottom of the Flow Diagram to create a Terminating Action. For example, Disconnect. Click Save and Publish.

Call Routing

Create a call routing to direct incoming calls to your Genesys Call Flow.

  1. Go to the Genesys Admin page
  2. Go to Call Routing, and create a Call Routing.
  3. Select the values:
    • Enter a name for your Call Routing.
    • Choose Division.
    • Choose the call flow you configured in the previous step from the Route to drop-down menu.
    • Assign numbers to the flow
    • Click Create

Context-sharing through session variables

From the Audio Connector node in the Genesys Architect flow, you can specify session variables that can be used to pass information to watsonx Assistant. You can specify both Input and Output parameters. For the integration, both of these parameters are merged into a single object under the context object.

Both Input and Output parameters are available in the watsonx Assistant context, and the information is shared on each turn. For example, the context made available in watsonx Assistant is:

{
  "context": {
    "integrations": {
      "genesys_audio_connector": {
        "user_id": "<SENT FROM GENESYS>",
        "some_variable": "<SET_FROM_WATSON_ASSISTANT>"
      }
    }
  }
}

For Input parameters, you can access the session variable in watsonx Assistant with $integrations.genesys_audio_connector.user_id.

For Output parameters, you can assign the session variables to a state variable in Genesys (e.g., State.some_variable and access them later on in your flow).

Variables can be read and set from both Dialog and Action skills.

Ending the Genesys Audio Connector flow

After receiving the audio conversation from the user, the Audio Connector node in Genesys Architect facilitates exchange of messages between the user and assistant until the end of conversation. To send the audio conversation back to Genesys, you must use the end_session response type.

{
  "generic": [
    {
      "response_type": "text",
      "values": [
        {
          "text": "You have ended the call."
        }
      ]
    },
    {
      "response_type": "end_session"
    }
  ]
}

Response types

After integrating your watsonx Assistant with Genesys Audio Connector, you can use the following response types in the assistant:

  • text
  • option
  • end_session
  • speech_to_text
  • text_to_speech
  • start_activities
  • stop_activities