Goal: To transition from a flow into a playbook and then into another flow. The parameters from the flow must be carried into the playbook, Have the playbook script run, based on the script logic, pass parameters from the playbook to the according flow.
Error: I can see the output parameters in the playbook execution, and I can see it transition to the correct flow. BUT, in the transitioned flow, the session parameters are not set.
Things I checked:
the name of the output parameters in the playbook are the same label as the session parameter used in the flow. The playbook logic for setting them is working. The issue likely lies in how those parameters are being handled during or after the transition back to the flow. I am using a routine playbook. I am accessing the session params in the flow via: $session.params.parameter-name.
Below are images of the test convo console, showing the playbook execution and triggering the correct flow, and labeling the output parameters correctly. The second image is the start page of the flow that is transitoned to along with the sesssion parameter used.
Please let me know if you can help
Hi @Ian_Stack,
Welcome to Google Cloud Community!
When a Playbook finishes and needs to hand control back to Dialogflow CX (potentially transitioning to a specific Flow/Page and setting parameters), it must return a specific JSON payload in its webhook response. Simply defining output parameters in the Playbook configuration within the Dialogflow CX console isn't enough; the Playbook's actual execution (e.g., your Cloud Function or webhook code) must return the correct structure.
The key part of this JSON response for setting session parameters is the sessionInfo.parameters field.
As a workaround, you may modify your Playbook’s return value. Your Playbook's code (the script/function that runs) needs to construct and return a JSON object.
Also ensure correct parameter names.** **Double-check that the keys within the sessionInfo.parameters object in your Playbook's JSON response exactly match the names of the session parameters you are trying to access in Flow B (e.g., esc_text, ccaip_channel, etc.). Case sensitivity matters.
You can also try to verify the transition target. While Dialogflow CX might correctly infer the transition based on the Playbook node's configuration, it's robust to explicitly include the targetFlow (and optionally targetPage) in the Playbook's response JSON. Replace the placeholders <...> with your actual project, location, agent, and flow IDs. You can find these IDs in the Dialogflow CX console URL or by using the API. The target flow ID should be the ID of your "Chat - Account Info" flow.
Feel free to check this similar case which you may find useful.
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.
Hello there is this semi helpful,
You talk about the playbooks return value. In my playbook I am able to succesfully take in the session parameters from the flow into the playbook.
But now if I want to transition to another flow, and have some parameter presets, would I do that with natrual language?
For example, in the image below, is my prompt based on if that intent is triggered. And the second image below is the the route/parameter presets that I am trying to mimic in playbooks. Is this practice correct?
Is this how you would alter the session parameters to go from playbook to flow?
How do I populate the output parameters via playbooks
@ruthseki any comments on this?