Configuring Action Bot Chat Notifications

Configuring Action Bot Chat Notifications

Common chat tools such as Slack, Google Chat, or Microsoft Teams support the use of webhooks to generate automated messages to defined channels. This article describes how to configure Sharpen Action Bots to trigger useful messaging based on Sharpen data triggers.

Create the Action Bot

If you haven’t configured an Action Bot, please review Action Bots. This guide assumes familiarity with action bots.

  1. Login to Sharpen

  2. Navigate to Admin>Configuration>Logic & Actions

  3. Create a new action bot

  4. Configure the Trigger and Data Source(s) to fit the appropriate data and criteria for sending the notification

    1. (e.g. If I want to send a Slack message when a call enters “Support Q,” I will configure an “Event” trigger on the “Support Q” for the “Enter Q” event. I will select “Queue Call Manager Activity” as my data source, and will select Cid Number, Queue Call Manager ID, Queue Name, and Inbound Number as my fields)

    2. If additional assistance is needed with this step, please visit Action Bots.

  5. Configure the action per the next section below

Setup the Webhook & Create the Action (Messaging Notification)

This method will only work if your chat tool has an inbound webhook configured. Configuring these webhooks typically requires appropriate permissions to be set. If you do not see the options disclosed in this guide, please confirm the appropriate permissions are enabled for your user.

Slack

Configure the Webhook Navigate to your slack “custom integrations” configuration e.g. https://orgname.slack.com/apps/manage/custom-integrations Click on “Incoming Webhooks” Click the “Add to Slack” button Find the desired destination channel from the “Choose a channel…” drop down Click the “Add Incoming Webhooks Integration” button The slack channel will confirm the addition of the webhook as shown below Take note of the “Webhook URL” on the next screen Configure the Action Continuing from step 5 of “Create the Action Bot” above, move onto the “Actions” section of the action bot. Click the + Add button at the top right of the “Actions” panel Search for url in the drop down and choose “URL” from the “ALERT” section Utilizing the URL copied from step 7 above, paste the full url into the URL field Set POST for the “Request Method” Enter 'Content-Type: application/json' for the “Header” field Enter the “JSON Params” in a JSON body compliant with what slack requires. e.g. { "channel": "#SupportTeam", "username": "Notification Bot", "text": "<!here> A call from %%queueCallManager__CidNumber%% to %%queueCallManager__InboundNumber%% has entered the %%queueCallManager__QueueName%% queue.", "icon_emoji":":smirk:" } Click the green “Save” button Your action bot is ready to go

Google Chat

Configure the Webhook Navigate to chat.google.com Identify the destination Space from the “Spaces” tree Click the drop down for the Space and choose “Manage webhooks” Name the Incoming webhook and save or identify an existing one An icon can be added via the “Avatar URL” field if necessary Click the clipboard button to copy the webhook url Configure the Action Continuing from step 5 of “Create the Action Bot” above, move onto the “Actions” section of the action bot. Click the + Add button at the top right of the “Actions” panel Search for url in the drop down and choose “URL” from the “ALERT” section Utilizing the URL copied from step 5 above, paste the full url into the URL field Set POST for the “Request Method” Enter 'Content-Type': 'application/json; charset=UTF-8' for the "Header" field Enter the “JSON Params” in a JSON body compliant with what Google Chat requires. e.g. { "text": "<!here> "A call from %%queueCallManager__CidNumber%% to %%queueCallManager__InboundNumber%% has entered the %%queueCallManager__QueueName%% queue.", } Click the green “Save” button Your action bot is ready to go

Microsoft Teams

Configure the Webhook Navigate to teams.microsoft.com Choose the channel appropriate channel which is the intended destination for notifications Find the ellipsis at the top right corner and choose “Connectors” Search for “Incoming Webhook” and click “Add” After adding the “Incoming Webhook” Click the “Configure” button If “Configure” doesn’t show, you may need to add “Incoming Webhook” to your team through the apps store Confirmation of your webhook being added will show similar to this Give your Incoming Webhook at name Upload an image if desired Click “Create” Take note of the webhook url Configure the Action Continuing from step 5 of “Create the Action Bot” above, move onto the “Actions” section of the action bot. Click the + Add button at the top right of the “Actions” panel Search for url in the drop down and choose “URL” from the “ALERT” section Utilizing the URL copied from step 9 above, paste the full url into the URL field Set POST for the “Request Method” Enter Content-Type: application/json for the "Header" field Enter the “JSON Params” in a JSON body compliant with what Teams requires. e.g. { "@type": "MessageCard", "@context": "http://schema.org/extensions", "themeColor": "0076D7", "summary": "New Q Call", "sections": [{ "activityTitle": "A call has entered the Q", "activitySubtitle": "A call from %%queueCallManager__CidNumber%% to %%queueCallManager__InboundNumber%% has entered the %%queueCallManager__QueueName%% queue.", "markdown": true }], "potentialAction": [{ "@type": "ActionCard", "name": "Add a comment", "inputs": [{ "@type": "TextInput", "id": "comment", "isMultiline": false, "title": "Add a comment" }], "actions": [{ "@type": "HttpPOST", "name": "Add comment", "target": "https://docs.microsoft.com/outlook/actionable-messages" }] }] } Click the green “Save” button Your action bot is ready to go