XeniaXenia Docs

Logic

PreviousNext

The nodes that split the flow, test a condition, or let time pass.

Logic nodes decide where a customer goes next. Three of them split the flow, one gates it, and one holds the customer in place.

The distinction that matters most: a Rule sorts customers by something you already know about them, and a Multivariant Split divides the same population to find out which treatment works. Reaching for the wrong one produces a journey that looks right and measures nothing.

Rule

Sends customers down different paths by testing facts about them. In the palette it is called Rule; on the canvas it is the branch node.

Conditions are built in the condition builder over the variables available at that point, which is the same set the properties panel lists. Conditions can be grouped and nested rather than kept flat.

Configure

SettingWhat it does
BranchesThe paths and their sorting rules, each with its own conditions and an AND or OR join
DefaultWhich path is the else path, taking whoever matched nothing else

Required: at least two branches. A branch's paths are created by adding branches, not by drawing connections.

Outputs

One output per branch. Before any branch is configured, the node renders True and False.

Watch out

  • A path with no rule does not sort anyone: every customer takes the branch's first path. An unruled branch is wrong, not neutral.
  • Paths are tested in order and the first match wins, so put the narrowest path first.
  • The else path takes whoever no other path matched, so it never gets a rule of its own.
  • If the fact you want to sort on is not produced by any earlier node, the decision is not possible yet. Add the data driver that produces it first.

Wait

Pauses the customer here before the next node. In the palette it is called Wait / Delay.

Configure

SettingWhat it does
Wait modeduration, until, or event
Duration amountHow long to wait, for duration mode
Duration unitMinutes, hours, days, or weeks
Wait-until date/timeThe date to wait for, for until mode
Wait-for event nameThe event to hold for, for event mode

Nothing is strictly required: an unset mode behaves as a one-hour duration. Until mode requires the date; event mode requires the event name.

Watch out

  • duration waits per customer from the moment they arrive. until waits for one fixed date for everyone.
  • Waiting re-checks nothing on its own. To suppress a follow-up when the customer already acted, put a check node and a rule after the wait, for example Check Shopify Order.
  • If the journey should begin at a moment rather than pause at one, that is a Scheduler trigger.

Date Condition

Gates the flow on a date comparison. Use it for a sale period, a season, or a cut-off.

Configure

SettingWhat it does
TimezoneIANA timezone the comparison is made in. Unset compares in UTC
Comparisonbefore, onOrBefore, after, onOrAfter, between, outside, or on
DateThe date to compare against
End dateThe far end of the range, for between and outside

Required: the comparison and the date. With either unset the whole node passes through.

Outputs

Yes and No.

Watch out

  • It tests the clock, not the customer. Everyone arriving at the same moment takes the same path.
  • A day boundary is this node's day, not the customer's.
  • To compare a date that belongs to the customer, such as their last purchase, use a Rule and that fact's date checks.

AI Decision

Asks a model to judge something, then routes on its answer. Reach for it when the decision needs judgement over text, such as intent, sentiment, topic, or fit, that no fact can express.

Configure

SettingWhat it does
AI provider connectorThe connected AI provider
AI modelWhich model to ask
PromptThe question to put to the model. Reference facts as {{token}}
Output typeboolean for two paths, enum for one path per named case
CasesThe named outcomes, for enum output

Required: the connector, the model, and the prompt. Enum output also requires at least one case.

Outputs

Boolean output gives True and False. Enum output gives one output per case, and each case needs its own onward path.

Watch out

  • The prompt has to name the facts it should read, as tokens. The model sees nothing you do not pass it.
  • It costs a model call per customer. On a high-volume trigger, put it after a rule that has already narrowed the population.
  • If a plain comparison would do, a Rule is cheaper, instant, and auditable.

Multivariant Split

Splits traffic across variants A, B, C and beyond, to learn which treatment works. Add and remove variants down to a minimum of two.

The node runs in one of two strategies: manual, where you set the shares, or MAB, where a multi-armed bandit learns them.

Configure

SettingWhat it does
VariantsThe variants and their traffic shares. A label is a single letter
Strategymanual splits by fixed percentages, mab optimises toward a goal
Persist flow output pathKeep each customer on the variant they were first assigned
Persistence variableWhich fact identifies them for that

Required: the variants, and the persistence variable when persistence is on. Shares must total 100 or the journey will not publish.

In manual mode the last variant is managed for you and marked Auto: it absorbs whatever is left so the total always reaches 100, which is why its field is locked.

Outputs

One output per variant.

MAB settings

Switching Enable MAB (Multi-Armed Bandit) on replaces the variant percentages with auto-allocated and adds a MAB Stats panel showing impressions, conversions, and posterior data per variant, refreshing every 30 seconds.

SettingWhat it does
Goal typeOptimise toward reaching a step, or toward an event
Goal stepThe downstream node that counts as success, for a step goal
Goal eventThe event name that counts as success, for an event goal
Goal windowHow long after seeing a variant a conversion still counts. Defaults to 168 hours
Optimize forengagement (clicks and opens), conversion (an attributed order), or revenue (value-weighted)
Starting traffic splitcurrent starts from the manual percentages, even explores all variants equally
Weighted servingOff serves the current best variant, on splits live traffic by the learned allocation
Require approval for traffic changesMake a person approve large traffic shifts on this split

Three kinds of goal are possible:

GoalA variant wins when
Reaches a stepIts participants reach a chosen downstream node
Fires an eventA named event arrives within the goal window, matched by visitor identity
Shopify orderA Shopify order lands within the goal window

A Shopify order goal is the event kind with the reserved event id shopify.order, which is the Shopify order tab in the builder. It is credited automatically from the order webhook and the web pixel, matched on the visitor who saw the variant, so it needs no event wiring at all. Any other event name is a custom event somebody has to send to /api/events/v1 with trigger: true.

While there is too little data to be confident, the stats panel reports safe mode and falls back to a uniform split. That is the bandit protecting you, not a fault.

Watch out

  • Name each variant with a single letter, A then B then C. The panel forces the label to one uppercase character, both as you type it and again when it reads the config back, so a word never survives someone opening the node: Desktop becomes D, the path's handle changes with it, and every connection drawn from that path is orphaned. What each variant is belongs on the node the path leads to.
  • Give variants distinct labels. Two paths labelled the same collide onto one output.
  • With persistence off, the split re-rolls on every event: the same person sees A, then B, then A, and the result measures nothing. Any test a person can hit more than once wants it on. Under MAB it is forced on.
  • The persistence variable must resolve against the trigger's payload, and nothing checks that it does. A name that resolves to nothing, such as visitorId where the fact is payload.visitorId, fails silently and looks exactly like persistence being off.
  • Under a Shopify page.view trigger the variants are storefront experiences, so each path ends in a Shopify Variant. The visitor is anonymous there, so a channel node on a path has nobody to send to.
  • A shopify.order goal does nothing while Optimize for is left at engagement: the reward pipeline keeps scoring clicks and opens, which a storefront variant does not produce, so the bandit shifts traffic on a signal that is always zero. Set conversion or revenue.
  • MAB does not ignore your percentages. Unless the starting split is even, they seed the bandit's opening allocation.
  • If customers should be sorted by something you already know about them, that is a Rule, not a split.