Skip to content

A glossary story9 chapters · 6 min read

Workflow Automation

Event-driven rules that connect WhatsApp to your store, CRM and back office: when something happens, check conditions, then send or update automatically.

Also called: Business process automation · Trigger-action automation · WhatsApp automation workflows

Reviewed

Follow along

Follow one COD order through a workflow

7 / 7
Storeorder.created webhook
ConditionsCOD? opted in? not sent yet?
Send templatecod_confirm (utility)
Customer on WhatsApptaps Confirm or Cancel
Messages webhookbutton payload
Order systemconfirmed → packing
CRM + sheetstatus and wamid logged
No reply in 24 hcall task for support
  • Store to Conditions: trigger
  • Conditions to Send template: all true
  • Send template to Customer on WhatsApp: delivered
  • Customer on WhatsApp to Messages webhook: button tap
  • Messages webhook to Order system: confirm:ID
  • Order system to CRM + sheet: sync status
  • Send template to No reply in 24 h: no reply

Hop 7 of 7

Send templateNo reply in 24 hno reply

Arrives at No reply in 24 h — call task for support.

An illustrative cash-on-delivery workflow: the store's order webhook triggers it, conditions decide, a utility template goes out, and the customer's button tap updates the order and the CRM. Step through each hop.

Hop 7 of 7: Send template to No reply in 24 h — no reply.

Chapter 1 · The scenario

Example: COD confirmation for a Surat saree seller

A Surat saree seller ships about 600 cash-on-delivery orders a day. Its workflow: when the store's order-created webhook fires (trigger) and the payment method is COD and the buyer opted in at checkout (conditions), send the cod_confirm utility template with the order number, the amount and two quick-reply buttons, then tag the order "awaiting confirmation" (actions). A "Confirm" tap moves the order to the packing queue; "Cancel" voids it before a courier is booked. No reply within 24 hours creates a call task for the support team. Each delivered template costs ₹0.19 — usually far less than the cost of a shipment that comes back.

— COD confirmation for a Surat saree seller

Chapter 2 · What is workflow automation?

Workflow automation is software that runs a business process automatically when something happens. Each workflow follows a trigger–condition–action pattern: a trigger (an order is placed, a payment fails, a lead fills a form, a customer taps a button), conditions that decide whether and how to proceed (the payment method is cash on delivery, the customer has opted in, this order has not been messaged yet), and actions (send a WhatsApp message, update the CRM, add a row to a sheet, create a task for a person).

On the WhatsApp Business Platform, triggers usually arrive as a webhook — from your store, payment gateway or CRM, or from WhatsApp itself when a customer replies or a message status changes. The commonest action is sending an approved utility template such as an order confirmation, a COD confirmation or a payment reminder; the customer's reply then feeds the next step, for example marking the order confirmed when they tap "Yes, confirm". Workflows run on a no-code automation tool, on the automation features of a no-code chatbot builder, or in your own code on a queue.

Workflow automation is business process automation, not conversation. A chatbot holds open-ended dialogue and works out what the customer means; a workflow executes a known sequence the business has defined, with customer input limited to choices such as buttons. The two often meet — a bot can start a workflow, and a workflow can hand a conversation to a bot or an agent — and newer setups let an AI agent trigger workflows as tools, sometimes exposed through the Model Context Protocol (MCP).

Key takeaways

  • Workflow automation runs a defined process when an event occurs: a trigger, some conditions, then one or more actions.
  • On WhatsApp the usual trigger is a webhook from your store or CRM, and the usual action is an approved utility template.
  • It automates business processes, not conversations — open-ended dialogue is a chatbot's job.
  • Make every step idempotent: webhooks are retried, and a duplicate trigger must never send a duplicate message.
  • Business-initiated messages need the customer's opt-in and, outside the 24-hour window, an approved template.

Chapter 3 · How it unfolds

How does workflow automation work?

  1. Pick the trigger

    Subscribe to the event at its source: an order webhook from your store, a CRM status change, a form submission, a schedule, or WhatsApp's messages webhook for replies and button taps.

  2. Check the conditions

    Filter before acting: has the customer opted in, is the payment method COD, is it within allowed sending hours, has this order already been messaged? Conditions keep automations relevant and compliant.

  3. Run the actions

    Send the approved template with its variables filled from the event, update the order or CRM record, and store the WhatsApp message ID (wamid) against the order so later replies and statuses can be matched.

  4. Handle the reply

    When the customer taps a quick-reply button, the messages webhook carries the button's payload. Route it to the next step: confirm the order, cancel it, or open a ticket for an agent.

  5. Make it safe to repeat

    WhatsApp retries webhooks for up to 7 days and most store platforms retry too. Store an idempotency key per trigger — such as order ID plus workflow name — skip anything already processed, and send failures to a dead-letter queue for review.

Chapter 4 · Why it matters

Why does workflow automation matter?

Most WhatsApp messages a business sends are not campaigns but consequences: an order was placed, a payment failed, a parcel is out for delivery, an appointment is tomorrow. Automating those sends makes them instant, consistent and cheap — nobody copies order numbers into a chat — and closes the loop by writing customer replies back into the systems that need them, which is what turns a one-way CRM integration into a two-way one. For Indian e-commerce in particular, an automated COD confirmation before dispatch weeds out fake orders and cuts return-to-origin costs, which is why it is often the first workflow a team builds.

Chapter 5 · In code

Workflow automation in code

app.post("/hooks/order-created", async (req, res) => {
res.sendStatus(200); // acknowledge first (use a queue in production)
const order = req.body;
// Conditions
if (order.payment_method !== "cod") return;
if (!(await consent.hasWhatsAppOptIn(order.phone))) return;
const key = `cod-confirm:${order.id}`; // idempotency key per trigger
if (!(await store.setIfAbsent(key, "sending"))) return;
// Action: send the approved utility template
const r = await fetch(`https://graph.facebook.com/v26.0/${PHONE_NUMBER_ID}/messages`, {
method: "POST",
headers: { Authorization: `Bearer ${ACCESS_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
messaging_product: "whatsapp",
to: order.phone, // digits with country code, e.g. 919812345678
type: "template",
template: {
name: "cod_confirm",
language: { code: "en" },
components: [
{ type: "body", parameters: [
{ type: "text", text: order.number },
{ type: "text", text: order.total_display },
] },
{ type: "button", sub_type: "quick_reply", index: "0",
parameters: [{ type: "payload", payload: `confirm:${order.id}` }] },
{ type: "button", sub_type: "quick_reply", index: "1",
parameters: [{ type: "payload", payload: `cancel:${order.id}` }] },
],
},
}),
}).then((x) => x.json());
await orders.update(order.id, { status: "awaiting_confirmation", wamid: r.messages?.[0]?.id });
});

Trigger, conditions, action — with an idempotency key so a retried store webhook never sends a second confirmation.

Chapter 6 · Where it goes wrong

Common mistakes with workflow automation

  • Duplicate sends from retried triggers

    Store platforms and WhatsApp both retry webhooks, so one order can produce two confirmations. Record what was sent under an idempotency key and check it before every send.

  • Promotional content in a utility template

    Adding an offer to an order update gets the template recategorised as marketing, at a higher price. Keep transactional workflows strictly transactional.

  • Sending without opt-in

    An order is not consent to every kind of message. Capture WhatsApp opt-in at checkout and check it as a workflow condition.

  • Free-form messages from automations

    A workflow that sends plain text hours after the customer's last message fails with error 131047. Outside the 24-hour window, only an approved template gets through.

  • Nobody owns the failures

    An expired token, a paused template or an invalid number can stop a workflow silently. Alert on failed sends and route stuck items to a person.

Chapter 7 · The facts

Workflow automation: key facts and limits

PatternTrigger → conditions → actions
Typical triggersStore, CRM or payment webhooks; schedules; WhatsApp replies
Typical WhatsApp actionAn approved utility template with variables
Utility template (India)₹0.19 per delivered message
WhatsApp webhook retriesUp to 7 days — design for duplicates
Default throughputUp to 80 messages per second per number
Free-form outside the windowFails with error 131047; use a template

Chapter 8 · What good teams do

Best practices for workflow automation

  • Respect quiet hours: queue non-urgent sends for daytime in the customer's time zone.
  • Put the order or ticket ID in quick-reply button payloads so replies map straight back to the record.
  • Start with one high-value workflow — COD confirmation or payment reminders — and measure it before adding more.
  • Version workflows and keep a log of every trigger, decision and action for audits.

Chapter 9 · Workflow Automation FAQs

Workflow Automation FAQs

What is the difference between workflow automation and a chatbot?+
A workflow runs a predefined business process when an event happens; a chatbot holds an open-ended conversation. Workflows send an order update and act on a button tap, while chatbots answer questions typed in free text. Many businesses use both together.
Do I need code to automate WhatsApp workflows?+
No. No-code automation tools can connect store, CRM and WhatsApp events with visual rules. Custom code makes sense for high volumes, complex conditions, or strict reliability and audit requirements.
Which template category do automated order updates use?+
Usually utility, because they are triggered by the customer's own transaction and contain no promotion. Adding offers or cross-sells turns them into marketing, which is billed at a higher rate.
Can an automation message a customer who has not replied in days?+
Yes, with an approved template and the customer's opt-in. Free-form messages are allowed only within 24 hours of the customer's last message, so automations that fire later must use templates.

See InfiQ pricing

* Per-message rates for India, ex-GST: marketing, utility and authentication effective 1 July 2026; service messages ₹0.145 since 1 October 2026 (they were ₹0 until 30 September 2026). Volume commitments earn discounts — final rate is confirmed on your account; applicable GST extra. Rates for other countries differ (see the international rate table on /pricing).

From definition to your first message

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.