See which ad started a WhatsApp chat
On this page
Deskwoot records on its own which Facebook or Instagram ad started a WhatsApp chat. Meta sends the ad's data with the first message, Deskwoot saves it on the conversation and the contact, and you can read it through the API.
What gets saved
When someone clicks a Click to WhatsApp ad and sends their first message, Meta adds a referral object to the incoming webhook. Deskwoot saves all of it on the conversation:
- Source type:
adorpost, depending on whether the click came from a paid ad or a "Send Message" button on a Facebook or Instagram post. - Ad or post ID: the Meta object behind the click, useful to group conversations by ad in your reports.
- Click ID (
ctwa_clid): the ID of that single click, which you can match against your Meta Ads reports and send back to the Conversions API. - Headline and body: the exact ad text the person saw when they clicked.
- Source URL: a direct link to the ad or post on Facebook or Instagram.
- Media type with image or video URL: the creative the person was looking at when they clicked.
Where to find it in Deskwoot
Open a WhatsApp conversation. When it started from a Click to WhatsApp ad, the details on the right show the section Came from an ad: the ad's headline and text, whether it was an ad or a post, where it ran (Instagram or Facebook), and Open ad.
In the chat, a line above the message the person sent from the ad says "Came from the ad" with the ad's headline.
If the same person clicks another ad while their conversation is still open, the new ad replaces the one shown. The previous one stays in conversation.customAttributes.whatsappReferralHistory. The latest ad is also copied to the contact under customAttributes.lastWhatsappReferral, so it stays for later conversations of the same person.
Read it through the API
The data sits on the standard conversation and contact endpoints under customAttributes. Reading it through the API needs an API token, which only the Enterprise plan can create:
GET /api/v1/conversations/<id>
{
"id": "...",
"customAttributes": {
"whatsappReferral": {
"sourceUrl": "https://fb.me/2abc123def",
"sourceId": "120203456789012345",
"sourceType": "ad",
"headline": "Patch Video Ad",
"body": "Get our new patch with 30% off this week",
"ctwaClid": "AAabcdEFGHijklMNOPqrstUVWxyz1234567890",
"capturedAt": "2026-05-01T19:39:41Z"
}
}
}Send the data to your CRM or ad platform
On the Business plan and up, Deskwoot's outgoing webhooks (Settings > Webhooks) include the ad data. The event Conversation created carries the conversation, with the ad data under customAttributes.whatsappReferral. Events such as Conversation updated or Conversation resolved carry the conversation ID but not the ad data. For those, read the ad data through the API:
- Take the conversation ID from the webhook event.
- Read the conversation through the API as shown above.
- Pass
customAttributes.whatsappReferral(click ID and ad ID) on to HubSpot, Pipedrive, Notion, Google Sheets, or back to Meta's Conversions API, so Meta can optimize your ads on real results.
Limits to know about
- Meta adds the
referralobject only to the very first message of a chat that started from an ad. Deskwoot saves it from that message. Later messages in the same conversation do not carry it. - Conversations that did not start from an ad (organic chats, your own messages, link clicks without an ad) show no ad section. That is correct, since there is nothing to attribute.
Frequently asked questions
Which plan do I need?
Does it work with WhatsApp through Twilio?
Where do I see which ad started a WhatsApp conversation?
Do outgoing webhooks include the ad data?
customAttributes.whatsappReferral. Events such as Conversation updated carry the conversation ID but not the ad data. Use the ID to read the conversation through the API.Was this guide helpful?
Keep reading
- Connect your email inboxConnect any email address to Deskwoot and answer email next to your other channels: forwarding on every plan, or IMAP/SMTP from the Startup plan.Read guide
- Set up WhatsApp BusinessConnect your WhatsApp Business account to Deskwoot to manage WhatsApp conversations alongside your other channels. Deskwoot uses the WhatsApp Cloud API, which is free to set up.Read guide
- Connect a Telegram botConnect a Telegram bot to Deskwoot and answer private chats and Telegram groups from your inbox, with member names, replies to single messages and a contact for every member.Read guide