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.
Genesys AppFoundry
The connector is available and can be found in Genesys AppFoundry, please visit the following page and click on 'Contact us': OpenQuestion
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 Name | Type | Example value | Description |
---|---|---|---|
genesysClient | Global variable | Used to authentication | |
genesysConversationId | Global variable | "d0b2e1cd-85c5-489a-9cf4-2800471b3ea7" | Genesys Conversation id |
genesysDetails | Global variable | false | Returns true when the call has been assigned to a conversation id |
genesysNumber | Global variable | "tel:+4676555000" | The phone number of the person calling |
genesysParticipantId | Global variable | "512512-24321-sads-4122" | Genesys Participant id of the caller |
genesysQueueName | Global variable | "genericQueue" | Name of the assigned queue |
genesysScriptId | Global variable | "8b12e4c2-3788-403e-bc34-8dc9af880234" | Id for the assigned script, used for callbacks |
genesysSentiment | Global variable | Negative high confidence | The assigned sentiment from the user |
genesysStackTrace | Global variable | Error 404 | Will display the error message if any request fails |
[Genesys] - Authenticate | Global Script | Used to authenticate the connection | |
[Genesys] - Get conversation details | Global Script | Load the current conversation details |
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
Prerequisites
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:
- 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
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:
- Navigate to Admin, followed up with 'Integrations' and 'OAuth', alternatively visit this page OAuth.
- Click on 'Create Client'. and give your Client a name like teneo. Feel free to add a fitting description as well.
- Navigate to 'Grant Types' and select 'Client Credentials', doing this will make the 'Roles' tab appear at the top, click on that.
- From the Roles table, assign the relevant roles to this client, in our case these are 'Developer' and 'Master Admin'.
- Click on 'Save' to save the client, and reopen the client. This time you will be able to important keys.
- 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,
- Navigate to your Teneo solution and click on the 'Solutions' tab.
- Select 'Globals' on the left.
- Select the 'Scripts' tab.
- Open the 'Authenticate - Genesys Cloud' Begin Dialog script in Edit mode.
- Replace the first line with the following values:
groovy
1genesysClient = new GenesysCloudClient('Client ID', 'Client Secret', 'Region')
2
- 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.
- Open Tryout and click on 'Reload now' if visible.
- Enter the following input
Which languages do you speak?
- The reply should return the languages supported by the employees from Genesys Cloud.
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:
- Open the 'SOLUTION' tab in the solution's window.
- Select 'Publish'.
- 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. '
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.
Download
- Download the solution Genesys Cloud Connector.
- Import the solution into Teneo. For more details see How to import solutions.