Skip to Content
CraftBot Docs v1 — internal preview

Triggers

A trigger is a rule that decides when an inbound message starts a recipe. Without at least one active trigger, a recipe will publish but never run — there’s nothing telling the platform “use this recipe for this message”.

Where to configure

Open a recipe and switch to the Triggers tab at the top of the editor (next to Canvas and Settings). The tab lists every trigger configured for the recipe and lets you add, edit, enable, disable, or delete them.

The Add Trigger form with Type dropdown set to Keyword, a keywords text field, and Channel and Language scope dropdowns above Cancel and Add buttons.

Trigger types

TypeWhen it firesWhat you configure
KeywordThe inbound message text matches one of your keywords.A comma-separated keyword list (e.g. hello, hi, hey). Comparison is case-insensitive.
RegexThe inbound message text matches your regular expression.A PCRE-style pattern. Useful for variants the keyword list can’t enumerate (numbers, leading characters, etc.).
DefaultNo other trigger on the recipe matched.Nothing — it’s a pure catch-all. Only one Default trigger is allowed per scope.
Campaign ReplyA contact replies to a message sent by one of your outbound campaigns.Nothing — the platform binds the trigger to the campaign at delivery time.
Widget TokenAn embedded web widget hands off the conversation with a one-time token.Nothing extra in the trigger; the widget supplies the token at runtime.
Mobile TokenA mobile SDK hands off the conversation with a one-time token.Nothing extra in the trigger; the SDK supplies the token at runtime.
External WebhookReserved for an upcoming external-system hook.Disabled — selecting it in the dropdown is blocked until the feature lands.

Scope: channel and language

Every trigger has two optional scope filters:

  • Channel — restrict the trigger to a specific channel (WhatsApp, Messenger, Web, Email, Mock). Leave it as Any to let the trigger fire on any channel.
  • Language — restrict to English or Arabic inbound, based on the contact’s profile language. Leave as Any to ignore language.

Scope lets you run distinct recipes on distinct channels or languages without duplicating logic — for example, an English keyword recipe on WhatsApp, an Arabic version of the same recipe on the same number, and a different recipe entirely on Messenger.

Keyword matching

  • The match is case-insensitivehello matches Hello, HELLO, hElLo.
  • The default match mode is exact full-message equalityhi matches a message of exactly hi but not hi there. The starts-with mode is also supported at the data layer but is currently only set by automation; the in-app form always creates exact-match triggers.
  • Multiple keywords on the same trigger are OR-combined — any one match wins.

Evaluation order

When an inbound message arrives on a fresh conversation, the runtime collects every active trigger whose scope matches the message channel and language, then evaluates them in this fixed order:

  1. Keyword matches first.
  2. Regex matches second.
  3. Default triggers last.

Within each tier, triggers are ranked by priority (higher first). The first matching trigger wins, and its recipe starts. Reorder by adjusting trigger priority — type-tier order is enforced and cannot be overridden.

Trigger lifecycle

A trigger is evaluated only on the first inbound message of a fresh conversation (no active flow session, no human assignment in progress). Once a recipe is running for a contact, subsequent messages flow through that recipe — they do not re-evaluate triggers.

If you want a recipe to interrupt an in-progress flow (e.g. the customer says “agent” mid-flow), build that branching inside the recipe via Intent Route or a Condition node — not a new trigger.

Enabling, disabling, and deleting

Each trigger row exposes:

  • Edit — change the keywords, regex pattern, channel scope, or language scope. The trigger type itself is fixed; to switch types, delete and recreate.
  • Enable / Disable — toggle without deleting. Disabled triggers stay in the list but are skipped at runtime, which is useful when staging a new recipe behind an existing one.
  • Delete — remove the trigger permanently. Deletion is immediate; new conversations stop routing through it from the next inbound message onwards.

What happens when no trigger matches

The conversation does not start a recipe. It enters the inbox under the workspace’s default routing (the default team or the channel’s configured fallback) and waits for a human to pick it up.

Last updated on