Cuedesk

Cue is a customer service platform that lets you connect with your customers through chatbots, live chat, and broadcasts on various channels. You can integrate DRUID bots with Cue to handle user requests within the WhatsApp or Facebook Messenger channel, which are currently the only channels Cue supports.

Prerequisites

  • Cue Account: You need a Cue user account in your company's Cue workspace with the roles of Workspace Owner and Flow Manager. If you will be managing tickets in the Cue Inbox, you also need the Agent role. For more information, see the Cue documentation.
  • WhatsApp / Facebook Messenger Channel: You need to have the WhatsApp / Facebook Messenger channel set up in the Cue workspace. Starting with DRUID 8.6, you can use the Cuedesk web channel instead. The WhatsApp or Facebook Messenger channel is only required if you specifically need to use it.

This section describes how to integrate DRUID chatbots with Cue.

Step 1. Create Cue API key and webhooks

  1. Sign into app.cuedesk.com.
  2. On the main menu, click the Settings > API Keys.
  3. On the API Keys page, click the Create API key button.
  4. In the pop-up, enter a name for the API key and click Create.
  5. The Cue platform automatically generates a key (bearer token). Copy the key as you will need it in DRUID.
  6. On the Settings menu, click Webhooks.
  7. Click the Create Webhook button and create an Inbound webhook as follows:
    1. Give the inbound webhook a name.
    2. From the Trigger field, select New inbound message.
    3. From the Channel field, select the desired WhatsApp channel that has been activated in the Cue workspace.
    4. In the URL field, enter the CallBack URL for Inbound messages. To get it, in the DRUID Portal, go to the desired bot details, click the Channels tab and click on Cuedesk. Under the Inbound messages section, copy the CallBack URL.
    5. Click the Create button. The created webhook appears on the Webhook page.
  8. Click on the inbound webhook and copy the secret, you will need it in DRUID.
  9. Click Cancel to exit the page.
  10. Click the Create Webhook button and create an Outbound webhook as follows:
    1. Give the outbound webhook a name.
    2. From the Trigger field, select New outbound message.
    3. From the Channel field, select the desired WhatsApp channel that has been activated in the Cue workspace.
    4. In the URL field, enter the CallBack URL for Outbound messages. To get it, in the DRUID Portal, go to the desired bot details, click the Channels tab and click on Cuedesk. Under the Outbound messages section, copy the CallBack URL.
    5. Click the Create button. The created webhook appears on the Webhook page.
  11. Click on the outbound webhook and copy the secret, you will need it in DRUID.
  12. Click Cancel to exit the page.

Now configure the Cuedesk channel in the DRUID Portal.

Step 2. Configure the Cuedesk channel in DRUID

  1. Log in the DRUID Portal and from the main menu, select your bot. The bot configuration page appears by default on the Details tab.
  2. Click the Channels tab, and then click Cuedesk. The Cuedesk channel info section expands.
  3. In the Cuedesk API URL field, enter https://api.cuedesk.com/v1/messages.
  4. In the Bearer token field, enter the API key you copied from the Cue workspace.
  5. Under the Inbound messages section, in the Secret Key field, enter the secret you copied for the Inbound webhook you created in the Cue workspace.
  6. Under the Outbound messages section, in the Secret Key field, enter the secret you copied for the Outbound webhook you created in the Cue workspace.
  7. Click the Publish button and wait until the channel is activated.

Step 3. Create Cue flows dedicated to DRUID bot integration

After activating the Cuedesk channel in the DRUID Portal, create two dedicated flows in the Cue workspace: one for 'New conversation' and the other for 'Live chat ticket closed'.

Follow these steps to create the flows:

  1. Download the 'New-Conversation-Sample-Flow'. This sample flow is designed for the WhatsApp channel but can be adapted for Facebook Messenger.
  2. All messages received from users in the WhatsApp channel via Cue will be handled by the DRUID bot. If the bot can't answer a question, it will use the internal action ConnectToHelpdeskAgent to transfer the user to Cue Live Chat, and a ticket will be created in the Cue Inbox. Once an agent closes a ticket, the user-bot conversation will continue.

  3. Create a flow for 'New Conversation' and configure it:
    1. In the Cue workspace, click the Flows icon on the main menu.
    2. On the Flows page, click Create a flow.
    3. Provide a flow name and description, select the channel and from the Trigger field, select New conversation.
    4. Click Next. The flow diagram will appear.
    5. Click the three dots at the top-right corner of the Flow Diagram and select Import Flow.
    6. Browse for the 'New-Conversation-Sample-Flow' you previously downloaded and select it.
    7. Click on the POST step and in the URL enter the Conversation status CallBack URL. Get this URL from the Cuedesk channel settings, under the section Conversation status.
    8. In the POST step, click the Body section and replace the value of the "to" property with the channel ID. To find the channel ID, on the Cuedesk workspace menu, click Channels and copy the channel ID for the desired channel you're using in the flow.
    9. Hint:  The structure of the Request Body in the POST step matches the Body Template structure that DRUID expects, as shown in the Conversation Status section of the channel configuration.
    10. Save the step.
  4. Create a flow for 'Live chat ticket closed' (for this flow, from the Trigger field, select Live chat ticket closed.
Note:  After the user sends the first message in the WhatsApp channel, a new conversation begins. This conversation remains active for 24 hours or until the user types "end" in WhatsApp.

Assigning tickets to specific Cuedesk queues

To assign tickets directly to a designated Cuedesk queue, use the internal action ConnectToHelpdeskAgent and simply provide the name of the desired Cuedesk queue as a string value within the QueueCode parameter.

Receiving and Processing Voice Messages

Note:  Voice message support is available in DRUID 8.12 and higher.

DRUID currently supports audio messages only through Microsoft Cognitive Services. It supports all languages available in the Azure Speech Service. For a complete list of supported languages, refer to Language and Voice Support for the Speech Service.

Here's how it works:

  1. Receive audio messages. When a user sends an audio message via Cuedesk, the bot will:
    • Process the audio recording using Azure Speech resources configured in the channel settings.
    • Recognize the language for Speech-To-Text (STT) based on the user's language ([[ChatUser]].Language).
    • Log in the Conversation History the user message type as 'Audio Recording'.
  2. Process audio. The bot:
    • Converts the audio message to text using Microsoft Cognitive Services.
    • Uses the converted text to predict the next conversational step.
  3. Respond. By default, the bot will respond to voice messages with text. You can choose the bot to reply with voice.

To enable voice messages support, follow these steps:

  1. In the channel configuration page, tap on Support voice messages.
  2. Enter your MS Azure Speech API key and select the region.
  3. By default, the bot replies with text. To have the bot respond with voice, toggle on Reply with voice messages.
  4. In the table, click the plus icon. A row is added to the table.
  5. From the Language drop-down, select the bot language (default or additional) and from the Voice drop-down, select the human-like neural or standard voice the chatbot will use to respond to the user.
  6. Click the Save icon displayed inline. You can add more languages and different voices per language as best suits your needs.
  7. If the channel has not been published yet, click Publish.
  8. Click the Save button at the bottom of the page to save the bot configuration.