Attached Flows

Attach flows to each other in a modular fashion

Description

In order to remove the need to replicate functionality across Flows, Flows can be attached to other Flows in Cognigy AI.

In order to do that, you first write the Flow with the functionality you want to share with other Flows and then attach it to the Flows which should include the functionality.

๐Ÿ‘

Build and refactor Flows in a modular fashion

As a best practice we recommend to keep your Flow size small. Refactor often and use a modular approach for clear, maintainable and performant Flows.

Note you can copy, cut & paste nodes and sub-trees also between Flows. Making it easy to, for example, cut sub-trees from a large Flow and distribute the logic to smaller attached Flows.

Cognigy Flows and User Flows

You can attach other User Flows as well as Cognigy Flows which provide default functionality for, e.g., small-talk.

Concept

Flow functionality is shared between Flows by making their Intents available in the other Flow. If the Intent of the attached Flow is scored highest, the attached Flow is executed instead of the main Flow.

โ—๏ธ

Lock your Attached Flow

When the Attached Flow is executed, its highest locked version is the one that is executed. Please make sure to lock it after making changes.

Intent Inheritance

As described above, the Intents of the Attached Flow are added to the list of Intents on the Main Flow. Then, during Intent mapping, the attached Intents are scored together with the Main Intents.

๐Ÿšง

Beware of Overlapping Intents

Cognigy small-talk Flows, and any other Attached Flow, may contain Overlapping Intents. You must ensure Intents across your Intents in the Main Flow and all attached Flows are distinct.

The order in which the Intents are scored is determined by the Map global Intents first setting in Projects .

If the intents scored first get a score of 1.0 (highest match), then the other intents are not evaluated.

Map global Intents first

Effect

Result

false

Intents in the Main Flow are scored first

If Intents in the Main Flow score the same or higher than Intents in Attached Flows, Intents in the Main Flow win.

true

Intents in Attached Flows are scored first

If Intents in Attached Flows score the same or higher than Intents in the Main Flow, Intents in Attached Flows win.

Attach Flows from the Flow Editor

Select the Attached Flows button from the left-hand navigation pane of the Flow Editor.

You can attach available Flows as follows

  1. Click at the + Attach button in the bottom option pane. The view will switch to Attach mode.
  2. Toggle or detach any Flows you want to attach by clicking on them. Changes are saved directly.

You can sort the Intent mapping of available Flows as follows

  1. Click at the Sort button in the bottom option pane. The view will switch to Sort mode.
  2. Sort attached Flows by dragging and dropping Flows by clicking and dragging the Flow name or handle icon.

Did this page help you?