# CRM and WhatsApp API: the life of an order in 8 messages

Your customer writes "where is my order?" on WhatsApp, and your CRM does not even know. The surprising part: that message costs you nothing. The one you send her three days later is the one you pay for.

A CRM connected to the WhatsApp API follows each order in the conversation where the customer lives it: confirmation, shipping, question, review, next purchase. You need three things. Link each message to a contact and an order. Respect the 24-hour window and consent. Let your code decide what is sent.

## The 30-second test

Before you read on, answer yes or no. Each "no" points to a section below.

- When a customer writes "where is my order?", your team finds the order without asking for the order number.
- Your CRM knows who agreed to receive your WhatsApp messages, and since when.
- A customer who replies STOP receives nothing more, even from another team.
- You know which messages Meta charges you for, and which ones are free.
- If your server receives the same event twice, the customer does not receive the same message twice.

Five yes: skip to the section on traps. Otherwise, follow Léa.

## The WhatsApp Business app is not enough for a CRM

Many teams start with the WhatsApp Business app on a phone. It is made for one person who replies by hand. A CRM needs something else: every message must reach your software, and your software must be able to send.

| What the CRM needs | WhatsApp Business app | WhatsApp API (official, from Meta) |
| --- | --- | --- |
| Receive every message in your software | No | Yes, by webhook |
| Send from your software | No | Yes, by API |
| Several people on the same number | Limited | As many as your software handles |
| Automatic messages (confirmation, shipping) | No | Yes, with templates approved by Meta |
| Know if a message was delivered and read | By looking at the phone | Yes, by event |

A word on "unofficial" solutions, which connect a CRM through a QR code and a WhatsApp Web session. They work until the day Meta blocks the number. For a CRM that carries your customers' orders, that risk is not worth it. Details in [Official or unofficial WhatsApp API](https://nodium.io/en/guides/official-vs-unofficial-whatsapp-api).

## The life of an order in 8 messages

Let's follow Léa, a customer of an online sneaker shop. The example is made up; the Meta rules it shows are real.

| # | Moment | Who writes | Message type | Charged by Meta? | What your CRM stores |
| --- | --- | --- | --- | --- | --- |
| 1 | At checkout, Léa ticks "get tracking on WhatsApp" | — | — | — | The consent, its date, its source |
| 2 | Order paid | You | "Utility" template: confirmation | Yes | Message linked to order 1042 |
| 3 | Parcel shipped, two days later | You | "Utility" template: shipping and tracking link | Yes | Status delivered, then read |
| 4 | "Can I change the address?" | Léa | Message received | No | The 24-hour window opens |
| 5 | "Yes, here is the link to change it" | Your team | Free text | No, up to 1,000 replies per number per month | Reply linked to the order |
| 6 | Parcel delivered | You | Free text, the window is still open | No, within the 1,000 | Order status |
| 7 | Ten days later: "How do you like your sneakers?" | You | "Marketing" template | Yes | Reply, or silence |
| 8 | Léa replies STOP | Léa | Message received | No | Consent withdrawn: no more marketing messages |

The table shows three things.

- **Messages 2, 3 and 7 are templates.** Outside the 24-hour window, you can only write to Léa with a template approved by Meta. Explained in [the 24-hour window](https://nodium.io/en/guides/24-hour-window).
- **Léa's message opens a window.** For 24 hours, your free-text replies are free, up to 1,000 per number per month since 1 October 2026. Details in [WhatsApp replies are no longer free](https://nodium.io/en/guides/whatsapp-replies-no-longer-free).
- **STOP counts for everyone.** Meta's policy asks you to respect an opt-out, whether it arrives in WhatsApp or elsewhere. Your CRM must know it before any campaign.

## What your CRM must store

You do not need a new CRM. You need five pieces of information, each in the right place.

| Information | Example for Léa | Where it comes from | Why it matters |
| --- | --- | --- | --- |
| The contact | Léa, +33 6 12 34 56 78 | Your shop, then WhatsApp | The international phone number is the key that links the two |
| The order | Order 1042, shipped | Your shop or your ERP | It stays the source of truth for the status |
| The conversation | 6 messages, the last one yesterday at 6 pm | WhatsApp events | Your team sees the history without asking |
| The consent | Yes since 3 November, withdrawn on the 21st | Checkout, then STOP | It decides who can receive a marketing template |
| The next action | Refund the size 38 | Your team | It survives a change of team |

One simple rule avoids half of the mistakes: **an imported contact is not a contact who gave consent.** A list of customer numbers does not allow you to write to them on WhatsApp. Consent is collected, and dated.

## The connection, for real

Here is the path of a message, from Léa's phone to your CRM, and back.

```text
Léa (WhatsApp)
   │  "Can I change the address?"
   ▼
Meta (WhatsApp Cloud API)
   ▼
Nodium ── signed webhook ──► your server ──► your CRM
                                 │              (contact, order, conversation)
                                 │  your code decides
                                 ▼
Nodium ◄── POST /v1/messages ── your server
   ▼
Léa receives the reply
```

Your server receives each message by webhook, checks that it really comes from Nodium, then stores it in the CRM:

```js
import { NodiumSignatureError, verifyWebhook } from '@nodium.io/whatsapp/server'

export async function POST(request) {
  const rawBody = await request.text() // the signature is computed on the raw body
  try {
    const event = verifyWebhook(rawBody, request.headers, process.env.NODIUM_WEBHOOK_SECRET)
    const data = event.data

    if (event.event === 'message.received') {
      const contact = await crm.contacts.findByPhone(data.from)
      const order = contact && await crm.orders.lastOpen(contact.id)
      await crm.timeline.add({ contactId: contact?.id, orderId: order?.id, text: data.text, at: event.occurred_at })
    }
    if (event.event === 'contact.opted_out') {
      await crm.contacts.setWhatsappConsent(data.contact_id, false)
    }
    return new Response(null, { status: 200 })
  } catch (error) {
    if (error instanceof NodiumSignatureError) return new Response(null, { status: 400 })
    throw error
  }
}
```

And when the parcel ships, your shop sends the shipping template:

```js
await nodium.messages.send({
  channelId: process.env.NODIUM_CHANNEL_ID,
  to: '+33612345678',
  type: 'template',
  templateName: 'order_shipped',
  templateLanguage: 'en',
  variables: { '1': 'Léa', '2': '1042', '3': 'https://example.com/tracking/1042' },
  idempotencyKey: 'order-1042-shipped' // sent twice by mistake, it goes out once
})
```

The idempotency key is the detail that saves you. If your shop replays the "order shipped" event, Léa does not receive two messages. And if your server was down, the event log (`GET /v1/events`) gives you back everything you missed, from your last cursor.

## 6 traps that cost money

- **Writing to an imported list.** Without consent, it breaks Meta's policy, and your customers will report the number.
- **Missing the window.** A free-text message sent outside the 24 hours is refused. Your code must send a template instead.
- **Forgetting that replies cost money.** Beyond 1,000 replies per number per month, Meta charges each reply. With no payment method at Meta, they are refused.
- **Choosing the wrong template category.** A promotion disguised as "utility" can be moved to another category by Meta. Keep utility for messages about an order.
- **Sending twice.** Webhooks can arrive twice. Without an idempotency key, the customer receives the same message twice.
- **Writing numbers badly.** "06 12 34 56 78" in the shop and "33612345678" in WhatsApp are the same customer. Always store the international format, or your CRM creates two contacts.

## And what about AI?

Every CRM now promises a smart assistant. It can help to summarize a conversation or suggest a reply. But what reaches Léa must stay a decision of your software, or of your team.

That is our choice at Nodium: we carry the messages, we do not read them, and we never reply in your place. If you want an agent, connect your own, for example with our [n8n template](https://github.com/Nodium-io).

## Where to start this week

- Add a "get tracking on WhatsApp" box at checkout, and store its date.
- Store phone numbers in international format (+33…).
- Write two "utility" templates: confirmation and shipping. Get them approved by Meta.
- Connect a webhook that stores each received message on the contact's record.
- Test STOP from start to end before your first campaign.

## Frequently asked questions

### Do I need to change my CRM to use WhatsApp?

No. Your CRM keeps the contacts and the orders. The WhatsApp API brings it the messages by webhook, and your code sends the replies.

### How much does a WhatsApp message sent from a CRM cost?

Templates (utility, marketing, authentication) are charged by Meta, per delivered message, based on the recipient's country. Free-text replies are free up to 1,000 per number per month. The rates are on Meta's pricing page.

### Can I keep the WhatsApp Business app on the phone?

Yes, with coexistence: the same number stays in the app and also goes through the API. What the phone sends reaches your software as an event.

## Sources

- [Meta — WhatsApp Business Messaging Policy](https://business.whatsapp.com/policy)
- [Meta — WhatsApp Business Platform pricing](https://developers.facebook.com/docs/whatsapp/pricing)

Updated 2026-11-22 · https://nodium.io/en/guides/crm-whatsapp-api
