Automations & WhatsApp

Connecting your WhatsApp Business number

BMexa sends and receives on your number through Meta’s WhatsApp Cloud API. Connect it once with three values from Meta Business Manager.

Introduction

Everything under Marketing › WhatsApp (the automations Auto-reply to new leads, Reply rules and Follow-up sequences, plus campaigns, conversations and leads from WhatsApp chats) runs on a number connected through Meta’s official WhatsApp Cloud API. The number must be registered on a WhatsApp Business Account (WABA) in Meta Business Manager; a number that is only in the WhatsApp Business app on a phone has to be migrated to the Cloud API first (Meta’s WhatsApp Manager offers this).

Once connected, BMexa pulls your approved message templates, lets you choose who new conversations land with, and shows every message sent or received with its delivery status.

What you need from Meta

  1. In Meta Business Manager open WhatsApp Manager › the account › API setup. Copy the WhatsApp Business Account id and the Phone number id.
  2. Create a permanent token: Business settings › Users › System users › add a system user (admin), assign it the WhatsApp account and your app, then Generate token with the permissions whatsapp_business_messaging and whatsapp_business_management. Copy the token; Meta shows it once.
  3. Make sure a payment method is set on the WhatsApp account in WhatsApp Manager › Billing, otherwise Meta refuses to send beyond its test numbers. Every conversation is billed by Meta to that account.

Connecting in BMexa

  1. Go to Marketing › WhatsApp › Numbers and click Connect a number.
  2. Paste the WhatsApp Business Account id, the Phone number id and the Permanent access token (for a second number you can Use the token saved on the first one, if it is the same system user).
  3. Choose who Leads from new conversations land with, keep Create a lead when an unknown number messages this number ticked unless you do not want chat leads, and click Connect. BMexa checks the number with Meta, subscribes to its events and syncs the templates. Every automation page shows Connect a WhatsApp number first with a Go to Numbers button until this is done.
  4. On the number’s card, under Send a test, enter your own WhatsApp under To (your own WhatsApp), pick a Template and click Send test.
  5. Pick the Template for forwarding leads by WhatsApp (used by lead alerts and Lead distribution) and, if you connect several numbers, click Use as the default number on the one alerts and forwards should go from.

What the card tells you

  • Receiving, Paused or Token refused: whether the number can send. Pause stops everything from the number; Resume starts it again.
  • Quality green/yellow/red: Meta’s rating of the number. N/M templates approved and N sent · N received (30d).
  • 1,000 people / 24 h (or Unlimited): the messaging limit, how many different people the number may start conversations with in a day. Meta raises it with volume and quality.
  • Billed in INR: the account’s billing currency. Indian numbers must bill in rupees by 31 December 2026, or Meta stops delivering; the badge turns amber with a note until then.
  • Refresh templates pulls the latest template list and statuses from Meta. Disconnect removes the number with its templates, rules, sequences and campaigns; the message history stays with the lead source.
  • Register with Meta: needed once when a send fails with “(#133010) Account not registered”. Enter the six-digit Two-step PIN and click Register number.
  • Replace the access token: paste a New permanent token and click Save token when Meta has rotated or revoked the old one.

Templates and the 24-hour rule

WhatsApp lets a business send free text only within 24 hours of the person’s last message. Everything else, including the first message to a new lead, has to be a template approved by Meta. Marketing › WhatsApp › Message templates lists yours, lets you submit new ones, and says what fills each placeholder: the client’s name, the project, your company name, the assigned person and so on (merge tags such as @firstName).

Approval usually takes minutes, sometimes up to a day. Utility templates (replies, updates) are approved more readily than Marketing ones (offers). A rejected template shows Meta’s reason.

Start from a sample: the New template form’s Start from a sample list offers ready-made templates, grouped For your leads (welcome, follow-ups) and For your team (the lead alert to the assigned person, the import summary), with the placeholder mapping already set. Edit the wording if you like and submit; the template is approved under your own account. When Refresh templates pulls one of these names from Meta, its placeholders are mapped automatically.

You do not have to open the templates page to write a message: the auto-reply to new leads and each sequence step have a Write a new message writer that sends the text to Meta as a template for you, with merge tags such as @firstName instead of numbered placeholders. BMexa names these templates itself and lists them by their first words wherever a template is picked; the templates page shows Meta’s name under the title.

Lead alerts to your own team from your number

  • On the number’s card, pick the lead-alert template and tick Message the assigned person on WhatsApp when a lead lands with them or is transferred (uses the templates above; needs their mobile under Team). Imports send one summary per person instead. From then on, whoever a lead is assigned to (from any source, a manual add, or a transfer) gets the template on WhatsApp with the lead’s details, as well as the in-app notification. The client’s number and email are masked in every message a team member receives.
  • Spreadsheet imports never alert per lead. Instead, each person who received clients gets one message when the import finishes, “12 new clients assigned to you”, in-app and, once Template for import summaries is set on the card (the sample bulk_leads_assigned fits), on WhatsApp too.
  • Each person needs their mobile number under Team. A template for this is usually Utility: a header such as “New lead received”, a body with the project, name, email and phone placeholders (@projectName, @clientName, @email, @phone), and a link button whose URL ends in {{1}} so it opens that client’s record in BMexa. The sample new_lead_alert under New template › Start from a sample is ready-made for this.
  • A bulk transfer sends at most five messages, one per client, and the same person is not told about the same lead twice within ten minutes. A teammate who replied STOP to the number is skipped; the others still get the alert.

Lead alerts from BMexa’s own number

Companies without their own WhatsApp number can still get lead alerts on WhatsApp, from BMexa’s number, within the plan’s monthly allowance. BMexa switches it on for the company; the admin then sees WhatsApp lead alerts under Account › Settings with the switch Send lead alerts from BMexa’s number, how many teammates have turned it on and how many alerts of the month’s allowance are used. Each person opts in for themselves under Account › Settings › Notifications (or Me › Lead alerts on WhatsApp on the phone) and needs the mobile on their profile. The alert carries an Open lead link straight into the client record, with the client’s phone and email masked.

Costs and limits

  • Meta charges per message by category: marketing (offers), utility (updates), authentication (codes) and service (replies within 24 hours of the person’s message). Meta waives its charge for a conversation that starts from a click on a WhatsApp ad, for 72 hours. Rates differ by market and changed for India on 1 January and 1 October 2026.
  • What Meta charged (last 30 days) under Costs at the bottom of Marketing › WhatsApp (click Show) shows, per number, how many messages were sent, billed, not billed (and of those, how many came from ads) and not yet priced. Enter Your rates (rupees per billed message) from the Meta invoice to see an estimate in rupees; BMexa does not guess them.
  • When Meta reclassifies a utility template as marketing, the person who connected the number is alerted: the template now costs the marketing rate and counts against each person’s marketing limit.

Opt-outs: STOP stops everything

A message that starts with stop, stop all, unsubscribe, cancel, end, quit or opt out, or a tap on Meta’s Stop promotions button, opts that phone out of every message your company sends through BMexa from any of its numbers: campaigns, sequences, the auto-reply to new leads, reply rules, lead forwards and test sends. BMexa checks the opt-out list before each send and records the skip in Message history with the reason “This person opted out of WhatsApp messages (Replied STOP). Nothing is sent until they send START.”

When an opted-out person writes in again, the message is saved on their timeline and the assigned person is told, but no automatic reply goes out; the team answers by phone or from their own WhatsApp. Writing in does not lift the opt-out: only a message that is exactly START, UNSTOP, RESUME, SUBSCRIBE or OPT IN, or Meta’s Resume button, does.

For administrators: the webhook

  1. In the Meta app that owns the WhatsApp product, set the webhook callback URL to <your API URL>/api/v1/integrations/whatsapp/webhook and the verify token to the value of META_WEBHOOK_VERIFY_TOKEN on the BMexa server.
  2. Subscribe to the fields messages, message_template_status_update, phone_number_quality_update, template_category_update and user_preferences.
  3. Set META_APP_SECRET on the server as well: every event is checked against the app’s signature. Without the webhook, sending still works, but replies, delivery statuses and template approvals do not reach BMexa.
  4. Sequences and campaigns are sent by a worker inside the API every WHATSAPP_WORKER_SECONDS (30 by default).

Updated on 29 October 2026