Skip to main content
A rule tests an action with an expression and applies an effect when the expression is true. Rules run before an action is dispatched. An expression reads the fields covered in Expressions: payload, metadata, tags, variant, version, destination, and destinations.

Evaluation

A rule belongs to one action definition. Before that action dispatches, Arklow evaluates the definition’s active rules in priority order, lowest number first. The first rule whose expression is true applies its effect, and evaluation stops. Priority controls the order. Give more specific rules a lower number.

Effects

Assign Tags

Merges tags onto the action. Tags select the lane the action runs in.
Set Effect to Assign Tags and add a priority tag set to high. A tag value can also be read from action metadata. Use that when a source attribute or caller-supplied fact should become part of the action’s routing or lane identity.

Mutate

Changes the payload before it reaches the destination. A mutation can set a path to a JSON value, set it from a metadata path, or remove it.
Mutations are useful at an integration boundary: normalize a field for one flow without requiring the source or destination to understand the other side’s shape.

Dispatch

Routes the action to the linked destination whose tags match. Exactly one linked destination must match.
Set Effect to Dispatch and add a region destination tag set to eu.

Skip

Drops the action from this dispatch.

Terminate

Ends the action.

Add a rule

Rules are managed on the action definition’s Flow tab.
1

Open the action

Open the action definition and select the Flow tab.
2

Open the rules

Open Dispatch Rules from the rules node, then click Add rule.
3

Write the rule

Enter a Name and an Expression, pick an Effect, and set a Priority.
4

Configure the effect

For Assign Tags, fill Tags to assign. For Dispatch, fill Destination tags to match. For Mutate, add the payload operations in the order they should run.
5

Save

Click Create.

Reference

Expressions

Operators

API Reference