Skip to content
FacebookYouTubeX (Twitter)

Tutorial 4 - Explicit Human Handoff with User Intent

Learn how to implement explicit human handoff functionality using a Dialogflow intent in your Pingstreams integration.

We’ll start from Tutorial 1 - Dialogflow as external chatbot, building on the foundation we established there.

You must use the code in Tutorial 1. The code is available on Github here.

Fork the tutorial code using the Fork button. Now you have a copy of the tutorial on your own repo.

In the previous tutorial we learned how to automatically switch to a human agent based on the number of consecutive fallbacks during a conversation.

What if you want the user to explicitly choose to switch to a human during a conversation?

In this case the simplest thing that you need to do is start from any of the above tutorials, adding a specific intent to Dialogflow that will switch to a human agent.

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).

Talk to Agent Intent

Now configure the intent to reply with:

I'm putting you in touch with an operator
\agent

Intent Response

As soon as this phrase reaches Pingstreams, it automatically removes the chatbot and adds a human operator - following the rules you already set up in the Routing section or in the specific department.

To test the new talk-to-agent intent we also place a button under every Dialogflow reply (using microlanguage) to allow the user to ask for an agent after each reply. Let’s train for instance the defaultWelcome Intent to show this optional button (using microlanguage to add the buttons):

Welcome with Button

On every welcome intent reply the widget will show the “Talk to agent” button:

Button Display

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 (compatible with the routing rules, opening hours and agents availability).

Agent Handoff

You can train your “talk to agent” intent with various phrases that users might use to request human assistance:

  • “I want to talk to an agent”
  • “Connect me to a human”
  • “I need help from a person”
  • “Can I speak to someone?”
  • “Transfer to operator”
  • “Human support please”
  • Add “Talk to agent” buttons strategically, not on every response
  • Consider adding them after complex questions or when offering multiple options
  • Use them in FAQ-style responses where users might need more detailed help
  • Keep the handoff message friendly and informative
  • Set user expectations about wait times if applicable
  • Consider different responses based on business hours
  • Make the handoff seamless and natural
  • Provide clear confirmation that the request has been processed
  • Ensure the transition message is branded appropriately

You can enhance this basic implementation by:

  1. Contextual handoff: Different handoff messages based on the conversation context
  2. Skill-based routing: Route to specific agent groups based on the conversation topic
  3. Priority handling: Mark certain handoff requests as high priority
  4. Analytics tracking: Track which topics most commonly lead to human handoff

Enjoy Pingstreams!