Guide
ctwa_clid to Meta CAPI: sending WhatsApp conversions back to Meta
How to send lead and sale events from WhatsApp chats back to Meta, step by step, with the limits Meta states.

ctwa_clid in the first message webhook. Store it with the conversation. When that chat later becomes a lead, a qualified lead or a sale, send an event with that ctwa_clid to your WhatsApp dataset using the Conversions API for Business Messaging. Meta can then link the outcome to the ad that caused it. Events must be sent within 7 days of when they happened.By The Wise Parrot · Published 27 Nov 2026 · Updated
Technical details below are from Meta's documentation (links at the end), read on 27 Nov 2026. Meta changes API versions and rules often, so re-check before you build, and test your payloads against a test dataset first. Meta writes this guide for Business Messaging Partners; see "Who can set this up".
Why it matters
Click-to-WhatsApp ads are usually judged on the cost of a conversation. A conversation is not a customer. If Meta only sees "chat started", it cannot tell which ad brought buyers and which brought chatters. Sending back later outcomes lets you compare ads on qualified leads and sales. Meta's documentation says the Conversions API enables purchase optimisation for ads that click to WhatsApp (not for Click-to-Instagram ads).
What you need first
- A WhatsApp Business Account (WABA) on the WhatsApp Business Platform. Meta recommends the Cloud API.
- A Meta developer app with advanced access to
whatsapp_business_managementandwhatsapp_business_manage_events. Meta says an app with advanced access towhatsapp_business_messagingshould be approved automatically forwhatsapp_business_manage_eventsonce it applies. - Access to the Marketing API tier feature. Meta's page notes that its labels changed to "Limited Access" and "Full Access" and that the threshold for Full Access was reduced from 1,500 to 500 Marketing API calls in 15 days, while older text further down the same page still says 1,500 successful calls with an error rate under 10%. Check the current requirement in the Marketing API Access Tier documentation.
- A login method for authorisation, such as Embedded Signup or Facebook Login for Business.
- An access token with the two permissions above.
Step by step
1. Capture ctwa_clid from the webhook
Subscribe to the WhatsApp Messages webhook. For a chat that began from an ad, the first inbound message has a referral object. Inside it is ctwa_clid, plus source_id, source_type (ad), source_url, headline and body.
"messages": [{
"from": "<CUSTOMER_WA_ID>",
"id": "<MESSAGE_ID>",
"timestamp": "1678189586",
"type": "text",
"referral": {
"source_type": "ad",
"source_id": "<AD_ID>",
"ctwa_clid": "<CLICK_TO_WHATSAPP_CLICK_ID>",
"headline": "<AD_HEADLINE>"
}
}]
Store ctwa_clid against the conversation or lead record the moment it arrives. If you do not store it, you cannot use the best matching path later. Treat it as a personal identifier and handle it under your privacy policy.
2. Get or create the dataset
A dataset is where Meta collects events from a source such as your business chats. The business owns it. Make a call to the WABA's dataset edge with your access token; Meta says it returns the existing dataset ID if one already exists. In Meta's current samples the Graph API version is v27.0.
POST https://graph.facebook.com/v27.0/{WHATSAPP_BUSINESS_ACCOUNT_ID}/dataset?access_token={TOKEN}
GET https://graph.facebook.com/v27.0/{WHATSAPP_BUSINESS_ACCOUNT_ID}/dataset?access_token={TOKEN}
The response is the dataset_id. Never paste your token in public code or chat.
3. Decide which chat moments become events
Meta supports a fixed set of 14 business messaging events: Purchase, LeadSubmitted, InitiateCheckout, AddToCart, ViewContent, OrderCreated, OrderShipped, OrderDelivered, OrderCanceled, OrderReturned, CartAbandoned, QualifiedLead, RatingProvided and ReviewProvided. Custom names are not in the list. Messaging events should only describe things that happened in the chat, not on your website.
A simple mapping for a lead-generation business (our suggestion, not Meta's rule):
| Moment in the chat | Event |
|---|---|
| The ad-started chat becomes a lead | LeadSubmitted |
| Your team or your rules mark the lead as qualified (write down what "qualified" means first) | QualifiedLead |
| The sale is recorded | Purchase (with value and currency, as in Meta's sample) |
Send each event once per lead.
4. Send the event
POST https://graph.facebook.com/v27.0/{DATASET_ID}/events?access_token={TOKEN}
{
"data": [{
"event_name": "QualifiedLead",
"event_time": 1675999999,
"action_source": "business_messaging",
"messaging_channel": "whatsapp",
"user_data": {
"whatsapp_business_account_id": "<WABA_ID>",
"ctwa_clid": "<CLICK_TO_WHATSAPP_CLICK_ID>"
}
}],
"partner_agent": "<PARTNER_NAME>"
}
For a sale, add custom_data with currency and value, as Meta's Purchase sample does:
"custom_data": { "currency": "INR", "value": <SALE_AMOUNT> }
partner_agent is part of Meta's sample for partners. If you are not a partner, check whether you need it.
5. Check it in Events Manager
Open the dataset in Events Manager and confirm the events appear. Meta tells partners to show advertisers how to open their own dataset to verify.
Rules that cause most failures
event_timeis a Unix timestamp in seconds and can be up to 7 days before you send. If any event in a request is older than 7 days, Meta rejects the whole request and processes none of them. So send promptly and send events one at a time or in small batches you can retry.- Meta does not help you deduplicate business messaging events. If you send the same event twice, Meta sees two. Keep a record of what you have sent.
- Business messaging events are not for website conversions. A sale made on your website belongs to your website's Conversions API or pixel setup.
action_sourcemust bebusiness_messagingandmessaging_channelmust bewhatsappfor this flow.
If you do not have a ctwa_clid
A conversion can happen in a chat that started before you stored the click ID. Meta allows sending hashed customer information instead. You send page_id, whatsapp_business_account_id and at least one hashed field such as ph (phone) or em (email). Normalise each value and hash it with SHA-256 as Meta describes.
Limits Meta states for this path: matching is not guaranteed; it attributes an event to an ad interaction from the past seven days; it is available in a subset of countries; and external_id alone is not used for matching. Send ctwa_clid whenever you have it.
What changes in your ads
Once events flow, you can compare ads on cost per qualified lead and sales instead of cost per conversation. Meta's help page says the "Maximise number of leads through messaging" goal needs one or more lead or purchase events shared with Meta, and that it is being introduced gradually, so it may not be available to every account.
Who can set this up
Meta's guide is written for Business Messaging Partners sending events on behalf of clients, using their client's WABA and dataset. A business can also use a tool or partner that already sends these events. Meta's page does not say whether a single business can integrate directly without partner status, so check Meta's documentation or support before you build. Some WhatsApp platforms list conversion events on certain plans (see our comparison pages), so check your tool before building your own.
Sources (Meta)
- https://developers.facebook.com/docs/marketing-api/conversions-api/business-messaging/
- https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event/
- https://en-gb.facebook.com/business/help/575610661605746
If you are choosing a WhatsApp tool, see WhatsApp tool alternatives.
Quick answers
What is ctwa_clid?
It is the Click-to-WhatsApp click ID. Meta includes it in the referral object of the first inbound message when a chat starts from an ad. It is unique per click and must be sent back with conversion events.
What events can I send for WhatsApp?
Meta supports 14: Purchase, LeadSubmitted, InitiateCheckout, AddToCart, ViewContent, OrderCreated, OrderShipped, OrderDelivered, OrderCanceled, OrderReturned, CartAbandoned, QualifiedLead, RatingProvided and ReviewProvided.
How long do I have to send an event?
The event_time can be up to 7 days before you send it. If any event in a request is older than that, Meta rejects the whole request.
Do I need a separate dataset for WhatsApp?
Meta's flow uses a dataset linked to your WhatsApp Business Account. Meta's FAQ says you can link an existing dataset and that only one dataset can be linked to a Page.
Does Meta remove duplicate WhatsApp events for me?
No. Meta says it does not assist with deduplication for the Conversions API for Business Messaging, so you must avoid sending duplicates.
Can I send events without ctwa_clid?
Yes, with hashed customer information and a page_id, but matching is not guaranteed, it covers only the past seven days and it is available in a subset of countries.
Next step
Apna ek enquiry bhejo. Hum live dikhate hain.
Book a 30-minute call with The Wise Parrot team. See The Wise Parrot on your own kind of enquiry, and the pricing for your numbers.