Logical Conditions Builder
Set granular rules for when a skill executes, requires approval, or is blocked
The Logical Conditions Builder allows you to go beyond simple "Always execute" or "Always request approval" settings. It provides an intuitive, visual rule engine (AST) so you can create complex, data-driven decisions on how your AI handles specific tasks.
Why Use Logical Conditions?
Imagine you have a Process Refund skill. You don't want the AI autonomously issuing $1,000 refunds, but requiring a human to approve a $5 refund creates unnecessary overhead.
With the Logical Conditions Builder, you can define:
- Execute Normally: If
RefundAmount< $50. - Require Approval: If
RefundAmount>= $50 ANDRefundAmount< $200. - Block Execution: If
RefundAmount>= $200.
Accessing the Builder
- Go to Skills in the left sidebar.
- Under My Integrations, select a skill (e.g., Shopify).
- In the list of Attributes, click the "Configure" button for the action you want to restrict (e.g.,
Cancel Order). - In the drawer, navigate to the Execution Rules section.
- Choose the Custom Conditions option.
- The Logical Conditions Builder will appear.
Building Rules
The builder uses an If/Then structure based on the specific parameters of the Skill Attribute.
1. Select the Data Field (Parameter)
The dropdown will list all available inputs for that specific attribute (e.g., OrderValue, SubscriptionType, CustomerTier).
Note: You can also evaluate Context data passed via the SDK or Installation snippet.
2. Choose an Operator
Compare the data field against a condition. Available operators include:
Equals/Does Not EqualContains/Does Not ContainGreater Than/Less Than(for numbers)
3. Set the Value
Type the value you want to evaluate against.
4. Determine the Outcome (Action)
If the condition is met, what should the AI do?
- Execute: Run the skill automatically.
- Require Approval: Pause and ping an admin for human sign-off.
- Block: Refuse to execute the skill and tell the contact the action is restricted.
Nested Logic (AND / OR)
You can stack multiple conditions to create precise parameters for execution.
- Use AND when all conditions must be true:
RefundAmount > $50 AND CustomerTier = "Standard" -> Require Approval. - Use OR when any condition can be true:
CustomerTier = "VIP" OR DaysSincePurchase < 30 -> Execute.
Evaluation Order (Priority)
Rules are evaluated from top to bottom. The first condition that resolves to True dictates the action. If no conditional rules match, the Skill falls back to the Default Execution Policy defined for that Attribute.