Start a flow: keywords and triggers
The Start step decides when a flow begins. Click the Start card in the builder to set it.
What can start a flow?
Under Start when, choose one:
| Option | When the flow starts |
|---|---|
| A customer sends a keyword | The customer's message matches one of your keywords |
| A new contact messages for the first time | Someone who has never messaged this number before sends their first message |
A flow can also be started by another flow's Go to flow step. The trigger is skipped in that case.
How do keywords work?
- Choose A customer sends a keyword.
- Under Match, choose how strictly to match:
- The message is exactly the keyword: the whole message must be the keyword.
menumatches "menu" and "MENU", but not "show me the menu". - The message contains the keyword: the keyword can be anywhere.
pricematches "what's the price?" and "Price list please". - Pattern (regular expression): for advanced matching. See below.
- The message is exactly the keyword: the whole message must be the keyword.
- Type your keywords in Keywords, one per line.
Keywords are not case-sensitive, and spaces at the start and end of the message are ignored.
Good keywords
- For a main menu, use exact matches for short greetings:
hi,hello,menu,start. - For topics, use "contains":
price,book,appointment,track. - Add common spellings and languages your customers use, like
vanakkamornamaste. - Avoid very short "contains" keywords like
hi: it would also match "this" and "which".
Can a button tap start a flow?
Yes. When a customer taps a quick reply button, KiliChat receives the button's text as their message. So a flow with the keyword set to exactly that text starts when they tap it.
For example, if your broadcast template has a quick reply button Book a slot, make a flow with the exact keyword Book a slot. Everyone who taps it gets an instant reply.
The same works for reply buttons and list choices in other flows, as long as the customer isn't already in the middle of a flow that's waiting for their answer.
What is "A new contact messages for the first time"?
The flow starts on the very first message a contact ever sends to this number, whatever it says. It's useful for a welcome menu.
It only runs once per contact. Contacts you imported or added yourself also count as new until they send their first message.
INFO
If this flow runs, the welcome message in Settings → Automation isn't sent too. Use one or the other. See Automatic replies.
How do patterns (regular expressions) work?
Choose Pattern (regular expression) if you know regular expressions. Each line is one pattern, matched without caring about capitals. For example:
| Pattern | Matches |
|---|---|
^(hi|hello|hey)\b | Messages starting with hi, hello or hey |
order\s*#?\d+ | "order 1042", "order #1042" |
\b(price|cost|rate)s?\b | price, prices, cost, rates… |
Patterns longer than 100 characters, or complicated ones that could slow the system down, are refused with "A trigger pattern is invalid or too complex."
What if two flows have the same keyword?
Only one flow runs per message. KiliChat checks active flows in the order they were created, and the first match wins. To control which one runs, make keywords different, or turn the other flow off.
Does a keyword work while the customer is already in a flow?
- If the flow is waiting for an answer (after buttons, a list or a question), the customer's message is treated as their answer, not as a new keyword. If it isn't a valid answer, they're asked again.
- If the flow is on a Wait step, new messages don't start anything until the wait is over.
- If they don't answer for 24 hours, the old flow is dropped, and their next message can start a flow again.
- When your team replies in the inbox, the flow stops, and the next keyword starts fresh.
Why does the Start card say "Add at least one trigger keyword"?
You chose A customer sends a keyword but haven't typed any keywords yet. Type at least one. You'll also see "Connect the Start step to the next step" until the Start card is connected to something.