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:

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:



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


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"


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


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! In this case, the Flow Chart could look such as:


    1. For instance, a Lookup Node can check the intent/text of the user in order to handle handover requests. If the user's intent is the mentioned handover, a confirmation Say Node can be used for notifying the person.
    2. Furthermore, the Pass Control Node of the recently uploaded Sunshine Conversations Extension is used for passing the control of the conversation to the Zendesk Chat Agent.
    3. As soon as the Zendesk system took over the conversation, Cognigy.AI gets the following information inside of the Input object: 
      1. === 'switchboard:passControl'
    4. In this case, the name of the created Switchboard Integration can be used in order to notify the chat user of the successful handover event. In this case, the Lookup Node, on the bottom left, checks the following in the CognigyScript type field:
    5. In this example, the Case uses the value "ZD", the name of the Switchboard Integration. This value could be different in another setup!
  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:

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:

Figure 1.1: Sunshine Conversations Web Messenger

Demo Video



Article is closed for comments.

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