# Genesys Cloud

{% hint style="danger" %}
This integration has been marked as deprecated by Genesys. If you are looking for an alternative integration with this provider, please reach out to [support](https://docs.chatlayer.ai/support/get-in-touch) and we will provide you more information.
{% endhint %}

In the Genesys Cloud platform, go to Admin > Integrations > OAuth

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3VWtJ-zQPNbT6ZUGF2%2F-M3VXsx1vyddZGzY2gNm%2Fimage.png?alt=media\&token=21497db4-d4e4-45ff-812b-200b922152ef)

Add a new OAuth client for Chatlayer.ai to use

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3VWtJ-zQPNbT6ZUGF2%2F-M3VY7go935jHcLRRLph%2Fimage.png?alt=media\&token=504b7aa2-9d73-481f-8c58-ae387995dc18)

Pick an app name and description. Leave the token duration untouched and pick the Client Credentials grant type.

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3VWtJ-zQPNbT6ZUGF2%2F-M3VYOuysFbHPvJLGkB1%2Fimage.png?alt=media\&token=cc5e8c61-0f09-40ab-920f-86004966afe7)

On the roles tab, assign all roles

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3kfwTun7yY0mR34HC-%2F-M3kgHELb9tpTm5iLOq2%2Fimage.png?alt=media\&token=24c80df8-15a9-4d5c-ac9c-11f60e2959a7)

Copy the newly created client id and client secret to your Genesys Cloud Offloading integration in Chatlayer

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3VWtJ-zQPNbT6ZUGF2%2F-M3Vau8b2OrTfPLhBoLk%2Fimage.png?alt=media\&token=a537fc73-0e6d-432f-b607-cc5152647eb1)

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3kbJh8rEaINr1LZpUE%2F-M3kbhuQnvDwYezgIYXp%2Fimage.png?alt=media\&token=b65bf80c-a962-4248-a583-fb03512d8e94)

### Create the widget deployment

Create a new Widget by going to **Admin > Contact Center > Widgets > Create Widget**

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3kbJh8rEaINr1LZpUE%2F-M3kbw1gxOOIgvtpuL_j%2Fimage.png?alt=media\&token=38c31f68-7161-4d22-8fd8-04dbeddb879d)

Copy the deployment key to the offloading configuration screen in Chatlayer.

![](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-M3kbJh8rEaINr1LZpUE%2F-M3kcCspfo5rtL11tmap%2Fimage.png?alt=media\&token=a15a0d4b-172f-4b3a-a145-1e35c69d88fd)

## Sending a user to Genesys Cloud

To have your user transferred to a live agent in Genesys Cloud, create an action at the point in the flow where you want your user to be handed over.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FyJ8jPo1HfDjYOOIqOrHW%2Fimage.png?alt=media&#x26;token=b01f6afe-b8e1-49c3-86a7-a1b5dd60d92d" alt=""><figcaption></figcaption></figure>

Add the action "Send to offload provider" to your block and configure it with the correct settings for Genesys Cloud.

Select the queue for your chatbot conversations to be offloaded into.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FKO85x6RfXAGrgIOYGo8q%2Fimage.png?alt=media&#x26;token=2cea8474-6965-490d-8dbc-750ae8dadd7e" alt=""><figcaption></figcaption></figure>

Once a user reaches this part of the conversation, the offload towards Genesys Cloud will be triggered. The bot will automatically be paused when a user reaches this action. When the agent closes the conversation, the bot will be resumed.&#x20;

### User Information and Custom Fields

When the conversations reaches a human handover block for Genesys Cloud, Chatlayer will fill in the following information about your user using variables if they are available in the chat session:

**First Name**: `genesysCloud.firstName` OR `internal.user.firstName`\
**Last Name**: `genesysCloud.lastName` OR `internal.user.lastName`\
**Phone** **Number**: `genesysCloud.phoneNumber`\
**Email**: `genesysCloud.email`

You may want to pass additional information about the user to Genesys, not covered in the above fields. To handle this, you can declare additional session variables under the `genesysCloud.customFields` namespace. These will be added as custom fields in Genesys Cloud.&#x20;

For example, to add the user's location as a custom field, you would adjust your bot's flow to ask the user's location, and store the answer as a variable under `genesysCloud.customFields.location`
