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

Error Handling in Redirecting Inputs Between Playbooks in Conversational Agents

Hi everyone,

I'm developing a chatbot using Conversational Agents and encountering an issue when redirecting users between playbooks based on their intents. I'm using the Default Playbook specifically to redirect users to other playbooks.

Hereโ€™s the problem:
When I redirect the user from the default playbook to another playbook and try to add a new input in the redirected playbook, I receive the following error:
"Playbook output should be empty for pending invocation of playbook."

This error prevents me from adding any new inputs because the output appears to be blocked.

In some cases, when redirecting from the default playbook, the redirected playbook directly provides the answer to the user's initial input. This happens because the input from the default playbook is passed along to the redirected playbook. However, when I need to ask additional questions within the redirected playbook, I'm unable to do so because of this issue.

Has anyone encountered this error before? How did you resolve it? Any guidance on how to make this work would be greatly appreciated!

Thank you in advance!

0 2 177
2 REPLIES 2

hello,

I have the same issue since 3 weeks now.

I 'am waiting for a response, to me it is a bug because all was working prรฉviously

Hi @EBastiani,

Welcome to Google Cloud Community!

It looks like you're encountering an error when working with Conversational Agents playbooks. This error typically occurs when there's an attempt to pass output from one playbook to another without properly handling the transition. Specifically, this error usually arises when there's a conflict between the output of the default playbook and the input expectations of the redirected playbook.

Here are potential ways that might help with your use case:

  • Clear the Output Before Redirecting: Make sure that you clear the output of your default playbook before redirecting to another playbook to prevent any lingering output from causing conflicts with the redirected playbook.
  • Use input parameters: You might want to define input parameters in your playbooks to match the output parameters of the default playbook, ensuring the redirected playbook receives only necessary data and avoids conflicts.
  • Use a "Trigger" Input in the Redirected Playbook: You may want to have your redirected playbook begin with a specific 'trigger' input. This input simply acts as a signal that the playbook has been invoked, rather than automatically processing the passed input.
  • Review your Playbook states: Make sure that your redirected playbook is in the correct state to receive new inputs and that your state transitions between playbooks are correctly configured. Sometimes, the state of your playbook or conversation can affect how it handles incoming and outgoing data.
  • Check Examples and actions: You might want to review the examples and actions defined in your playbooks to ensure they are properly configured.
  • Debugging/Logging: You may want to implement robust logging in both your Default Playbook and your redirected playbooks. Log the input, output, and any session variables before and after each action, including redirects.

For more information about Conversational Agents (Dialogflow CX), please refer to the documentation.

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.