# DM flows

A **flow** is the list of steps an automation runs after its trigger fires. You build it on the canvas in the automation editor. Each automation has its own flow.

## The editor

- **Canvas**: the trigger sits at the top, and the steps run top to bottom. Click **+** (**Add a node**) between steps to add one. Steps with branches (like **Condition**) split into side-by-side paths.
- **Settings**: click a step to edit it here. On a small screen, settings open in a panel from the bottom.
- **Preview**: shows what the customer sees, as a phone. Comment flows have a **Comments** tab and a **Messages** tab.
- **Guide**: opens the **Automation guide**, with every step type and some proven recipes.
- **Undo** and **Redo** in the header.

*Screenshot: A published comment automation in the editor: Trigger, Send Message and Reply to comment on the canvas, with the Preview tab showing the Delivery scenario and a phone mock-up*

## The building blocks

The steps you'll use most:

| Step | What it does |
| --- | --- |
| **Send Message** | Sends a text DM. |
| **Reply to comment** | Posts a public reply under the comment (comment triggers only). |
| **Send Q&A Card** | Sends a question with up to 3 tappable options. |
| **Wait for Reply** | Pauses until the customer replies, and can branch on what they say. |
| **Condition** | Splits the flow by label or follower status. |
| **AI Expert** | Answers the customer's questions from your knowledge (Pro). |
| **Human Handoff** | Stops the automation and passes the chat to your team. |

There are more, like images, shared posts, timers and follow gates. See [Flow nodes](/automations/flow-nodes) for every step.

## Rules for comment flows

TikTok limits what you can send after a comment. The editor enforces these rules:

1. **The first message must be text.** In a comment flow, the first step that sends something must be **Send Message**. An image, shared post or Q&A card can't come first. In the **Add a node** menu those steps are greyed out, and a step in the wrong place shows a red warning. The text can include a link.
2. **One message until they reply.** TikTok delivers only one message from a comment. A second message before **Wait for Reply** gets a warning, and it won't be delivered. Put **Wait for Reply** before your next message.
3. **Reply to comment only works with comment triggers.** In a **DM Keyword** flow it is an error.
4. **Only some comments get a DM.** TikTok must flag the comment as high intent. See [Who actually gets a DM](/automations/comment-triggers#who-actually-gets-a-dm).

DM Keyword flows don't have rules 1 and 2. The customer messaged you first, so the chat is already open. TikTok's [messaging limits](/inbox/messaging-limits) still apply.

## Anatomy of a good flow

A flow that converts usually looks like this:

1. **Answer the obvious question first.** If they commented `PRICE`, give the price in the first message. Don't make them ask twice.
2. **Post a short public reply**, after the DM.
3. **Ask one question, only if needed.** For example "30ml or 50ml?". Use a **Send Q&A Card** or **Wait for Reply** with response routes.
4. **Point to the next step.** One line on how to order.
5. **Offer a person.** A Q&A card option like `คุยกับแอดมิน` that leads to **Human Handoff**.

Avoid long greetings, long product descriptions, more than two questions, and "Did that help?" follow-ups. Every extra message is a place where people leave.

## Tone

Your automated messages speak for your brand. They should:

- **Sound like a person typing on their phone.** Short sentences. One emoji per message at most.
- **Use the same language as the comment.** Don't reply in English to a Thai comment.
- **Be specific.** `฿890 for 30ml, ฿1,490 for 50ml` works better than `Pricing varies — message us`.
- **Not sound automated.** Avoid `Thank you for your message!` and `Our team will get back to you shortly`.

Read it out loud. If it sounds like a corporate auto-reply, rewrite it.

## Branching example

A shade-help flow for a foundation, on a **Comment Keyword** trigger `SHADE`:

```
Trigger: Comment Keyword SHADE
└─ Send Message "Hi! ขอบคุณที่สนใจ Foundation ของเรานะคะ 🌿 ปกติใช้เฉดไหนคะ? ตอบ Fair / Light / Medium ได้เลย"
└─ Reply to comment "ส่งรายละเอียดให้ทาง DM แล้วนะคะ ✨"
└─ Wait for Reply (Route by response)
   ├─ Contains "fair"    → Send Message (Fair shade tips)
   ├─ Contains "light"   → Send Message (Light shade tips)
   ├─ Contains "medium"  → Send Message (Medium shade tips)
   └─ Default (any other reply) → Human Handoff
```

After **Wait for Reply**, the chat is open, so you can send more messages, images or Q&A cards.

## When a step can't run

Sometimes a step can't do its job. Tuku handles it in one of these ways:

| Behaviour | What happens | When |
| --- | --- | --- |
| **Stops the flow** | The flow ends at that step. Nothing after it runs. | A message can't be delivered. For example, the person isn't [eligible for a DM](/automations/comment-triggers#who-actually-gets-a-dm), or the [messaging window or limit](/inbox/messaging-limits) is reached. This covers Send Message, Send Image, Share a Post, Send Q&A Card and the AI Expert's messages. |
| **Waits, then continues** | The flow waits and picks up later. | **Wait for Reply**, **Wait for Follow** and **Timer**. The **AI Expert** also waits between questions. |
| **Ends after a timeout** | The automation ends for that person. | **Wait for Reply** reaches its timeout with no reply. |

An **AI Expert** that can't answer one question sends its fallback message (if you set one) and keeps listening. See [AI Expert conversations](/ai/expert-conversations).

This is why a **Send Message** goes *before* **Reply to comment**. If the DM can't be delivered, the flow stops, and you never say "check your DMs" in public when no DM went out.

## Test before you publish

- Use the **Preview** tab. In comment flows, set **Delivery scenario** to **DM delivered** or **DM not delivered** to see both outcomes. With **DM not delivered**, the preview stops at the failed DM, just like the real flow: a **Reply to comment** placed before the DM still shows, and one placed after it doesn't.
- If your public reply promises a DM (like "check your DMs"), the preview warns you. If the reply comes before the DM and the DM fails, the reply stays up anyway. Use wording like "Message us for the details" instead.
- For a real test, publish, then comment from a second TikTok account. A test comment may not be flagged as high intent, so a missing DM is not always a broken flow.

## Save, publish and edit

An automation has a **draft** that you edit and a **published** version that runs.

- **Save Draft** stores your changes without changing what runs.
- **Publish** checks the flow and makes the draft live. If something is missing, Tuku lists what to fix (**Can't publish — fix these first:**). The header shows the number of issues as you build.
- The header badge shows the state: **Not saved yet**, **Draft**, **Published v3**, or **Paused · v3**. **Unsaved changes** means you edited since the last publish.
- On the **Automations** list, an automation with saved edits that aren't live yet shows **Unpublished changes**.
- If you try to leave with edits you didn't save, Tuku asks you to confirm first.

Agents, Billing Managers and Viewers can open a flow but can't change it. They see a **View only** badge.

## Pause and resume

On the **Automations** list, use the switch on a row, or the **⋯** menu and **Pause automation**.

- A **Paused** automation does not start for new comments or DMs. People already in it are held where they are. They don't get any more messages until you resume.
- Switch it back on to resume. It runs the version that was live when you paused it. Any newer draft stays a draft (**Unpublished changes**) until you publish it.
- Publishing a paused automation makes the new version live and active again.

The **⋯** menu also has **Duplicate** and **Delete**. For a draft, it shows **Review and publish** instead of **Pause automation**.

:::note
This pauses the whole automation. To stop automation in a single chat, use **Pause automation** in the inbox. See [Human handoff](/inbox/human-handoff).
:::