Tutorial

How to build a WhatsApp chatbot without code (step by step)

A step-by-step tutorial for building a dynamic WhatsApp chatbot in a visual flow builder, from your first message to live data and agent handoff.

A good WhatsApp chatbot does more than reply with a menu. It understands what the customer chose, remembers their details, looks things up in your systems and knows when to bring in a person. In this tutorial you'll build exactly that in On-chat's visual flow builder, without writing code.

By the end you'll have a working order-support bot that:

  • greets the customer by name,
  • asks what they need and branches on the answer,
  • looks up a live order status from your system,
  • hands the chat to an agent when needed.

What you need before you start

You need an On-chat workspace, a WhatsApp Business Platform number and about 30 minutes.

  1. An On-chat workspace. Start a free 30-day trial if you don't have one.
  2. A WhatsApp Business Platform number connected as a channel. If you haven't set one up yet, follow our guide on getting the WhatsApp Business API first.
  3. About 30 minutes.

You can build and test the whole flow in the simulator before your WhatsApp number is connected, so don't wait on approval to start designing.

Step 1: Plan the conversation on paper

Five minutes of planning saves an hour of rebuilding. Write down:

  • The goal. For this bot: "Resolve order questions without an agent where possible."
  • The entry point. Customers will start by sending a keyword such as order, or any message if this is your main number.
  • The decisions. Track an order, change delivery, or talk to someone.
  • The exits. Every path should end with the customer helped, or handed to a person.

A simple sketch is enough:

Greeting → What do you need?
   ├─ Track order → Ask order number → Look up status → Send status
   ├─ Change delivery → Ask order number → Open ticket for the delivery team
   └─ Talk to someone → Open ticket

Step 2: Create a flow

Create a new Messaging flow in On-chat and open it in the visual editor.

  1. Go to Flows and create a new flow.
  2. Name it something clear, like Order support, and choose the Messaging flow type.
  3. The editor opens with an empty canvas. Every flow is built from two kinds of blocks:
  4. Actions do something, such as Send the contact a message, Update the contact or Open a ticket with a human agent.
  5. Splits decide where to go next, such as Wait for the contact to respond, Split by a custom expression or Call a webhook.

Step 3: Greet the customer and ask what they need

Add a Send the contact a message action:

Hi @contact.first_name 👋 Welcome to Nile Store support. What can I help you with?

@contact.first_name is an expression. When the message is sent, it's replaced with the customer's first name from their WhatsApp profile or your contact data. Expressions are what make a flow dynamic, and you'll use more of them below.

Add quick replies to the same message so customers can tap instead of type:

  • Track my order
  • Change delivery
  • Talk to someone

Step 4: Wait for the answer and branch

Connect the message to a Wait for the contact to respond split. Add one rule per path:

Rule Value Category
has any of the words track, status, where Track
has any of the words change, delivery, reschedule Change
has any of the words agent, someone, human Agent

Customers who type something unexpected land in Other. Don't leave it empty. Send a short "Sorry, I didn't catch that" and loop back to the question, or route it to an agent after the second miss.

Give the result a name such as need using Save as. You can then use @results.need anywhere later in the flow, and it appears as a column when you export results.

Step 5: Ask for the order number

On the Track path, send:

Sure. What's your order number?

Then add another Wait for the contact to respond with the rule has a number and save the result as order_number. If the customer replies with text, the Other branch can ask again: "Please send just the number on your receipt, like 48213."

Step 6: Look up live data with a webhook

This is where your chatbot stops being a script. Add a Call a webhook split:

  • Method: GET
  • URL: https://api.your-store.com/orders/@results.order_number

When the flow reaches this step, On-chat calls your API and stores the JSON response. If your API returns:

{ "status": "shipped", "eta": "2026-11-02", "courier": "Aramex" }

then the next message can read:

Your order @results.order_number has @webhook.status with @webhook.courier and should arrive on @(format_date(webhook.eta)).

The webhook split has Success and Failure exits. Always connect Failure to something useful, such as "I couldn't find that order. Let me connect you to the team," followed by a ticket.

Want to branch on the status itself? Add a Split by a custom expression on @webhook.status, with rules for shipped, processing and delivered, and a different message for each. Our guide to dynamic chatbots with webhooks covers this in depth.

Step 7: Hand off to a human

On the Change and Agent paths, add Open a ticket with a human agent:

  • Topic: Delivery (or General)
  • Body: Order @results.order_number, wants: @results.need

Then send a message so the customer knows what's happening:

Thanks! I've passed this to our delivery team. Someone will reply right here shortly.

The ticket appears in the agent workspace with the full conversation. An agent accepts it, which locks it to them, and replies from the same WhatsApp thread. See live chat ticketing for how agents work with tickets.

Step 8: Test every path in the simulator

Open the Simulator and play the customer:

  1. Tap each quick reply and check you reach the right branch.
  2. Type something random to test Other.
  3. Enter a valid and an invalid order number to test both webhook exits.

Fix anything that feels slow or confusing. A good rule: no customer should need more than three messages to reach the answer or a person.

Step 9: Go live with a trigger

Flows start from triggers. For this bot:

  • Create a Keyword Trigger for order so customers can start it any time.
  • If this is your main support number, add a Catch All trigger so any message that doesn't match another keyword starts the flow.

Watch the first conversations come in. The editor shows how many contacts took each path, which quickly reveals where people get stuck.

What to build next

Once the bot works, make it more personal, more reusable and multilingual.

  • Personalise more. Save the order number to a contact field so returning customers aren't asked again.
  • Reuse steps. Move "ask for order number" into its own flow and enter it from other flows with Enter another flow.
  • Speak their language. Translate the flow once and each contact automatically gets their own language.

Read chatbot flow design best practices before you build your second flow, or start building for free.

Build your first dynamic flow today

30 days free. No credit card. Set up in minutes.

Create your free account