Teneo Developers

Genesys Cloud Native Connector

The Genesys Cloud Native connector showcases how to connect a Teneo solution with the Genesys Cloud API. The example flows in the solution demonstrate authentication, callbacks, transfers, and cases as well as for mapping and listing properties inside your Genesys Cloud account.


More on the Genesys Cloud integration can be found here: Genesys Cloud OpenQuestion connector.

Genesys AppFoundry

The connector is available and can be found in Genesys AppFoundry, please visit the following page and click on 'Contact us': OpenQuestion

Screenshot 2023-06-12 at 11.14.37 AM

Solution contents

The solution contains a Genesys Cloud integration containing methods for authentication, callbacks, transfers, and cases as well as for mapping and listing properties inside your Genesys Cloud account. Since the source code of the integration is embedded in the solution, it can be easily extended or used as a starting point for new methods.

Example flows

For each core method in the Genesys Cloud integration, the solution contains a corresponding example flow:

  • Ask for skills
  • Callback (immediate)
  • Callback (scheduled)
  • Convert queue name to id
  • Disconnect a call
  • Get conversation details
  • Get locations
  • Handover to queue (with id)
  • Handover to queue (with name)
  • Is the queue open?
  • Return call history
  • Return queue names
  • Return spoken languages
  • Return wait time
  • Update user attributes

Solution properties

The solution contains a number of different properties, in which various credentials we have collected should be stored, such as genesysQueueName and genesysScriptId. While others, such as genesysConversationId, genesysNumber, and genesysParticipantId are automatically filled in. The example solution comes with these properties:

Variable NameTypeExample value Description
genesysClientGlobal variableUsed to authentication
genesysConversationIdGlobal variable "d0b2e1cd-85c5-489a-9cf4-2800471b3ea7"Genesys Conversation id
genesysDetailsGlobal variablefalse Returns true when the call has been assigned to a conversation id
genesysNumberGlobal variable"tel:+4676555000"The phone number of the person calling
genesysParticipantIdGlobal variable"512512-24321-sads-4122"Genesys Participant id of the caller
genesysQueueNameGlobal variable"genericQueue"Name of the assigned queue
genesysScriptIdGlobal variable"8b12e4c2-3788-403e-bc34-8dc9af880234"Id for the assigned script, used for callbacks
genesysSentimentGlobal variableNegative high confidenceThe assigned sentiment from the user
genesysStackTraceGlobal variableError 404Will display the error message if any request fails
[Genesys] - Authenticate Global ScriptUsed to authenticate the connection
[Genesys] - Get conversation details Global ScriptLoad the current conversation details

There are additional flow variables that could be included in each flow, depending on the API request.

Every transfer and callback is designed to include two variables. The first, genesysSentiment, includes the sentiment of the user, to clarify whether they are angry, happy, or impatient. Teneo offers a number of options on how to design this, including the following three approaches:

  • The Native approach, using Teneo's own Sentiment analysis: read more here.
  • Integrating Microsoft Conversational Language Understanding (CLU) detector with the solution: read more here.
  • Using the OpenAI integration to detect sentiment: read more here.

The other variable included in each transfer is sConversationHistory, which sends a transcript of the current conversation to be displayed to the agent in Genesys Cloud. Users are free to choose between options here; for example, they could:

  • Use Teneo's own Conversation History to transcribe the entire conversation into an variable: read more here.
  • Use the OpenAI integration to summarize the entire conversation into an variable: read more here.

Authentication method

Genesys Cloud provides support for OAuth Authentication, which allow a Teneo bot to interact with Genesys Cloud on the user's behalf. Which authentication method to use depends on factors like the use case and channel. This example solution contains a flow to demonstrate OAuth token-based authentication approach that can be found in the Begin dialog global script.

Getting started


These instructions assume that you have access to Genesys Cloud and are familiar with the platform.

These instructions assume you have access to Teneo and are somewhat familiar with the software.

Genesys Cloud Client

The Genesys Cloud Data Actions connector comes together with a pre-made Solution. In addition, a Genesys Groovy Client makes it easier to make API calls from Teneo. This comes with the following functionalities within Genesys Cloud:

  1. Ask for skills
  2. Callback (immediate)
  3. Callback (scheduled)
  4. Convert queue name to id
  5. Disconnect a call
  6. Get conversation details
  7. Get locations
  8. Handover to queue (with id)
  9. Handover to queue (with name)
  10. Is the queue open?
  11. Return call history
  12. Return queue names
  13. Return spoken languages
  14. Return wait time
  15. Update user attributes

Please note that the options from Genesys Cloud are not limited to these, and each user is able to continue developing the client from the options available here: Genesys Cloud API Explorer.

To add files, click on the SOLUTION tab, then on Resources. Click on the File tab. You can either drag your file in or click on the 'Add' button. If you want to be able to access the file programmatically in your solution, make sure you change the published location path to /script_lib before you save it. After you have updated the published location, hit Save in the top right corner. Finally, navigate to Tryout and 'Reload' your engine.

Genesys Cloud Base URL references

Data privacy and protection laws today require that collected data must be stored in data centers that are physically located in the respective country or region. To facilitate compliance, Genesys Cloud has set up multiple data centers across different regions. Each data center only holds the data of those users that signed up for it. Find base URLs for each region and it is important to refer to the most suitable base URL according to your region for reference. For more information please see Genesys Cloud regions.

Create OAuth Keys

Next up is to create an OAuth key and store it in Teneo to connect to your Genesys Cloud platform from your Teneo solution. In order to do this we will need to start off with creating our OAuth key from Genesys Cloud:

  1. Navigate to Admin, followed up with 'Integrations' and 'OAuth', alternatively visit this page OAuth.
  2. Click on 'Create Client'. and give your Client a name like teneo. Feel free to add a fitting description as well.
  3. Navigate to 'Grant Types' and select 'Client Credentials', doing this will make the 'Roles' tab appear at the top, click on that.
  4. From the Roles table, assign the relevant roles to this client, in our case these are 'Developer' and 'Master Admin'.
  5. Click on 'Save' to save the client, and reopen the client. This time you will be able to important keys.
  6. Copy the 'Client ID' and 'Client Secret', these will be needed for the next step.

With the information at hand, we will need to authorize us from the Teneo solution. This can be achieved by creating a 'Begin Dialog' Global script,

  1. Navigate to your Teneo solution and click on the 'Solutions' tab.
  2. Select 'Globals' on the left.
  3. Select the 'Scripts' tab.
  4. Open the 'Authenticate - Genesys Cloud' Begin Dialog script in Edit mode.
  5. Replace the first line with the following values:


1genesysClient = new GenesysCloudClient('Client ID', 'Client Secret', 'Region')
  1. Save the script and reload the solution from Tryout.

Congratulations, you have now connected your Teneo solution with your Genesys Cloud client! Let's continue by giving it a try.

Test the solution

The Genesys Cloud Data Actions connector comes together with flows that give a demonstration of how to make each request. For this section, we will make a simple API request and return the spoken language in your Genesys Cloud instance. This API call can be made without any parameters.

  1. Open Tryout and click on 'Reload now' if visible.
  2. Enter the following input Which languages do you speak?
  3. The reply should return the languages supported by the employees from Genesys Cloud.

You can add ACD Skills and Languages from Genesys Cloud by visiting the following link: ACD Skills & Languages.

Now that you have confirmed that the connector works, let us move on to publishing our bot.

Publish your bot

To publish your bot, proceed as follows:

  1. Open the 'SOLUTION' tab in the solution's window.
  2. Select 'Publish'.
  3. Click the 'Manage' button and in the drop-down, you will see a lot of different alternatives. Locate the 'Latest' section and choose 'Publish'.

You might see a warning saying 'Publish to 'Default env' stopped with warnings. '

Teneo - Error when publish

This is nothing to worry about; the warning is shown when you publish your solution for the first time or when you have made certain global changes. To proceed, just check the checkbox 'Perform full application deployment on Try again' and click the 'Try again' button.

The publication may take a couple of minutes. When it has finished, you'll receive a confirmation pop-up.