> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowapt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Flow definition reference

> Every trigger, step and check a flow can use, field by field.

A flow's `definition` is what [Create a flow](https://docs.flowapt.com/flowiq-api-reference/endpoint/create-flow.md) and [Update a flow](https://docs.flowapt.com/flowiq-api-reference/endpoint/update-flow.md) take and [Get a flow](https://docs.flowapt.com/flowiq-api-reference/endpoint/get-flow.md) returns. It is the same JSON the editor in **Automation → Flows** saves, so the quickest way to learn a shape is to build it there and read it back.

```json theme={null}
{
  "trigger": { "type": "event", "event": "checkouts/create", "source": "shopify" },
  "exit_rules": { "logic": "any", "conditions": [ { "type": "event", "field": "contact", "action": "placed_order", "operator": "has", "timeframe": { "type": "since_trigger" } } ] },
  "reenter_after_days": 7,
  "steps": [ { "id": "w1", "type": "delay", "value": 1, "unit": "hours" }, { "id": "m1", "type": "action", "action_type": "send_message", "config": { "template_name": "cart_reminder_v1" } } ]
}
```

| Field | | |
| - | - | - |
| `trigger` | required | What starts the flow. [Triggers](#triggers) |
| `steps` | required | What happens, top to bottom. At most 25 at the top level and 80 counting every split path. [Steps](#steps) |
| `exit_rules` | | Stop rules: `{ "logic": "any" \| "all", "conditions": [checks] }`, checked before every message and after every wait. When they hold, the run ends. [Checks](#checks) |
| `reenter_after_days` | | 1-365. With `repeat: "reenter_after"` on the flow: days before the same person can go through again (default 30) |
| `schedule` | | `{ "on_at", "off_at" }` (ISO 8601): switch the flow on and / or off at a set time |

**How a run works.** Each person who matches the trigger gets their own run. Steps run in order; a wait parks the run until it is due; an **Only if** step ends the run when its checks fail; a **Split** sends the person down one path and is always the last step of its list. Whether the same person can start again is the flow's `repeat` setting (`off`, `once_per_contact`, `once_per_order`, `once_per_order_per_day`, `once_per_subscription`, `reenter_after`).

Every step needs an `id` that is unique in the flow; the [report](https://docs.flowapt.com/flowiq-api-reference/endpoint/flow-report.md) and the check "opened or clicked a message" refer to steps by it.

## Triggers

`definition.trigger` always has `"type": "event"`, an `event` and its `source`.

### Order or checkout

Starts when a store order or checkout event arrives. Shopify events use source `shopify`, WooCommerce events source `woocommerce` (each fires once per order). `popup_signup` starts when someone signs up on a FlowIQ pop-up that has a Flows webhook (source `popup`).

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `orders/paid` · `orders/fulfilled` · `orders/create` · `checkouts/create` · `checkouts/update` · `wc/order.created` · `wc/order.on_hold` · `wc/order.paid` · `wc/order.processing` · `wc/order.completed` · `wc/order.cancelled` · `wc/order.refunded` · `popup_signup` | yes | What starts the flow. |
| `source` | `shopify` · `woocommerce` · `popup` | yes | Must match the event: shopify for orders/\* and checkouts/*, woocommerce for wc/order.*, popup for popup\_signup. |

```json theme={null}
{
  "type": "event",
  "event": "orders/paid",
  "source": "shopify"
}
```

### Subscription

Starts on a FlowIQ subscription event. Billing events use source `stitch`, actions taken on a subscription use source `manage`.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `subscription.created` · `subscription.renewed` · `payment.failed` · `subscription.expired` · `subscription.paused` · `subscription.resumed` · `subscription.cancelled` · `subscription.reactivated` · `subscription.items_changed` · `subscription.activated` · `subscription.card_connected` | yes | created / renewed / payment.failed / expired / activated / card\_connected come from billing (source stitch); paused / resumed / cancelled / reactivated / items\_changed from an action on the subscription (source manage). |
| `source` | `stitch` · `manage` | yes | stitch for billing events, manage for actions. |

```json theme={null}
{
  "type": "event",
  "event": "subscription.cancelled",
  "source": "manage"
}
```

### Contact

Starts when a tag is added to or taken off a contact, or a new contact is added.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `contact.tag_added` · `contact.tag_removed` · `contact.created` | yes | contact.created fires for a new contact from any source (first message, pop-up, order, import). |
| `source` | `"contact"` | | |
| `tag` | string | | The tag (contact.tag\_added and contact.tag\_removed only). |

```json theme={null}
{
  "type": "event",
  "event": "contact.tag_added",
  "source": "contact",
  "tag": "vip"
}
```

### Message

Starts when someone writes to the business for the first time, or sends a keyword.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `message.first` · `message.keyword` | yes | |
| `source` | `"message"` | | |
| `keywords` | list | | message.keyword: the words to listen for. |
| `match` | `contains` · `exact` · `starts` | | message.keyword: how the message must match a keyword. default `"contains"` |

```json theme={null}
{
  "type": "event",
  "event": "message.keyword",
  "source": "message",
  "keywords": [
    "menu"
  ],
  "match": "exact"
}
```

### Date

Starts on a date: a date saved on the contact (a birthday), a number of days after their last order, days before a subscription's next charge, or Sunset (opted in, but has not read, tapped, replied, visited the store or ordered). Date triggers are checked hourly; Sunset daily at 10:15 South African time.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `date.attribute` · `date.after_last_order` · `date.before_renewal` · `date.unengaged` | yes | |
| `source` | `"date"` | | |
| `attribute` | string | | date.attribute: the contact attribute that holds the date (letters, digits, \_). default `"birthday"` |
| `offset_days` | integer | | date.attribute: days from the date; negative = before. -365-365, default `0` |
| `yearly` | boolean | | date.attribute: every year (birthdays, anniversaries). default `true` |
| `days` | integer | | date.after\_last\_order: 1-730 (default 30). date.before\_renewal: 0-60 (default 3). date.unengaged: the look-back, 7-365 (default 90). 0-730 |
| `min_sent` | integer | | date.unengaged: how many messages they must have been sent in that time. 1-50, default `3` |

```json theme={null}
{
  "type": "event",
  "event": "date.after_last_order",
  "source": "date",
  "days": 60
}
```

### Product

Starts when the price drops, or stock runs low, on a product the contact asked about or put in a cart.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `product.price_drop` · `product.low_stock` | yes | |
| `source` | `"product"` | | |
| `lookback_days` | integer | | How far back their interest counts. 1-180, default `30` |
| `min_drop_percent` | integer | | product.price\_drop: the smallest drop that counts. 0-90, default `0` |
| `threshold` | integer | | product.low\_stock: stock at or below this. 1-1000, default `5` |

```json theme={null}
{
  "type": "event",
  "event": "product.price_drop",
  "source": "product",
  "lookback_days": 30,
  "min_drop_percent": 10
}
```

### Your own event

Starts when your system sends an event: through an Endpoint, or with [Send an event](https://docs.flowapt.com/flowiq-api-reference/send-event.md). The event's fields are available as \{\{trigger.\<field>}}.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `"api.event"` | yes | |
| `source` | `"api"` | | |
| `event_name` | string | yes | The event's name: letters, digits, \_ . : - , up to 128 characters. |

```json theme={null}
{
  "type": "event",
  "event": "api.event",
  "source": "api",
  "event_name": "delivery.successful"
}
```

### Store browsing

Starts from the FlowIQ app's store pixel (Shopify): a known, opted-in shopper viewed a product and did not view it again, cart it, check out or order within wait\_hours; or a known shopper is on the store (once a day).

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `event` | `store.browse_abandoned` · `store.active` | yes | |
| `source` | `"storefront"` | | |
| `wait_hours` | integer | | store.browse\_abandoned: hours to wait after the view. 1-72, default `4` |
| `repeat_days` | integer | | store.browse\_abandoned: at most once per product in this many days (and one product a day). 1-90, default `7` |
| `quiet_days` | integer | | store.active: 0 = every visit day; above 0 = only when they come back after that many days away. 0-365, default `0` |

```json theme={null}
{
  "type": "event",
  "event": "store.browse_abandoned",
  "source": "storefront",
  "wait_hours": 4,
  "repeat_days": 7
}
```

## Steps

### Wait

Waits, then carries on. With until\_time / weekdays it then waits for that time of day (South African time) on one of those days.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"delay"` | yes | |
| `value` | number | yes | ≥ 0 |
| `unit` | `minutes` · `hours` · `days` · `weeks` · `months` | yes | |
| `until_time` | string | | HH:MM, 24-hour, South African time. |
| `weekdays` | list | | 1 = Monday … 7 = Sunday. |

```json theme={null}
{
  "id": "w1",
  "type": "delay",
  "value": 1,
  "unit": "days",
  "until_time": "09:00",
  "weekdays": [
    1,
    2,
    3,
    4,
    5
  ]
}
```

### Only if

Carries on only if the checks hold; otherwise the run ends here.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"condition"` | yes | |
| `config` | object | yes | |
| `config.logic` | `all` · `any` | | default `"all"` |
| `config.conditions` | list | yes | |

```json theme={null}
{
  "id": "c1",
  "type": "condition",
  "config": {
    "logic": "all",
    "conditions": [
      {
        "type": "first_order",
        "operator": "is"
      }
    ]
  }
}
```

### Split

Sends each person down the first path whose checks hold, or Everyone else. Paths with random\_sample shares make an A/B test; with ab.auto the test picks its winner and sends everyone that way. A split is always the last step of its list (paths do not join back up).

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"split"` | yes | |
| `config` | object | yes | |
| `config.paths` | list | yes | |
| `config.otherwise` | object | | Everyone else. |
| `config.ab` | object | | A/B test that decides itself. |

```json theme={null}
{
  "id": "s1",
  "type": "split",
  "config": {
    "paths": [
      {
        "id": "pa",
        "name": "A",
        "conditions": [
          {
            "type": "random_sample",
            "percent": 50
          }
        ],
        "steps": []
      }
    ],
    "otherwise": {
      "id": "po",
      "name": "Everyone else",
      "steps": []
    },
    "ab": {
      "auto": true,
      "metric": "clicked"
    }
  }
}
```

### Send a WhatsApp message

Sends an approved WhatsApp template. On a Meta (Cloud API) line, if they wrote in the last 24 hours the template's text goes as a normal message instead, with no template fee.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"action"` | yes | |
| `action_type` | `"send_message"` | yes | |
| `config` | object | yes | |
| `config.template_name` | string | yes | An approved template. While building, "choose-template" with send\_status draft is allowed. |
| `config.body_parameters` | object | | param1 … paramN for the template's body variables. Values may use merge fields. |
| `config.button_parameters` | object | | param1 for a dynamic-URL button. |
| `config.header_media_strategy` | string | | custom = use header\_media\_url; leave out for the template's own media; other values pick an image of a product in the order. |
| `config.header_media_url` | string | | custom header image / video / document (public URL). |
| `config.send_status` | `live` · `manual` · `draft` | | manual = waits for your OK in the app; draft = skipped. default `"live"` |
| `config.skip_smart_sending` | boolean | | Ignore the account's message cap for this message. default `false` |
| `config.button_followups` | object | | What happens when they tap a quick-reply button (messages outside a split, after every wait). |

```json theme={null}
{
  "id": "m1",
  "type": "action",
  "action_type": "send_message",
  "config": {
    "template_name": "cart_reminder_v1",
    "body_parameters": {
      "param1": "{{contact.first_name}}"
    },
    "button_parameters": {
      "param1": "{{cart_link_code}}"
    }
  }
}
```

### Send an email

Sends an email from the account's connected mailbox, only to people who agreed to email (unless require\_consent is false), with an unsubscribe link. Plain text, or a design from Broadcast → Email.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"email"` | yes | |
| `config` | object | yes | |
| `config.subject` | string | yes | May use merge fields. |
| `config.body` | string | | Plain text (when content is not design). |
| `config.content` | `text` · `design` | | default `"text"` |
| `config.design` | object | | content design: an email builder design \{ version, settings, blocks }. |
| `config.require_consent` | boolean | | default `true` |
| `config.send_status` | `live` · `manual` · `draft` | | default `"live"` |

```json theme={null}
{
  "id": "e1",
  "type": "email",
  "config": {
    "subject": "Still thinking it over, {{contact.first_name}}?",
    "body": "Your cart is waiting: {{cart_link}}"
  }
}
```

### Tag or update the contact

Adds or removes tags, or sets an attribute.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"update_contact"` | yes | |
| `config` | object | yes | |
| `config.operations` | list | yes | |

```json theme={null}
{
  "id": "t1",
  "type": "update_contact",
  "config": {
    "operations": [
      {
        "op": "add_tag",
        "value": "cart-reminded"
      }
    ]
  }
}
```

### Make a discount code

Makes a one-person discount code in the store (Shopify or WooCommerce); later steps use it as \{\{flow\.discount\_code}}.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"discount_code"` | yes | |
| `config` | object | yes | |
| `config.kind` | `percentage` · `fixed_amount` · `free_shipping` | | default `"percentage"` |
| `config.value` | number | | percentage: 1-100; fixed\_amount: above 0. |
| `config.expiry_days` | integer | | 1-365, default `30` |
| `config.code_prefix` | string | | e.g. COMEBACK |
| `config.min_subtotal` | number | | |
| `config.collection_gid` | string | | Shopify: only for this collection. |

```json theme={null}
{
  "id": "d1",
  "type": "discount_code",
  "config": {
    "kind": "percentage",
    "value": 10,
    "expiry_days": 14,
    "code_prefix": "COMEBACK"
  }
}
```

### Alert the team

Sends your team a WhatsApp and / or email about this customer.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"alert"` | yes | |
| `config` | object | yes | |
| `config.message` | string | yes | May use merge fields. |
| `config.team_id` | string | | A team id. |
| `config.whatsapp_numbers` | list | | |
| `config.emails` | list | | |
| `config.include_link` | boolean | | Add a link to the chat. |

```json theme={null}
{
  "id": "a1",
  "type": "alert",
  "config": {
    "message": "{{contact.full_name}} ordered over R5,000",
    "emails": [
      "sales@example.com"
    ]
  }
}
```

### Send to your webhook

Posts this run's customer and trigger data to one of your account's webhooks (Settings → Webhooks), with retries.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"webhook"` | yes | |
| `config` | object | yes | |
| `config.webhook_id` | string | yes | The webhook's id. |

```json theme={null}
{
  "id": "h1",
  "type": "webhook",
  "config": {
    "webhook_id": "0b9f7a4e-2c1d-4e8a-9a51-6d2f0c7b1e33"
  }
}
```

### Brief the AI agent

Gives the AI agent a one-time instruction for this customer's next conversation.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"agent_brief"` | yes | |
| `config` | object | yes | |
| `config.instruction` | string | yes | |
| `config.turn_on_agent` | boolean | | |

```json theme={null}
{
  "id": "b1",
  "type": "agent_brief",
  "config": {
    "instruction": "They left a mattress in their cart. Offer help choosing a size."
  }
}
```

### Wait for a reply

Pauses until they reply (optionally with one of match\_keywords), or until timeout\_hours. Not inside a split.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"wait_for_reply"` | yes | |
| `config` | object | | |
| `config.timeout_hours` | number | | |
| `config.match_keywords` | list | | |

```json theme={null}
{
  "id": "r1",
  "type": "wait_for_reply",
  "config": {
    "timeout_hours": 48
  }
}
```

### Sync tags to Shopify

Copies the contact's FlowIQ tags to their Shopify customer.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"shopify_tags"` | yes | |

```json theme={null}
{
  "id": "st1",
  "type": "shopify_tags"
}
```

## Checks

Checks are used in **Only if** steps, in split paths and in `exit_rules`. `random_sample` only works in split paths.

### What they have ordered

Their order history: have they placed an order, or bought certain products?

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"event"` | yes | |
| `field` | `"contact"` | | |
| `action` | `placed_order` · `bought_product` | yes | |
| `operator` | `has` · `has_not` | yes | |
| `timeframe` | object | | When it counts. Leave out for ever. |
| `where` | object | | bought\_product: which products. Leave out for any product. |

```json theme={null}
{
  "type": "event",
  "field": "contact",
  "action": "placed_order",
  "operator": "has_not",
  "timeframe": {
    "type": "in_the_last",
    "value": 45,
    "unit": "days"
  }
}
```

### What is in this order

The items in the order that started the run.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"line_item_check"` | yes | |
| `field` | `title` · `sku` · `variant_id` · `product_type` · `collection` | | collection = the item is in that Shopify collection (checked when the step runs). default `"title"` |
| `match` | `contains` · `exact` | | default `"contains"` |
| `operator` | `has` · `has_not` | | default `"has"` |
| `values` | list | yes | One or more values; any one matching counts. |

```json theme={null}
{
  "type": "line_item_check",
  "field": "title",
  "match": "contains",
  "operator": "has",
  "values": [
    "Mattress"
  ]
}
```

### A detail of the order or event

A field of the order or event that started the run.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"payload_check"` | yes | |
| `field` | string | yes | The field, e.g. total\_price, financial\_status, or a field of your own event. |
| `operator` | `eq` · `neq` · `gt` · `gte` · `lt` · `lte` · `contains` · `not_contains` · `truthy` · `falsy` | | default `"eq"` |
| `value` | any | | What to compare with (not needed for truthy / falsy). |

```json theme={null}
{
  "type": "payload_check",
  "field": "total_price",
  "operator": "gt",
  "value": 1500
}
```

### First order

Was the order that started the run their first at the store?

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"first_order"` | yes | |
| `operator` | `is` · `is_not` | yes | |

```json theme={null}
{
  "type": "first_order",
  "operator": "is"
}
```

### Still in stock

Are the order's products still in stock when the step runs?

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"stock_check"` | yes | |
| `require` | `all` · `any` | | default `"all"` |

```json theme={null}
{
  "type": "stock_check",
  "require": "all"
}
```

### A contact field

A field on the contact, such as their tags.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"property"` | yes | |
| `data_source` | `"contacts"` | yes | |
| `field` | string | yes | The contact column, e.g. tags, email, allow\_broadcast. |
| `operator` | `equals` · `not_equals` · `contains` · `not_contains` | yes | |
| `value` | any | | The value to compare with. |

```json theme={null}
{
  "type": "property",
  "data_source": "contacts",
  "field": "tags",
  "operator": "not_contains",
  "value": "vip"
}
```

### Their subscription

A field of the subscription that started the run (subscription triggers only), e.g. still cancelled, still paused.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"sub_status"` | yes | |
| `field` | string | yes | e.g. cancelled, paused, status, offered\_save\_gift, is\_test. |
| `operator` | `eq` · `neq` · `truthy` · `falsy` | | default `"eq"` |
| `value` | any | | For eq / neq. |

```json theme={null}
{
  "type": "sub_status",
  "field": "cancelled",
  "operator": "truthy"
}
```

### Not sent recently

This flow has not completed for them in the last N days (one message for a customer who triggers it twice).

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"flow_not_sent_within"` | yes | |
| `days` | integer | yes | 1-365 |

```json theme={null}
{
  "type": "flow_not_sent_within",
  "days": 30
}
```

### Talking to support

Are they being helped by the team right now: an open ticket, or a team member wrote recently?

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"support_active"` | yes | |
| `operator` | `is` · `is_not` | yes | Use is\_not so outreach never cuts into a support conversation. |
| `human_reply_hours` | integer | | A team reply within this many hours counts. |
| `customer_message_hours` | integer | | A message from them within this many hours counts. |

```json theme={null}
{
  "type": "support_active",
  "operator": "is_not"
}
```

### Replied

Did they write to us (any channel) since the run started, or in the last N hours / days? Mostly used as a stop rule.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"replied"` | yes | |
| `operator` | `has` · `has_not` | | default `"has"` |
| `timeframe` | object | | |

```json theme={null}
{
  "type": "replied",
  "operator": "has",
  "timeframe": {
    "type": "since_trigger"
  }
}
```

### Opened or clicked a message

Did they open or click a message this flow sent them? Email: real opens and clicks (Apple Mail privacy and link scanners are not counted). WhatsApp: read, and a tap on the message's link.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"message_engagement"` | yes | |
| `signal` | `opened` · `clicked` | yes | |
| `operator` | `did` · `did_not` | yes | |
| `step_id` | string | | The message step to ask about. Leave out for the last message the flow sent. |

```json theme={null}
{
  "type": "message_engagement",
  "signal": "opened",
  "operator": "did_not",
  "step_id": "m1"
}
```

### Engaged lately

Did they read, tap, reply, visit the store or order in the last N days?

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"engagement"` | yes | |
| `operator` | `engaged` · `not_engaged` | yes | |
| `days` | integer | | 1-365, default `90` |

```json theme={null}
{
  "type": "engagement",
  "operator": "not_engaged",
  "days": 90
}
```

### On the store lately

Were they on the store (FlowIQ store pixel) in the last N days?

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"store_activity"` | yes | |
| `operator` | `did` · `did_not` | yes | |
| `event` | `any` · `product_viewed` · `product_added_to_cart` · `checkout_started` | | default `"any"` |
| `days` | integer | | 1-365, default `7` |

```json theme={null}
{
  "type": "store_activity",
  "operator": "did",
  "event": "product_viewed",
  "days": 7
}
```

### Comparison group

Keeps a stable share of customers out of the flow so you can measure what it adds. The same customer is always in the same group.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"holdout_check"` | yes | |
| `holdout_pct` | integer | yes | The share held out, 1-99. 1-99 |
| `programme` | string | | Name the group so several flows share it. default `"default"` |

```json theme={null}
{
  "type": "holdout_check",
  "holdout_pct": 10,
  "programme": "replenishment"
}
```

### Random share (split paths only)

In a split path: this share of people, chosen at random, take the path. Paths with random shares make an A/B test; the shares may add up to 100 at most.

| Field | Type | Required | |
| - | - | - | - |
| `type` | `"random_sample"` | yes | |
| `percent` | integer | yes | 1-100 |

```json theme={null}
{
  "type": "random_sample",
  "percent": 50
}
```

## Merge fields

Message text, template parameters, email subjects and bodies, alerts and agent briefs can use these. They are filled per person when the step runs.

| Field | |
| - | - |
| `{{contact.first_name}}`, `{{contact.full_name}}`, `{{contact.email}}`, `{{contact.whatsapp_id}}` | The person |
| `{{order.number}}`, `{{order.total}}`, `{{order.currency}}`, `{{order.date}}` | The order that started the run |
| `{{products_list}}`, `{{review_link}}` | The products on that order; a review link |
| `{{cart_link}}`, `{{cart_link_short}}`, `{{cart_link_code}}` | A link that refills their cart (Shopify order and checkout triggers, and store browsing). Use `_code` in a URL button |
| `{{tracking_summary}}`, `{{tracking_number}}`, `{{tracking_company}}`, `{{tracking_url}}` | Delivery tracking (orders/fulfilled) |
| `{{order_status_link}}`, `{{order_status_link_code}}`, `{{order_status_url}}` | The order's status page |
| `{{card_update_link}}` | A link to update the card on a subscription |
| `{{popup.discount_code}}`, `{{popup.discount_expires_on}}`, `{{popup.first_name}}`, `{{popup.email}}` | The pop-up sign-up that started the run |
| `{{flow.discount_code}}` | The code a **Make a discount code** step made earlier in the run |
| `{{trigger.<field>}}` | A field of your own event (`api.event`), e.g. `{{trigger.order.number}}` |

## When a flow is refused

[Create](https://docs.flowapt.com/flowiq-api-reference/endpoint/create-flow.md) and [Update](https://docs.flowapt.com/flowiq-api-reference/endpoint/update-flow.md) answer **400 validation\_error** with `errors`, one line per problem with where it is (`step 4 Path A: step 1 …`). A flow is created switched off; [switching it on](https://docs.flowapt.com/flowiq-api-reference/endpoint/set-flow-status.md) answers **409 not\_ready** while a WhatsApp message in it has no approved template, with the steps to fix in `problems`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.