Integration Guide

Dialogflow Campaign Configuration Guides

This document details how to configure telephony and text campaigns with Dialogflow and Thrio

November 15, 2019

TOPIC

Dialogflow Integration | Artificial Intelligence

UPDATED

Steps for configuring a Dialogflow telephony campaign in Thrio:

Pre-configuration step: Ask Thrio to configure a 'Google conversations' AI service for your Thrio tenant

  1. Enable Dialogflow for your google project
  2. Go to your Thrio tenant page and add a Security token
  3. Navigate to the dialogflow console (https://dialogflow.cloud.google.com/)
  4. Create a new agent
  5. Navigate to fulfillment on the left hand side menu
  6. Use the toggle to enable the webhook
  7. URL: https://chelsea.thrio.com/workflows/api/bot/workitem/{campaignId}
  8. Headers: Key: Authorization, Value: token obtained from step 2
  9. Disable webhook for smalltalk
  10. Navigate to integrations on left hand side menu
  11. Click "Dialogflow Phone Gateway" and follow the steps to provision a phone number
  12. Add the number from step 7 as a campaign address in Thrio
  13. Create a campaign in Thrio for your dialogflow telephony agent
  14. Add the number from steps 7 and 8 to this campaign and also add another voice enabled number
  15. In the begin state of the workflow add a new transition action to a "transfer to dialogflow" state with the following condition: workitem.type == 'InboundCall'
  16. In the "transfer to dialogflow state" add a 'External Transfer to Dialogflow' action with the number from step 7 in the Number field (put the number in quotes like so '+14253121258')
  17. In the "transfer to dialogflow state" add a transition action to a new "webhook" state
  18. In the "webhook" state add a new 'Wait for bot webhook' action
  19. In the "webhook" state add a new 'Transition By Name' action with 'workitem.data.botWebhookRequest.action' (no quotes) in the state field

Make sure of the following:
  • All of your 'Message bot actions' are using the service configured in the prestep
  • Your intents in dialogflow have the toggle 'Enable webhook call for this intent' enabled
  • If you are using the 'Transition by name' action to transition to the appropriate state based on Dialogflow's webhook request; make sure your intents in dialogflow have the 'action' field defined and it corresponds to a valid state in your workflow

Steps for configuring a Dialogflow text based (Chat, email, SMS) campaign in thrio:

Pre-configuration step: Ask Thrio to configure a 'Google conversations' AI service for your Thrio tenant

  1. Enable Dialogflow for your google project
  2. Navigate to the dialogflow console (https://dialogflow.cloud.google.com/)
  3. Create a new agent
  4. Create a new campaign in Thrio for your text based dialogflow agent
  5. Send requests to detect the intent of a text based message by using the 'Message bot' action
  6. Find the responses to your requests in workitem.chatBotResponse

Make sure of the following:
  • All of your 'Message bot actions' are using the service configured in the prestep
  • Your intents in dialogflow have the toggle 'Enable webhook call for this intent' disabled
  • If you are using the 'Transition by name' action to transition to the appropriate state based on Dialogflow's response; make sure your intents in dialogflow have the 'action' field defined and it corresponds to a valid state in your workflow (other wise you can use conditions to transition based on expressions that use the dialogflow response)