Skip to main content
Intermediate · 25 minutes · Cognigy
Let the agent Klara hand a conversation over to a flow, and let the flow hand the conversation back to Klara.

What you will build

In this tutorial, you extend Klara, the customer service agent for the fictional company ACME Express. When a customer wants to change a delivery date, Klara hands the conversation over to a flow. The flow asks for the new date and confirms it. Then the flow hands the conversation back to Klara. A handover in both directions has two parts: Use a flow for a scripted step that must run the same way every time, such as collecting a date, completing a form, or verifying an identity.

Before you start

Before you start, make sure you have the following:
  • The project Klara Tutorial with the agent Klara. To create them, follow Build Klara, a customer service agent.
  • The Route to Flow tool and the Agents node are turned on for the project. To turn them on, go to Manage > Settings > Agent Settings and turn on Enable Route to Flow tool and Enable Agents node. Both are off by default.

Steps

1

Create the flow

  1. In the left-side menu of the project, go to Design > Flows.
  2. In the upper-right corner, click New Flow.
  3. In the Name field, enter Reschedule Delivery.
  4. Click Create. The flow chart opens with a Start node and an End node.
2

Ask for the new date

  1. Click the plus icon below the Start node. In the search field, enter Question and select Question.
  2. Click the Question node. The Edit Node panel opens.
  3. From the Question Type list, select Text.
  4. In the Text field, replace Yes or No? with the following text:
  5. Click Save Node.
The Edit Node panel of the Question node with the question type Text and the text asking for the delivery date.
The Question node stores the answer from the customer in input.result.
3

Confirm the date

  1. Click the plus icon below the Question node. In the search field, enter Say and select Say.
  2. Click the Say node.
  3. In the Text field, enter the following text:
  4. Click Save Node.
The Edit Node panel of the Say node with the confirmation text that includes the input.result token.
In this tutorial, the flow doesn’t change a real booking. In your own project, add a node here that calls your delivery system, such as an HTTP Request node.
4

Hand the conversation back to the agent

The flow ends after the Say node, but it still owns the conversation. Without a further step, the next message from the customer goes to the flow and starts it again from Start. To return the conversation to Klara, add an Agents node. The Agents node must be the last node in the flow. No node can follow it.
  1. Click the plus icon below the Say node. Open the AI category and select Agents. On the flow chart, the node shows Route to Agent.
  2. Click the node. In the Agent list, select Klara.
  3. Turn on Handoff Configurations. The toggle is off by default. When you turn it on, the Opening Instruction and Share Conversation History fields appear.
  4. In the Opening Instruction field, replace the default text, “Greet the user and briefly explain how you can help.”, with the following text. Klara follows this instruction when the conversation returns to her.
  5. Keep Share Conversation History set to Last exchange only. Klara then sees everything from the customer’s last message onward: the date and the flow’s confirmation. This lets her confirm the date without asking again.
  6. Click Save Node.
The flow Reschedule Delivery with the nodes Question, Say, and Route to Agent, and the Edit Node panel with Klara selected and the opening instruction filled in.
5

Add the route to flow tool

Add the tool that lets Klara start the flow.
  1. Go to Design > Agent and open Klara.
  2. Go to the Tools tab and click Add tool.
  3. On the System tools tab, select Route to Flow.
  4. In the Name field, enter Reschedule Delivery.
  5. In the Description field, replace the text with the following text. Klara reads the description to decide when to call the tool.
  6. From the Select flow list, select Reschedule Delivery.
6

Configure the handover

Continue on the same page:
  1. Under Handoff message, keep AI filled. Klara then writes the sentence that she says before the handover.
  2. In the Flow start message field, enter Reschedule my delivery. Cognigy sends this text to the flow as its first input, so the flow responds right away instead of waiting for the customer to type.
  3. Under History mode, keep None. The flow then receives none of the earlier conversation. It doesn’t need any, because it asks for the date itself. The other options are Last turn, AI-generated summary, and Full conversation.
  4. Click Save. The tool appears on the Tools tab as a direct tool.
The Edit tool page for the Route to Flow tool with the flow Reschedule Delivery selected, the handoff message set to AI filled, the flow start message, and the history mode None.
7

Test the round trip

  1. In the upper-right corner, click the chat icon to open the Interaction Panel.
  2. Select Chat.
  3. Enter Hi, I need to change the delivery date of my parcel. Klara says a short transition line that she writes herself, for example, “Sure, let me take you to our rescheduling process.” Then the flow asks “Sure, I can help you reschedule. On which date would you like your delivery?”
  4. Enter 2026-11-13. The flow answers “Done. Your delivery is rescheduled for 2026-11-13.”
  5. Klara takes the conversation back right away, in the same turn, and follows the opening instruction, for example, “Your delivery date has been changed to November 13, 2026. Is there anything else I can help you with?”
An animation of the Interaction Panel. The customer asks to change the delivery date, the flow asks for a date, the customer enters 2026-11-13, the flow confirms it, and Klara confirms the change and asks if the customer needs anything else.

What you built

You created a flow that collects a delivery date and a Route to Flow tool that lets Klara hand a conversation over to it. You added an Agents node at the end of the flow that hands the conversation back to Klara with an opening instruction. You tested the round trip in the Interaction Panel. From the moment the agent calls Route to Flow until the flow reaches the Agents node, the flow owns the conversation. You can use the same pattern for any scripted step, such as verifying an identity or completing a form.

More information

Last modified on November 11, 2026