# AI, conversation, data and ticket steps

> Journey steps that choose the channel and offer per person, read a contact's events, chat on WhatsApp with an agent, use AI on replies, update records and sheets, and open tickets.

URL: https://docs.lemuai.com/automation/more-steps
For: Everyone
Checked against LemuAI app version 1.0.12
Related: [Journey Nodes & Triggers](https://docs.lemuai.com/automation/nodes-and-triggers), [Branching and Timing](https://docs.lemuai.com/automation/branching-and-timing), [Offers](https://docs.lemuai.com/offers/overview), [Lemu Tickets](https://docs.lemuai.com/integrations/lemu-tickets)

These journey steps are added from the **Add New Node** panel in the journey editor, like the steps in [Journey Nodes & Triggers](https://docs.lemuai.com/automation/nodes-and-triggers). Each section gives what the step does, its settings, and the paths (exits) it can leave by. Values marked `{{…}}` are [variables](https://docs.lemuai.com/core-concepts/context-and-variables) from the run.

## Choose channel, time and offer

Picks, for each contact, which channel to try first (email, SMS, WhatsApp, and optionally a call), waits for that person's best hour, and picks an offer tier: no offer for loyal low-risk buyers, **high** for at-risk big spenders, otherwise **standard**.

| Setting | Meaning | Default |
|---|---|---|
| Channels | Which of email, SMS (Indian mobile numbers), WhatsApp and call it may use | |
| Timing | Their best hour, or now | Best hour |
| Offers | An [offer head](https://docs.lemuai.com/offers/overview) per tier (standard, high). Leave a tier out to send no offer | |
| Follow-up hours | Hours to wait for a response before trying the next channel (1-72) | 24 |
| Max attempts | Most channels to try per contact (1-3) | 2 |
| Who may be called | At-risk big spenders, contacts above a lifetime value, or anyone | At-risk big spenders |
| Call first | Allow a call as the first try | Off (calls are follow-ups only) |
| Explore | Share of contacts (0-50%) given a random tier, to compare offers | 10% |
| Cheaper channel within | Use the cheaper channel when its response is within this percent of the best | 20% |

**Exits:** **email**, **sms**, **whatsapp**, **call** (connect each to the step that sends on that channel), then **responded** (they read, clicked, replied, answered or ordered; for SMS, a link click), **no_response** (after the last attempt) and **unreachable** (no channel can reach them).

Connect each send step's outcomes **back** to this step, so it can wait for a response and try the next channel. Templates use `{{offer.chosen.code}}` and `{{offer.chosen.headline}}`.

## Look up events

Reads the contact's own events of one type (website views, add to carts, orders, any custom event) over a time window, and saves a summary for later steps under `{{context.events}}`.

| Setting | Meaning |
|---|---|
| Event | Like `ViewContent`, `AddToCart` or `Purchase` |
| Filters | On the event's properties (equals, contains, is in, greater than…), values can be variables |
| Look back | How far back (default 30 days); empty for all time |
| Group by | A property to group by (like `content_ids` or `items.id`) to find the most frequent value |
| Add up | A number property (like `value`) for sum, average, min and max |
| Minimum count | Events needed to leave by **found** (default 1) |

**Results:** `count`, `first_at`, `last_at`, `last` (the newest event's properties, like `{{context.events.last.content_name}}`), `recent` (newest 10); with group by, `{{context.events.top.value}}` and `{{context.events.top.count}}`; with add up, `sum`, `avg`, `min`, `max`.

**Exits:** **found**, **not_found**.

Example: a journey started by **Enters or leaves a segment** looks up `ViewContent` grouped by `content_ids`, then a **Catalog lookup** with key `{{context.events.top.value}}` to message about the product they viewed most.

## Catalog lookup

Fetches one item from a catalog (like your Shopify products) or a record type by its key, usually from the event (`{{context.product_id}}`), so later steps can use `{{context.catalog_item.title}}`, `.price`, `.url` and `.image_url`.

**Find the item by** lets you look for the value in other columns instead of only the key, for example the title to find a product by name, or `sku` then `group_id`. The match is exact, ignoring case, and the first listed column that matches wins. The run records which column matched.

**Exits:** **found**, **not_found**.

## Update record

Changes fields on a [custom record](https://docs.lemuai.com/records/overview): by default the record the journey is about (from **Record changes**, **Record date** and **Catalog item changes** triggers), or another one by record type and key. Values can be variables, and dates like `now()` or `now() + 3d`.

Use it to mark a back-in-stock alert as notified, a lead as contacted, or a loan as reminded.

**Exits:** **updated**, **not_found**.

## Update Google Sheet

Writes values into a row of your connected [Google Sheet](https://docs.lemuai.com/integrations/google-sheets). The row is found by the contact's phone number (the column you mapped to phone when connecting) and added if missing.

- **Columns:** sheet column header → value. Values can be variables and dates like `now() - 1d`. The headers must already exist in the sheet.
- **Sheet:** which connected sheet (only needed when you have more than one).

**Exits:** default, **error**.

## Wait for reply

Waits for the contact's next WhatsApp message and saves it as `{{context.reply}}`: `reply.text`, `reply.button_text`, `reply.button_payload`, `reply.media`, `reply.order`, `reply.flow_response`, `reply.message_type`.

- **Timeout:** how long to wait (default 24 hours).
- **Number:** only count replies to one business number (empty = any).

**Exits:** one per button (or list row) of the WhatsApp message before it, **text** for any other reply, **timeout** when nothing arrives.

## AI step

One AI call using your workspace's model, usually on the customer's reply. Three modes:

| Mode | What it does | Exits |
|---|---|---|
| **Classify** | Picks one of your labels for the text, like `wants_refund`, `delivery_question`, `complaint` | One per label, plus **other** |
| **Extract** | Saves fields from the text into the run, like `order_id` and `city` (`{{context.order_id}}`) | default |
| **Write** | Writes text from your instructions into the run (default `{{context.ai_text}}`), for example a personal reply | default |

- **Input:** the text to work on; default the WhatsApp reply (`{{context.reply.text}}`).
- **Instructions:** what to do, in plain words.
- Knowledge base documents can be added for it to search.

**Exits** also include **error** when the AI fails or the **AI balance** is empty.

## Agent conversation

Hands the contact's WhatsApp chat to one of your agents until it finishes. The agent answers every message with its prompt, knowledge base and tools, like a call but in chat.

| Setting | Meaning | Default |
|---|---|---|
| Agent | The agent that chats | |
| First turn | **Reply** (answer the message that started the journey) or **Greet** (the agent opens) | Reply |
| Silence hours | Leave by timeout after this long without a customer message | 24 |
| Number | The business number; empty = the one the contact last wrote to | |
| Pass variables | Journey variables the agent can use | |

**Exits:** **completed**, **handed_off** (the agent or customer asked for a person: follow it with **Assign to team**), **timeout** and **window_closed**. Needs an open 24-hour window (the customer wrote recently). The agent's extracted variables join the run like a call's.

## Assign to team

Hands the contact's WhatsApp conversation to your team in the [Inbox](https://docs.lemuai.com/messaging/inbox), optionally to one teammate, with a **Note** shown in the thread. **Then:** end the journey (default) or continue.

Use it after an Agent conversation's **handed_off** exit, or when an AI step classifies a complaint.

## Ticket steps (Lemu Tickets)

Need [Lemu Tickets](https://docs.lemuai.com/integrations/lemu-tickets) connected.

| Step | What it does | Main settings |
|---|---|---|
| **Create ticket** | Opens a ticket for the journey's contact. Later steps can use `{{nodes.<step id>.ticket_key}}` and `ticket_url` | **Title** (required), description, project (empty = default), type, priority (`p1` urgent to `p4` low) |
| **Update ticket** | Changes status (by name), priority, title or labels, with an optional internal note | Ticket key (empty = the ticket that started the journey) |
| **Ticket comment** | Adds a comment: **internal** (a team note, the default) or **public** (a reply the customer receives) | Ticket key, comment text (required), visibility |

**Exits:** default, **error**.
