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

# Whatsapp Flow

> Build and manage automated Whatsapp chatbot flows.

A **Flow** is a conversational script the WhatsApp chatbot follows — a sequence of **Steps**, each either waiting for the customer to type something (**Input**) or showing them a numbered menu of choices (**Options**). A step can route to another step, end the conversation, and optionally trigger an automated **Action**.

<Steps>
  <Step title="Open Business → Whatsapp Chatbot → Flow">
    The **Chat Flows** panel on the left lists every flow created so far, with an **Active** badge on whichever one is currently live. Click a flow to open it in the builder on the right.

    Not sure where to start? Click **Generate Sample Flow** to create a ready-made "Sample Shop Flow" covering booking, viewing, and cancelling appointments.

    <Warning>
      The generated sample flow is always named "Sample Shop Flow". Clicking **Generate Sample Flow** again looks for a flow with that exact name and, if found, regenerates it — wiping out any customizations you've made to it. If you want to keep your changes, rename the sample flow to something else first (Business → Whatsapp Chatbot → Flow → edit the flow's name) so a future click creates a fresh flow instead of overwriting yours — or just build a new flow from scratch instead of relying on regenerate.
    </Warning>
  </Step>

  <Step title="Click + Add and fill in the flow details">
    | Field           | Required? | What to enter          |
    | --------------- | --------- | ---------------------- |
    | **Flow Name**   | Yes       | Name of this flow      |
    | **Description** | No        | What this flow handles |

    Save with **Create Flow**.
  </Step>
</Steps>

<Warning>
  Only one flow can be active at a time. Open a flow's menu and choose **Active Flow** to make it the one customers actually go through — doing so deactivates whichever flow was active before, so make sure this is the flow you want live.
</Warning>

<Warning>
  Deleting a flow requires typing its exact name to confirm, since it permanently removes every step and option inside it.
</Warning>

## Building the flow

Once a flow is open, use **+ Add Step** to build it out, and **+ Add Option** (inside an Options-type step) to branch it into a menu.

<Tabs>
  <Tab title="Add a Step">
    <Steps>
      <Step title="Click + Add Step and fill in the details">
        | Field                     | Required? | What to enter                                                                                                                                                         |
        | ------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | **Step Type**             | Yes       | **Input (Wait for user text)** — waits for the customer to type a free-text reply — or **Options (Interactive Menu)** — shows the customer a numbered menu of choices |
        | **Step Key**              | Yes       | A unique identifier for this step, e.g. `START`, `ASK_EMAIL` — automatically uppercased, with spaces turned into underscores                                          |
        | **Message Content**       | Yes       | What the chatbot sends to the customer at this step                                                                                                                   |
        | **Next Step**             | Depends   | Only shown for an **Input** step — where the conversation goes after the customer replies: **End of Flow (END)**, or any other step already added to this flow        |
        | **Trigger Action**        | No        | An automated action to run once this step completes, set up under the **Action** tab — pick **None** to not trigger anything                                          |
        | **Show Navigation Hints** | No        | Adds a "Type P for Previous Menu / M for Main Menu" footer to this step's message                                                                                     |

        Save with **Create Step**.
      </Step>
    </Steps>

    <Note>
      A new flow's very first step is always locked to the key `START`.
    </Note>

    <Warning>
      Once any step is saved, its **Step Key** can't be changed — since other steps or options may already route to it. Every other field on it can still be edited any time.
    </Warning>

    For an **Options** step, **Next Step** isn't shown here — each option added to that step controls its own routing instead (see **Add an Option**).

    New steps are always added to the end of the flow — there's no drag-to-reorder.
  </Tab>

  <Tab title="Add an Option">
    Only available on an **Options**-type step — click **+ Add Option** on that step to add one of its menu choices.

    <Steps>
      <Step title="Click + Add Option and fill in the details">
        | Field            | Required? | What to enter                                                                                     |
        | ---------------- | --------- | ------------------------------------------------------------------------------------------------- |
        | **Option Label** | Yes       | The choice's button text shown to the customer, e.g. "Sales", "Support", "Yes"                    |
        | **Match Value**  | Yes       | The exact number the customer needs to reply with to pick this option, e.g. `1`, `2`              |
        | **Next Step**    | No        | Where this option routes to — **End of Flow (END)**, or any other step already added to this flow |

        Save with **Create Option**.
      </Step>
    </Steps>

    Options are listed in order of their Match Value, not the order they were added.
  </Tab>
</Tabs>

<Warning>
  A step or option can be edited or deleted any time — hover over it for the pencil / trash icons — except a step's **Step Key**, which is permanent once set.
</Warning>
