Control Flow
Control Flow blocks that are available in the Plugin Editor.
Conversation Process Decision Policy

What is a Conversation Process Policy? How should it be used?
A Conversation Process Policy executes a set of process blocks in the plugin if a condition is met. Learn more about policies here.
This policy block effectively controls the decision making process of AI agents. It's meant to emulate the decision making process of humans.
For example, your organization might have a policy that flights must be booked at least 7 days in advance. You can use a decision policy to split the AI agent's process.
- If more than 7 days, the AI agent can book the flight for the user.
- If less than 7 days, the AI agent can collect an approval from a skip manager, and then book the flight.
- If less than 3 days, the AI agent can inform the user to book the flight with a personal card & submit a reimbursement request.
Anatomy of a Decision Policy
- Required Slots - a the set of slots which must be collected before making the decision.

-
Cases - Each case executes a series of process blocks if a DSL expression evaluates to
true
For Example : Let assumed you have a slot called
asana_project
. And based on the user choice for this slot, you want to write a rule which will decide the flow of the Use case.- In order to reference Slot values effectively in the DSL use then as follows
data.<slot_name>.vlaue == "<project_name>"

- Default - The series of process blocks to execute if none of the cases evaluate to
true
Exit Block

- Exit Block does nothing. we need this if we require a “default” clause to every switch statement, which many languages require. If someone doesn’t want to do anything in the default case, great news - they can put a noop in the default!
Continue Block

- Continue Block exits the whole program. Critical for control flow, especially if users want to exit after one branch in a nested switch statement, but other branches in that switch don’t exit. Exit is NOT in charge of returning data, btw (data is “returned” via activities!). It is just an exit() call.
Updated 7 days ago