Sunshine Conversations: Zendesk Handovers

This guide describes how to enable live agent chat conversations with Cognigy.AI and Sunshine Conversations in Zendesk.

1 Setup Sunshine Conversations

In order to use Zendesk within a Cognigy conversation, the following steps need do be done:

  • Create a Sunshine Conversations App

Afterward, all necessary connectors, in this case, integrations, have to be included:

  1. Add a Zendesk Integration
  2. Add a Web Messenger Integration
  3. Add a Webhook Integration

After adding those to the app, the integration overview should look like this:

078afac-integrations.png
Figure 1.1: Sunshine Conversations Integrations

Provide the Webhook for Cognigy

All Cognigy.AI messages from the bot will be forwarded to Sunshine Conversations by using the Webhook integration. Therefore, the following HTTP request (API V2) needs to be executed to add a new integration to the app:

POST https://app.smooch.io/v2/apps/:appId/integrations

Authentication (Basic Auth): 
    - username: Key ID
    - password: Key Secret
    
Body (JSON):

{
    "type": "custom",
    "displayName": "Webhook",
    "webhook": {
        "version": "v2",
        "target": "<COGNIGY-ENDPOINT-URL",
        "triggers": [
            "conversation:create",
            "conversation:message",
            "conversation:read",
            "conversation:typing",
            "conversation:postback",
            "user:merge",
            "switchboard:offerControl",
            "switchboard:passControl",
            "switchboard:acceptControl",
            "switchboard:offerControl:failure",
            "switchboard:passControl:failure",
            "switchboard:acceptControl:failure"
        ],
        "includeFullSource": false,
        "includeFullUser": false,
        "secret": "<SUNSHINE-KEY-SECRET>"
    }
}

COGNIGY-CONFIG-URL:

This needs to be filled with the Endpoint URL that will be provided by the Cognigy.AI project at a later stage.

SUNSHINE-KEY-SECRET:

Insert your Sunshine Conversations API Key Secret.

Add Switchboard Integrations

In general, the agent handover will execute a so-called pass control function to forward the current bot conversation to Zendesk and vice versa. In order to provide this mutual alternation of responsibility, two switchboard integrations are required:

{
    "switchboardIntegrations": [
        {
            "name": "ZD",
            "integrationId": "5f368c78fdabdd88c18c8820",
            "integrationType": "zd:agentWorkspace",
            "deliverStandbyEvents": false,
            "nextSwitchboardIntegrationId": "5f36d83ef02582000c064cbb",
            "messageHistoryCount": 10,
            "id": "5f36b165fd9598000ce0356b"
        },
        {
            "name": "bot",
            "integrationId": "5f36d80a0e7100000d2b5c42",
            "integrationType": "custom",
            "deliverStandbyEvents": false,
            "nextSwitchboardIntegrationId": "5f36b165fd9598000ce0356b",
            "id": "5f36d83ef02582000c064cbb"
        }
    ]
}

ZD:

This switchboard integration represents the Zendesk support agent workspace where a human can talk to the user which was talking to the bot before.

bot:

This integration represents the Cognigy.AI bot that first talks to the user and later if asked for, forwards the conversation to the Zendesk workspace (passes control).

2 Setup Cognigy.AI

Now one needs to create a Cognigy.AI project (Virtual Agent) to provide the conversational interface:

  1. Login to Cognigy.AI
  2. Create a new Virtual Agent
    1. Add the Sunshine Conversations Endpoint in the Setup
  3. In the left menu, go to Manage -> Extensions and upload the Sunshine Conversations Extension (Tar File)
  4. Go to Build -> Flows -> Main and click on the + button in the Flow chart.
    1. Search for Pass Control.
    2. Click on it to add the node to the Flow chart.
    3. Click on the node to view the details.
    4. You will now see that there is a Connection field that needs to be configured.
      1. Use the Sunshine Conversations App information to set it up.
  5. The Flow is now ready to forward a conversation to the Zendesk workspace!
  6. Again, in the left menu, go to Deploy -> Endpoints -> Sunshine Conversations
    1. Click on the Endpoint Url to copy it and paste it to your open API request to create a webhook in Sunshine Conversations -- see above.
    2. Scroll down and open the Sunshine Conversations setup section.
      1. Fill in the app information, as you did in the Extension before.
      2. Use this URI: https://app.smooch.io

Test with the Web Messenger

Since the Sunshine Conversations app contains a Web Messenger integration, one can use this to chat with the AI on the web:

df97482-web-messenger.png
Figure 1.1: Sunshine Conversations Web Messenger

Demo Video


Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.