Chat Bot Integration (Dialogflow API v 1)

This article contains the steps needed to integrate your Dialogflow (previously API.ai) chatbot with Upwire’s voice builder to enable your chatbot conversations to be delivered via a voice call.

Note: Other AI bots can be connected on request. Please contact support@upwire.com for more details.


THE INSTRUCTIONS BELOW USE DIALOGFLOW'S API v1 WHICH IS BEING DECOMMISSIONED BY DIALOGFLOW AS OF OCTOBER 23, 2019. FOR INSTRUCTIONS ON HOW TO USE DIALOGFLOW'S API v2, CLICK HERE.


What you will build

Set up a voice template as follows:

Steps:

Voice builder

1. Drag an Information module onto the canvas and connect it to the green start module. Click on the cog in the middle of the module to add text to speech for your welcome message. Note: that this step is optional.

2. Drag on a Bot module and connect it to the previous module.

3. Click on the Branching icon on the Bot module and set desired keywords for additional branching (e.g. “help” “transfer” “end”) as set out below. These keywords will “interrupt” the bot and can be used to transfer to a live agent or drop the caller into a more traditional IVR call. Note that this step is optional but recommended.

4. Drag on a Transfer module and connect it to the relevant node on the Bot module (if applicable). Set your transfer destination number by clicking on the Basic Info icon and entering the required phone number. See How do I use the Transfer module? for more information.

5. Drag on any other desired modules and connect to any remaining nodes on the Bot module (if applicable).

6. Drag on an Information module and connect it to the fail node of the Bot module. Click on the cog in the middle of the module to add text to speech for your error message. This is the message that will be delivered if a connection to the bot fails.

7. Remember to drag on a Hang Up module to connect to any remaining nodes to end the call as required.

Create new variable

In the “Assets” section (lop left of the voice builder canvas):

1. Select “variables”
2. Click “Add a Variable”
3. Rename variable to “speechReceived”

Complete Chatbot module settings

1. Click on the API Endpoint icon in the module menu

2. Set endpoint to https://a.upwire.com/features/apiAIHandler

3. Set request type to POST

4. Click on the API Request Bindings icon

5. Add the following bindings:

  • bind static value [Dialogflow customer access token] to parameter “access_token”
  • bind static venue [your timezone e.g. -0800] to parameter “timezone”
  • bind static value [en] to parameter “lang”
  • bind static value [value] to parameter “query”


D
David is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.