Enable human agent takeover in Sunshine Conversations

You may want to enable your Sunshine Conversations-deployed bot to hand over to a human agent. If so, you're in the right place!

In this article, we explain how to:

Integrate with Sunshine Conversations and enable human takeover

Before you proceed, please note that you must first request from Zendesk that they add the Zendesk integration to your Sunshine Conversations app, which can take up to 1-2 days. 

Once the integration is in place, head to your Sunshine Conversations app and go to Settings. From there, you'll need to create and copy the ID and Secret keys from the API keys section:

mceclip0.png

Once you've done this, head to your bot on the Certainly Platform and go to Bot Settings>Channels>Sunshine Conversations. If you've yet to connect your bot to your Sunshine Conversations app, please follow the instructions in our article "Integrating your Certainly bot with Sunshine Conversations".

Once connected, paste your ID and Secret keys into their relevant fields, then click "Save API Key".  Please note that extra spaces can be added to the keys when copy/pasting, so you may want to paste them into a plain .txt file to eliminate them, then copy/paste into the fields.

mceclip1.png

Create Sunshine Conversations Pass Control Webhook

Next, you'll need to create an instance of our wh_iconSunshine Conversations Pass Control Webhook. You can use it straight away without configuring anything, but if you do want to configure it, instructions are provided in the Webhook description.

One example is being able to pass a string of comma-separated tags, like in the below image:

{
    "appId": {% if ss is defined %}"{{ss.appId}}"{% else %}""{% endif %},
    "conversationId": {% if ss is defined %}"{{ss.conversationId}}"{% else %}""{% endif %},
    "from":"{{ss.userId}}",
    "switchboardIntegration": "ZD",
    "metadata": {
      "dataCapture.ticketField.900009347206": "{{order_number}}",
      "dataCapture.systemField.tags": "created,solved"
    }
}

When the Webhook is fired, it will add tags to your tickets:

Tags_2.png

Important consideration

If you're passing ticket field data to Zendesk, ensure the variables you use are not empty.

The following scenario will fail silently to hand a conversation over to Zendesk if Custom Variable order_number is never created by the bot prior to the Webhook execution:

{
    "appId": {% if ss is defined %}"{{ss.appId}}"{% else %}""{% endif %},
    "conversationId": {% if ss is defined %}"{{ss.conversationId}}"{% else %}""{% endif %},
    "from":"{{ss.userId}}",
    "switchboardIntegration": "ZD",
    "metadata": {
      "dataCapture.ticketField.900009347206": "{{order_number}}",
      "dataCapture.systemField.tags": "Created_by_Certainly"
    }
}

Once you've saved your Webhook, you can now insert it into your handover flow in the bot canvas.

Insert Webhook into handover flow

The below image shows a simple flow you can implement when a user requests human support.

mceclip3.png

In the Connections tab of the Module after a user has clicked "Yes" to confirm they want to speak with an agent, simply add your newly created Webhook. Then, "Go to" a subsequent Module where you ask the user to wait until a human agent joins the conversation.

You can see this illustrated below:

mceclip2.png

Save and publish, and your bot will now be able to hand over to a human agent in Zendesk Support!

If you intend to use our Bot Takeover feature where your Zendesk agents will hand a conversation back to the bot, please take a look at our article "Bot Takeover in Sunshine Conversations".