Lead attribution: which ad or post gets credit — and which scenario the AI runs

One lead can arrive from an ad, a comment, a story, or a plain DM — here’s how Chatfuel pins the conversation to its origin and picks the scenario to run

Every lead comes from somewhere: an ad your agency is running, a comment under last week’s post, a story reply, a link in bio, or a plain DM to the account. Chatfuel pins each conversation to that exact origin and keeps it pinned for 24 hours after the lead’s last message — every new message from the lead restarts the clock. Two things follow: you always know which ad or post a lead belongs to, and the AI answers with the scenario you configured for that origin — the lake-house ad can qualify leads differently than the open-house post. This page explains the rules attribution follows, so conversations behave exactly the way you expect.

Distinct source icons — an ad, a comment, a story, a direct message, a link — each tied by its own thread and pinned to a single chat, every thread staying tagged to its origin

Where a lead can come from

Every incoming message is matched to one of these origins:

ChannelOrigins
InstagramComment under a post, comment under an ad, story reply, ig.me link, ad that clicks to Instagram, direct message
WhatsAppAd that clicks to WhatsApp, post that clicks to WhatsApp, direct message
TikTokComment under a post, ad that clicks to TikTok, direct message
WebsiteChat widget

For most origins, attribution goes down to the specific object — not just “an Instagram comment” but a comment under that post, that ad, that story, that link. Plain direct messages and website chats have no object behind them, so they’re attributed at the channel level.

One origin, one scenario

Scenario settings live in automations, arranged in three levels:

  • Main bot — the defaults for everything the bot does.
  • Source — one kind of traffic on a channel: all Instagram comments, all story replies, all ads that click to WhatsApp.
  • Object — one specific post, ad, story, or link inside a source.
Automations section showing the hierarchy: Main bot at the top with sources and specific objects nested beneath
Automations nest three levels — Main bot, Source, Object — and each level only overrides what you set on it

A level only overrides what you set on it explicitly; everything you leave untouched is inherited from the parent. In practice that means you configure the Main bot once, and add overrides only where a campaign needs its own behavior — no duplicating the whole setup per post.

What can differ per level: the AI’s instructions (for comment origins that splits into the public reply, the private reply, and the DM conversation), follow-ups, message delay, when the AI replies — always or only after business hours, human handoff rules, booking autonomy, and whether the AI shares catalog photos.

Two ways to set it up

Open the Automations section to see the hierarchy and edit any level directly — or just tell the Co-Worker: “For the lake-house post, ask about budget and preferred viewing date, and hand off as soon as both are collected.” Both paths edit the same settings.

AI Co-Worker chat setting a per-post scenario — asking for budget and viewing date and handing off when both are collected
One sentence to the Co-Worker sets a scenario on a single post — no digging through the hierarchy

The attribution rules

  1. The first message opens the conversation, pinned to its origin. A lead comments under post A — the conversation is now post A’s, and post A’s scenario runs.
  2. The same origin continues it. Another comment under post A, or a DM reply inside that conversation, keeps everything as is.
  3. A different origin switches it. A story reply, a tap on another ad — or even a comment under post B. Two posts are two different origins: the moment the lead comments under post B, the AI drops post A’s scenario and runs post B’s.
  4. A plain DM never switches it. If a conversation is already open, a direct message continues it instead of hijacking it — more on why below.
  5. 24 hours of silence closes it. The clock counts from the lead’s last message. After it runs out, the next message starts a fresh conversation with fresh attribution.
Timeline of one lead's conversation showing it pinned to post A, staying through a DM, switching to post B, then closing after 24 hours
Only the lead's own messages move the pin — and 24 hours of silence closes the conversation
The fine print

Only the lead’s own messages move attribution — follow-ups, broadcasts, and replies from the team never open or switch a conversation. And attribution only changes when the AI actually answers: if the AI is switched off for that origin, the chat is handed to a human, or it’s outside the answering hours you set, the conversation stays pinned where it was.

Why DMs don’t steal the lead

Here’s the case that makes rule 4 necessary. A lead comments under your client’s post; the AI replies publicly under the comment and continues privately in DM. From that moment, everything the lead types arrives as a direct message. If plain DMs switched attribution, every comment-lead would turn into a “direct lead” two messages in — the post’s scenario would be lost, and the post would lose credit for the lead it produced.

So a plain DM only opens a conversation when none is active. While one is open, the lead’s DM answers continue the scenario of the post, ad, or story that started it — right inside the DM thread.

One distinction to keep straight: ig.me links and ads that click into the inbox also arrive as direct messages, but they’re deliberate entry points carrying campaign intent — those do switch the conversation, like any other origin.

Four situations you’ll actually see

What the lead doesWhat happens
Comments under post A, then replies to a storySwitches — the story’s scenario takes over
DMs the account first, then comments under post ASwitches — the DM opened a channel-level conversation, the comment re-pins it to post A
Comments under post A, then writes in DMStays with post A — the AI keeps running post A’s scenario inside the DM
Comments under post A, later comments under post BSwitches — post B is a different origin with its own scenario

What this buys your campaigns

  • Per-ad scripts. Each ad or post can run its own offer, its own qualification questions, its own follow-ups — matched to the creative the lead actually clicked.
  • Ads keep their credit. The conversation moves into DM, but it stays attributed to the ad or post that produced it — DM traffic doesn’t blur which campaign a lead belongs to.
  • A mental model for debugging. A lead is answering in DM but the bot keeps asking about post A? That’s attribution holding, by design. Want different behavior in that conversation? Change post A’s automation — not the direct-message one.

Where to next