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 the assistant and Genesys Cloud.

Before you begin

You must have the following prerequisites before you start integrating your assistant with Genesys Audio Connector:

  • A new account or log in to an existing Genesys Cloud account with access to Genesys Architect and the correct region at the Genesys Cloud portal.
  • The Admin role in the Genesys Cloud organization. For more information on Genesys Cloud roles and permissions see, Roles and permissions overview.

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.

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

  1. Click Add on the Phone tile.

  2. Click Genesys Audio Connector tile.

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

    • API key
    • Client secret
    • Genesys audio connect URI
    • Bot Connector ID
  4. Click Save and Exit.

Set up Audio Connector to integrate assistant

To set up Genesys Audio Connector, 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 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.

For more information, see Call Audio Connector action.

After getting the Genesys audio connect URI from the Credentials section, do the following:

  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. Enter a name for your Call Flow.
  5. Choose your Audio Connector integration from the Integration drop-down menu.
  6. You must copy the stored Bot Connector ID field of the Credentials section and paste it into the Connector ID field. <instance-id>/connect?version=<api-version>
  7. Enter session variables that you want to be passed to and from watsonx Assistant. For more information, see Context Sharing through session variables.
  8. Click at the bottom of the Flow Diagram to create a Terminating Action. For example, Disconnect.
  9. 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 to create a call routing.
  3. Enter a name for your call routing.
  4. Choose Division.
  5. Choose the call flow that you configured in the previous step from the Route to drop-down menu.
  6. In the call flow, assign the telephone number to which you want to route the call.
  7. 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 (for example, 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