Skip to main content

AI WhatsApp Bot

A rule-based auto-reply layer plus a full AI bot with a configurable persona and knowledge base.

3 min read

Mersal can answer WhatsApp messages on its own, without a human on the other end. There are two layers to this, and you can use either independently or together: simple rule-based auto-replies, and a full AI bot with a persona and knowledge base.

Layer 1: Rule-based auto-replies

Before you touch AI at all, Mersal supports straightforward auto-replies triggered by simple rules:

  • Keyword-triggered replies — a fixed reply sent when an incoming message matches a keyword.
  • Welcome message — sent automatically to a contact reaching out for the first time.
  • Away message — sent when you're not actively available to respond.
  • Fallback message — sent when nothing else matches, so a contact never gets silence.

This layer is fast to set up and doesn't require any configuration beyond writing the messages themselves — a good starting point if you just need basic coverage.

Layer 2: The AI bot

For conversations that need real answers rather than fixed text, the AI bot layer takes over. It's built around three things:

  • Persona — a configurable identity the bot uses when responding, so replies sound consistent with how you want to represent your business.
  • System prompt — the underlying instructions that shape how the persona behaves and responds.
  • Knowledge base — the source material the bot draws answers from, scoped per persona.

Building the knowledge base

A persona's knowledge base can be built from any combination of:

  • Plain text you enter directly.
  • An uploaded document (for example, a .docx file).
  • A URL, which Mersal reads and indexes as source content.

The bot grounds its answers in this knowledge base, so it responds with information specific to your business rather than generic AI output. For a full walkthrough of setting up a persona and its knowledge base, see Configuring the AI Bot Persona.

Built on Mersal's AI Pool

The AI bot doesn't depend on a single AI provider. It runs through Mersal's AI Pool — a multi-provider routing layer that automatically fails over between AI providers if one becomes unavailable.

Because the AI Pool handles failover automatically, the bot keeps answering customer questions even if a single upstream AI provider has an outage — you don't need to configure or monitor this yourself.

Automation and the AI bot

The AI bot isn't limited to WhatsApp's default reply flow — the same AI capability is exposed as nodes (ai_send and ai_generate) inside the visual automation builder, so you can weave AI-generated responses into a larger workflow alongside keyword triggers, waits, and conditions. See Automation Workflows for how those nodes fit together.

Was this page helpful?
AI WhatsApp Bot · Mersal Docs