Skip to content Skip to main navigation Skip to footer

Dialogflow connector: handoff to human agent example

What if, during a conversation with your Dialogflow agent, you want the user to opt for a switch to a human agent?

The simplest thing that you can do is adding a specific intent to your Dialogflow agent that will switch to a human agent with a specific instruction in the reply.

Train the ‘talk to agent’ intent

Open your Agent’s Dialogflow console. Add a new intent. Let’s call this intent ‘Talk to agent’. We’ll train this intent with a single phrase (more phrases can be added as a convenience).

Now the intent will reply with:

We are putting you in touch with an operator
\agent

Copy and paste this text in the Responses section of the “Talk to agent” intent:

Questa immagine ha l'attributo alt vuoto; il nome del file è 79358037-07e0db80-7f41-11ea-8d3b-ea4064ea2edf.png

The \agent keyword, at the end of the reply phrase, will never be shown to the enduser. It is an instruction for Tiledesk to switch the conversation to humans. As soon as Tiledesk see this instruction in the text it will remove the current chatbot (the Dialogflow agent) from the corresponding conversation and will try to invite a human, following the current department rules. If no agents are available the conversation will wait in the “unserved” queue until an agent becomes available again.

To test the new “Talk to agent” intent we also place a button under every DF reply (using Microlanguage) to allow the user to ask for an agent after each reply. Let’s train, for instance, the Default Welcome Intent Intent to show this optional button (using Microlanguage you can easily add a button with * symbol (starting a new line) followed by one space and the button text)

Hi! How are you doing?
* Just questions
* Talk to an agent

From now on every welcome intent reply the widget will show the “Talk to agent” button.

If we tap the button the “Talk to agent” intent will be invoked and the user will be routed to an agent on the current department (following the department routing rules, opening hours and agents availability).

Do you have any feedback on this article? Please send us your feedback writing an email to info@tiledesk.com

Enjoy Tiledesk!


Was This Article Helpful?

0 Comments

There are no comments yet

Rispondi