# Journey Nodes & Triggers

> Reference for every journey step and trigger type, with the settings each one needs

URL: https://docs.lemuai.com/automation/nodes-and-triggers
For: Everyone
Checked against LemuAI app version 1.0.53
Related: [AI, Data and Ticket Steps](https://docs.lemuai.com/automation/more-steps), [Branching and Timing](https://docs.lemuai.com/automation/branching-and-timing), [Goals and Revenue](https://docs.lemuai.com/automation/goals-and-links), [Journeys](https://docs.lemuai.com/troubleshooting/journeys)

Steps that choose the channel and offer per person, read events, chat on WhatsApp with an agent, use AI, update records and sheets, or open tickets are on [AI, conversation, data and ticket steps](https://docs.lemuai.com/automation/more-steps).

When you create a journey, the trigger list offers: **Events**, **Enters or leaves a segment**, **WhatsApp message received**, **WhatsApp order placed**, **Customer opted out of WhatsApp**, **Record changes**, **Record date**, **Catalog item changes**, **Data Condition**, **Schedule**, **Webhook**, **Workflow Event** and **Manual**. The WhatsApp, segment and catalog choices are ready-made versions of the **Events** and record triggers described below. **Customer opted out of WhatsApp** starts when a customer stops your WhatsApp marketing: replies STOP (or a similar word), taps Stop promotions, or chooses Stop marketing in WhatsApp itself.

This page is a reference for building journeys. For what journeys are and how to create one, see [Journeys](https://docs.lemuai.com/automation/introduction) first. For how to combine waits, reactions, A/B splits and exit events, see [Branching and Timing](https://docs.lemuai.com/automation/branching-and-timing).

Each step keeps its settings in the node's `data`. Most text fields accept `{{context.*}}` placeholders, which are filled in from the run's context just before the step runs.

## Actions

**Trigger: the entry point**

Every journey has exactly one **Trigger** step. When a run starts it simply passes through, because the run's starting context has already been set by whatever started it. Its real job is configuration: the node's `data` holds the `trigger_type` and that trigger's settings, described in [Triggers](#triggers) below.

**Call: place an outbound call**

Dials out through one of your voice agents and, optionally, waits for the result.

| Field | Purpose |
|---|---|
| `agent_id` | Required. The voice agent to call with |
| `phone_number` / `phone_field` | Required. The number to dial, or a placeholder that resolves to one |
| `wait_for_completion` | Default `true`. If `true`, the run waits until the call ends. If `false`, the step finishes as soon as the call is placed |
| `timeout_seconds` | Default `300`. The longest to wait for the call |
| `max_queue_minutes` | When every line is busy, wait at most this long for one, then take the `not_called` path. For example `30` for cart recovery, so a WhatsApp goes out instead. Leave empty to wait as long as it takes |
| `agent_input_vars` | Names of variables the agent's prompts expect |
| `agent_input_var_aliases` | Maps an agent variable to a differently named journey value, when the names don't match |
| `extract_outcomes` | Which of the agent's captured values to bring back into the journey |

**Paths:** with `wait_for_completion` on, the step goes down `completed`, `busy`, `no_answer`, `voicemail` or `failed` depending on how the call ended. With it off, it goes down `initiated` once the call is placed. It goes down `not_called` if no line came free within `max_queue_minutes`.

**Phone lines:** calls from journeys and campaigns share your organization's call limit. When every line is busy, journey calls wait in line ahead of campaign calls, oldest first. A waiting run holds nothing while it waits. WhatsApp, email and SMS steps never wait for a line.

Calls are skipped for contacts who opted out of calls, and are subject to the journey's [allowed hours and frequency caps](https://docs.lemuai.com/automation/introduction#journey-settings).

**WhatsApp: send a WhatsApp message**

Sends a WhatsApp message through your organization's WhatsApp setup. See [WhatsApp Messaging](https://docs.lemuai.com/messaging/whatsapp#sending-whatsapp-from-a-journey) for its full field reference (`to_field`, `kind`, `template_name`, `language`, `template_params`, `body`, `button_url_suffix`), alongside the WhatsApp setup it depends on.

Use a template (`kind: template`) for the first message to someone outside the 24 hour session window. Use a plain session message only when replying inside an open session.

**Email: send an email**

Sends one of your email templates to the contact. **Setup required:** a sending domain and sender in [Email Setup](https://docs.lemuai.com/email/setup).

| Field | Purpose |
|---|---|
| `template_id` | Required. The email template to send |
| `template_version` | Optional. Pin a version. Leave empty to always send the latest |
| `sender_id` | Optional. The from address. Leave empty for your default sender |
| `subject` | Optional. Overrides the template's subject. Merge tags allowed |
| `kind` | `marketing` (default) or `transactional` |
| `to_field` | Optional. A placeholder for the address. Defaults to the contact's email |

Marketing emails need email consent and get an unsubscribe footer. Transactional emails are for order updates, receipts and similar messages the contact expects.

**Paths:** `success`, `skipped` (the contact unsubscribed, is suppressed, has no address, or reached a frequency cap) and `error`.

**SMS: send an SMS**

Sends one of your [SMS templates](https://docs.lemuai.com/sms/templates) to the contact's Indian mobile number. **Setup required:** your DLT entity id and a sender in [SMS Setup](https://docs.lemuai.com/sms/setup), and SMS credits.

| Field | Purpose |
|---|---|
| `template_id` | Required. The SMS template to send |
| `sender_id` | Optional. The sender (header). Leave empty for the default sender that fits the template |
| `variables` | Optional. Values for the template's `{#var#}` slots, in order. Merge tags allowed. Leave empty for the template's own |
| `to_field` | Optional. A placeholder for the number. Defaults to the contact's phone |

Promotional and service-explicit templates go only to contacts who opted in to SMS; service-implicit and transactional templates go unless the contact unsubscribed from SMS. Each value holds at most 30 characters once filled in. While SMS credits are empty, the step waits and tries again.

**Paths:** `success`, `skipped` (no opt-in, unsubscribed, no Indian mobile number, a value too long, or a frequency cap) and `error`.

**HTTP Request: call an external API**

Sends an HTTP request to any URL, with retries and response extraction.

| Field | Purpose |
|---|---|
| `method` | `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD` or `OPTIONS`. Default `GET` |
| `url` | Required. Must start with `http://` or `https://` unless it's a placeholder |
| `headers`, `body`, `query_params` | All accept `{{context.*}}` placeholders. A `body` that is an object or list is sent as JSON |
| `timeout_seconds` | Default 30, max 300 |
| `retry_config` | `{ "max_retries": 0-10, "retry_on_status": [502,503,504], "backoff_seconds": 1 }`. The wait grows with each try (`backoff_seconds` times the attempt number) |
| `success_status_codes` | Default `[200, 201, 202, 204]` |
| `response_path` | A dot path (for example `data.result.id`) to keep one field of a JSON response instead of the whole body |

**Paths:** `success` or `error`. A status code outside `success_status_codes`, a timeout, or a network error all count as failure once retries run out.

**Emit Event: start other journeys**

Sends a named event that other journeys can start from, using the [Workflow Event trigger](#triggers).

| Field | Purpose |
|---|---|
| `event_name` | Required. The name other journeys' triggers listen for |
| `payload` | Extra data added to the event |

Every other active journey with an active **Workflow Event** trigger for this exact `event_name` gets a run, with the current context plus `payload`. The output lists how many journeys were started. This journey does not wait for them; it moves to its next step straight away.

**Update Contact: write fields onto a contact**

Finds the run's contact by phone number and saves the given fields onto it.

| Field | Purpose |
|---|---|
| `fields` | Required. `{ "field_name": "value or {{placeholder}}" }` |

`first_name`, `last_name`, `email`, `company`, `title`, `tags` and `opted_out` are set directly on the contact. Anything else is saved as a custom field. Values like `now() + 5d` (units `d`, `h`, `m`, `s`; days if no unit) are turned into a date and time first, which is handy for a `hold_until` or `next_contact_date` field. If no contact can be found for the run, the step succeeds without changing anything.

**Load History: bring in past runs**

Loads earlier completed runs for the same contact or row and adds a summary to the context, so a follow-up call can refer to what happened last time.

| Field | Purpose |
|---|---|
| `limit` | How many earlier runs to load. Default 2 |
| `output_key` | Where to store the list. Default `previous_calls` |
| `include_fields` | Which fields to keep per past run. Leave empty for the default set (disposition, call tags, captured values, transcript URL, duration, call summary) |
| `answered_only` | Only include past runs where the call captured values |
| `flatten_last_extracted` / `flatten_prefix` | Also save the most recent run's captured values as their own context keys, with this prefix (default `last_call_`) |
| `output_mapping` | Copy specific fields from the loaded history into context keys you choose |
| `lookup_context_key` | Field to match past runs by, if the current run has no dedupe key |

Newest first: `previous_calls[0]` is the most recent earlier run. Also sets `previous_calls_count`.

**Schedule Follow-up: wait, then start over or continue**

Not a trigger. **When the time is up** picks what happens after the delay:

- **Start the journey over** (the default): creates a brand new run of the same journey for the same contact, after the delay. Use it for "call back in N days" cycles.
- **Continue from here**: the same run waits, then carries on down the **after wait** path. Connect that path back to the step you want to try again, for example the call. Once **Max attempts** are used up, the run goes down **attempts used up** instead.

| Field | Purpose |
|---|---|
| `delay_days` / `delay_hours` / `delay_minutes` | Required (at least one above 0). Placeholders allowed, for example `{{context.promised_days}}` |
| `forward_context_vars` | Which context values to copy into the new run. Leave empty to copy everything |
| `dedupe_key` | Override for the new run's dedupe key. Defaults to the current run's, so **Load History** keeps finding the same contact's history |
| `max_reschedule_count` | Start over: how many times the chain may reschedule itself before it stops. Continue: how many times the step waits and carries on (**Max attempts**) |

Use **Wait** instead to pause inside the same run. See [Branching and Timing](https://docs.lemuai.com/automation/branching-and-timing#wait).

**Slack: post to a Slack channel**

Posts a message through your connected [Slack integration](https://docs.lemuai.com/integrations/slack).

| Field | Purpose |
|---|---|
| `channel` | Required. A channel name (for example `#general`) or channel ID |
| `message` | Required. Message text. Markdown supported |

**Paths:** `success` or `error`. Fails straight away if Slack isn't connected.

**Jira: create a Jira issue**

Creates an issue through your connected [Jira integration](https://docs.lemuai.com/integrations/jira).

| Field | Purpose |
|---|---|
| `project_key` | Required. The short project key shown in issue IDs, for example `SUP` |
| `summary` | Required. Issue title |
| `issue_type` | Required. Must be valid for that project, for example `Task`, `Bug` or `Story` |
| `description` | Optional. Issue description |

**Paths:** `success` or `error`. Fails straight away if Jira isn't connected.

**Google Calendar: book a meeting**

Creates an event through your connected [Google Calendar integration](https://docs.lemuai.com/integrations/google-calendar), on the connected account's primary calendar, always with a Google Meet link.

| Field | Purpose |
|---|---|
| `summary` | Required. Event title |
| `start_datetime` | Required. ISO 8601, for example `2026-09-20T15:00:00` |
| `end_datetime` | Optional. ISO 8601. A default length applies if empty |
| `attendees` | Optional. Email addresses, separated by commas |
| `description` | Optional. Event description |
| `location` | Optional. Event location |

**Paths:** `success` or `error`. Fails straight away if Google Calendar isn't connected.

**Shopify: act on an order**

Acts on a Shopify order through your connected store. **Setup required:** a connected Shopify store.

| Field | Purpose |
|---|---|
| `action` | Required. `get_order` (read the order's current status), `confirm_order` (tag and note the order as confirmed), `cancel_order` (cancel an unpaid, unshipped order; never refunds) or `tag_order` (add tags) |
| `order` | Optional. Order id. Leave empty to use the order from the Shopify event that started the run |
| `note` | Optional. A note written on the order, for example what the customer said |
| `confirm_tag` | `confirm_order` only. Default `cod-confirmed` |
| `cancel_tag` | `cancel_order` only. Default `cancelled-by-call` |
| `reason` | `cancel_order` only. `customer_changed_mind`, `wrong_address`, `duplicate_order` or `other` |
| `restock` | `cancel_order` only. Return items to stock. Default on |
| `notify_customer` | `cancel_order` only. Let Shopify email the customer. Default off |
| `tags` | `tag_order` only. Tags to add, separated by commas |

The step acts whenever the journey reaches it, so put `confirm_order` and `cancel_order` behind a **Condition** on the customer's answer from the call.

**Paths:** `success` or `error`. Refusals (already shipped, paid or cancelled) and Shopify errors go down `error`.

## Flow control

**Condition: branch the journey**

Checks one comparison, or a group of comparisons joined with AND / OR, and goes down `true` or `false` (you can rename them with `handles`).

**Single check:**

| Field | Purpose |
|---|---|
| `field` | Value to check, for example `{{context.call_result}}` |
| `operator` | See the operator table below |
| `value` | Value to compare against (not needed for operators like `is_empty`) |
| `handles` | Optional `{ "true": "...", "false": "..." }` to rename the paths |

**Grouped checks** (nested AND / OR):
```json
{
  "logic": "and",
  "conditions": [
    { "field": "{{context.status}}", "operator": "equals", "value": "active" },
    { "logic": "or", "conditions": [ { "...": "..." } ] }
  ]
}
```

**Operators:**

| Kind | Operators |
|---|---|
| Equality | `equals` / `eq`, `not_equals` / `ne` |
| Comparison | `greater_than` / `gt`, `greater_than_or_equals` / `gte`, `less_than` / `lt`, `less_than_or_equals` / `lte` (compares as numbers, then dates, then text) |
| Text | `contains`, `not_contains`, `starts_with`, `ends_with`, `matches` (regular expression) |
| In a list | `in` / `in_list`, `not_in` / `not_in_list` |
| Empty or true | `is_empty`, `is_not_empty`, `is_true`, `is_false`, `is_null`, `is_not_null` |
| Date | `date_eq`, `date_before`, `date_after`, `date_before_or_eq`, `date_after_or_eq` (compares by day) |
| Callback time | `callback_due` / `time_due`, `callback_not_due` / `time_not_due` (compares a saved callback time with now) |

`value` also accepts `now()`, `today()`, and offsets like `now() + 3 days` or `now() - 2 hours`.

**Wait: pause before continuing**

Pauses the run for a set time, or until a set date and time, then continues to the next step.

| Field | Purpose |
|---|---|
| `duration_seconds` / `duration_minutes` / `duration_hours` / `duration_days` | How long to wait (you can combine them) |
| `until_timestamp` | ISO 8601 date and time, or a callback time, to wait until |
| `async_wait` | Pauses the run in the background instead of holding it. Chosen for you if empty: waits over 60 seconds always pause in the background |

A wait can be up to a year long, and long waits use no capacity while they wait. If `until_timestamp` is already past, the step finishes straight away.

**Wait for reaction: wait for the contact to act**

Waits until the contact does one of the listed things, or until a time limit passes.

| Field | Purpose |
|---|---|
| `events` | Required. Contact event types that count as a reaction, for example `link_clicked`, `email_clicked` or `Purchase` |
| `duration_days` / `duration_hours` / `duration_minutes` | The time limit. Up to 30 days |

Only events after the step starts count. Clicks (`link_clicked`, `email_clicked`) count only on messages this journey sent the contact.

**Paths:** `reacted` (straight away, when a listed event happens) or `no_reaction` (when the time limit is up). The output includes `reaction_event`, the event the contact reacted with.

**A/B split: test different branches**

Sends each contact down one of 2 to 5 branches, by weight.

| Field | Purpose |
|---|---|
| `variants` | 2 to 5 branches, each `{ "key": "a", "label": "Discount", "weight": 50 }`. Keys are `a` to `e` and must be different. Weights must be above 0 and are relative to each other |

The same contact always gets the same branch. The output includes `variant` and `variant_label`.

**Paths:** one per branch key (`a`, `b`, and so on). The [journey report](https://docs.lemuai.com/automation/reports#ab-split-results) compares branches on orders.

**Catalog lookup: load a product**

Loads one item from a catalog so later steps can use its details.

| Field | Purpose |
|---|---|
| `object_type` | Required. The [catalog](https://docs.lemuai.com/records/catalog), for example `products` |
| `key` | Required. The value to look for, for example `{{context.product_id}}` |
| **Find the item by** (`match_fields`) | Which columns to look for the value in. Default: the item's key. Pick others, like `title` to find a product by its name, or `sku` then `group_id`. Exact match, ignoring case; the first listed column that matches wins, and the run records it as `matched_field` |
| `output_key` | Where to store the item. Default `catalog_item` |

Later steps use `{{context.catalog_item.title}}`, `{{context.catalog_item.price}}`, `{{context.catalog_item.url}}`, `{{context.catalog_item.image_url}}` and any other field of the item.

**Paths:** `found` or `not_found`.

**End: finish this path**

Marks a path of the journey as finished. Every journey needs at least one **End** step it can reach.

| Field | Purpose |
|---|---|
| `disposition` | Optional outcome label. Default `"completed"` |
| `message` | Optional note |
| `output` | Optional extra data saved with the result |

## Triggers

Set on the journey's single trigger step with `trigger_type` and the fields below.

**Events: a contact event happens**

Starts a run when a contact event happens, from any source: your app through [`POST /api/v1/events`](https://docs.lemuai.com/api-reference/events/trigger), Shopify, your [tracking sources](https://docs.lemuai.com/website-pixel/overview), messages, segments or custom records. In the API this is `trigger_type: contact_event`.

| Field | Purpose |
|---|---|
| `event_type` | Required. The event type to match, for example `InitiateCheckout`, `Purchase` or `segment_entered`. Meta's [standard event names](https://docs.lemuai.com/website-pixel/standard-events) match whatever their case, and older names still match: `order_placed` matches `Purchase`, `cart_added` matches `InitiateCheckout` |
| `filters` | Optional (**Only when**). Conditions on the event's data, for example `total_price` at least `1000` or `is_cod` is `true`. Operators: is, is not, greater than, at least, less than, at most, contains, does not contain, is one of, is none of, is present, is empty |
| `delay_minutes` | Default `0`. How long to wait after the event before the journey starts, for example 60 for cart abandonment |
| `cancellation_events` | Optional (**Exit events**). A list of event types. If any of them happens for the contact, they leave the journey: during the delay, or later while the journey is waiting. For example `Purchase` for cart abandonment. Older journeys may have a single `cancellation_event`, which still works |
| `exit_on_segment_exit` | `segment_entered` only. On by default. A contact who leaves the segment leaves the journey |
| `contact_list_id` | Optional. Only start for contacts in this list |
| `context_mapping` | Optional. Maps fields from the event's data to context keys. Leave empty to pass all fields through |

Available when the run starts: `{{phone}}`, `{{event_type}}`, `{{event_id}}`, the event's data fields, and for Shopify events, `{{shopify_order_items}}` (the live order items, total and status at call time).
```bash
curl -X POST https://app.lemuai.com/api/v1/events \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "event_type": "InitiateCheckout",
    "phone": "+14155550100",
    "data": { "product_id": "8812", "value": 1499, "currency": "INR" }
  }'
```

**Record changes: a record is added, changed or deleted**

Starts a run when a custom record (a loan, a policy, a booking) changes. In the API this is an Events trigger on `object_created`, `object_updated` or `object_deleted`.

| Field | What to choose |
|---|---|
| **Record type** | Required. Which kind of record to watch |
| **When a record** | Is added, changes, or is deleted |
| **Field that changed** | For changes: one field, or any field |
| **And the record now** | Optional. Conditions on the record after the change, for example `status` is `overdue` |
| **Delay (minutes)** | Optional. How long to wait before the journey starts |

See [Records](https://docs.lemuai.com/records/overview) for how to set up record types.

**Record date: days before or after a date on a record**

Starts a run a set number of days before, on, or after a date on each record, for example 3 days before an EMI due date. In the API this is `trigger_type: object_date`.

| Field | Purpose |
|---|---|
| `object_type` | Required. The record type |
| `field` | Required. A date (or date and time) field on the record |
| `days` | 0 to 365 |
| `direction` | `before`, `on` or `after` |
| `at` | Time of day to start, for example `10:00` |
| `timezone` | Time zone for `at` |
| `filters` | Optional (**Only records where**). For example `status` is not `closed` |

Each record starts at most once per date. If the date on the record changes, it can start again for the new date.

**Data Condition: check a contact list**

Keeps checking the rows of a contact list and starts one run per matching row. The same row doesn't start again and again.

| Field | Purpose |
|---|---|
| `contact_list_id` | Required. Which contact list to check |
| `dedupe_field` | The column that identifies a row. Defaults to phone number. One run per value |
| `dedupe_window_hours` | Optional (**Repeat After**). Start again for the same row after this many hours (for example `24` for once a day). Leave empty to start only once per row, ever |
| `condition_group` | Conditions on the row's columns, in the same shape as the **Condition** step. No conditions means every row starts a run |
| `context_mapping` | Maps list columns to context keys. Leave empty to pass all columns through |

Each row's run has the dedupe key `{trigger_id}:{dedupe value}`, which is what lets **Load History** find that row's earlier runs.

**Schedule: run on a cron expression**

Starts a run on a repeating schedule.

| Field | Purpose |
|---|---|
| `cron` | Required. A standard 5-field cron expression, for example `0 9 * * 1-5` |
| `timezone` | Default `UTC` in the API. The builder starts new triggers on `Asia/Kolkata` |
| `start_date` / `end_date` | Optional dates when the schedule is active |

It runs once per scheduled time, even if the check happens a little late.

**Webhook: start with an HTTP POST**

Gives the journey its own hard-to-guess URL. Any POST to it starts a run, with the request body as the starting context. No API key is needed: the URL itself is the secret.

| Field | Purpose |
|---|---|
| `secret` | Optional. If set, requests must include `X-Webhook-Signature: sha256=<HMAC-SHA256 of the raw body with this secret>` |

The URL is created with the trigger and shown in the trigger's settings panel.

**Workflow Event: started by another journey**

Starts a run when another journey's **Emit Event** step sends a matching event name. Use it to chain journeys together.

| Field | Purpose |
|---|---|
| `event_name` | Required. Must exactly match the other journey's `event_name` |
| `filter` | Optional. A condition (same shape as the **Condition** step) on the event's data. The run only starts if it matches |

The trigger panel lists event names your other active journeys already send, so you can pick one instead of typing it.

**Manual: someone clicks Run**

Starts a run only when someone starts it.

| Field | Purpose |
|---|---|
| `allowed_user_ids` | Optional. Only these members can start it. Leave empty for anyone with access to the journey |
| `initial_context_schema` | Optional. `{ "field_name": { "type": "string", "required": true } }`. The dashboard asks for these fields when someone clicks Run, and won't start without the required ones |

**Note:** A **One-time** journey (from **New Journey → One-time**) doesn't need a trigger you set up yourself. It calls everyone in a contact list, CSV file or set of records once. See [Creating a journey](https://docs.lemuai.com/automation/introduction#creating-a-journey).

## Next steps

  - [Branching and Timing](https://docs.lemuai.com/automation/branching-and-timing): Waits, reactions, A/B splits and exit events
  - [Journey Reports](https://docs.lemuai.com/automation/reports): Sends, orders, revenue and A/B results
