Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cannot transition from a Playbook to a flow or another agent.

Hi

https://cloud.google.com/dialogflow/cx/docs/concept/playbook/instruction -> The documentation provides an example of how a playbook can delegate to a flow if triggered.

CosminB_0-1733499908090.png

When I try to do something similar it does not allow it, for now I've placed placeholders to test it out, the answers are good, but it cannot delegate. Any idea why?

Many thanks for the help!

0 2 367
2 REPLIES 2

You should have Flow in the dropdown of options but routing to a Flow is a restricted access feature so maybe you don't have this switched on.

Adrian

Hi @CosminB,

Welcome to Google Cloud Community!

The key issue is that the instructions are written in a format suitable for a human reader, but not directly executable by the system. While the instructions describe what actions to take based on user input, they lack the precise, structured format needed for the system to delegate to other flows or tools.

Here's why the delegation might fail:

  • Missing Integration Points: The instructions mention "FlowQueryKB," "FlowTicketStatus," and "FlowItTicketRequest." These are likely placeholders for the actual identifiers of Dialogflow CX flows or external tools. The system needs to know precisely how to connect to these resources (e.g., using specific API calls, event names, webhook URLs, etc.). The instructions don't provide these crucial integration points.
  • Incorrect Syntax for Delegation: The system expects commands or code that explicitly trigger the delegation. Simple text descriptions won't work. You need to use the system's specific syntax for invoking flows or tools (this varies significantly depending on the platform; Dialogflow CX uses different mechanisms than, say, a custom chatbot built on a different framework).
  • Ambiguous Conditions: The "If the user…" section needs to be translated into formal conditions that the system can understand. Natural language isn't precise enough; you need to use the platform's logic mechanisms (e.g., intent matching, parameter checking). For example, instead of "Asks an IT-related question," you need to specify a concrete intent name recognized by the Dialogflow CX agent.

Here are some workarounds that you may try:

  1. Consult Platform Documentation: Thoroughly review the Dialogflow CX documentation on how to integrate flows and external tools. Look for keywords like "transitions," "events," "webhooks," "fulfillment," or similar terms, in Dialogflow CX.
  2. Define Explicit Flows/Tools: Ensure that "FlowQueryKB," "FlowTicketStatus," and "FlowItTicketRequest" are the actual names of correctly configured flows or tools within your Dialogflow CX agent.
  3. Use the Correct Delegation Syntax: Replace the informal instructions with the appropriate commands or code to trigger these flows or tools based on the user's input. This usually involves things like:
    • Intent Matching: Connect specific user intents (defined in your Dialogflow agent) to actions such as calling a particular sub-flow.
    • Parameter Extraction: Extract information from the user's input (using Dialogflow's parameter mechanisms) to customize the delegated flow's behavior.
    • Webhook Calls: If you're integrating with external tools, you'll need to make webhook calls to trigger them and handle their responses.
  4. Structured Conditional Logic: Translate the "If the user…" sections into clear conditional statements within your Dialogflow CX agent's flow design. This usually involves branching logic based on detected intents or parameters.

Example:

Instead of: "If the user asks an IT-related question, reply "FlowQueryKB" back to the user," you'd do this:

  • Define an intent: it_related_question
  • Create a transition: When it_related_question is detected, transition to the FlowQueryKB sub-flow.

You may also check this Playbook best practices for additional guidance.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.