DEV Community

Ayoub Hammoudi
Ayoub Hammoudi

Posted on

"Stop on reply" sounds like one if statement. It is three matching problems.

An inbox: the prospect replied "No thanks" on Tuesday, the automated follow-up "Just circling back" went out anyway on Thursday

You told a salesperson "no thanks." Two days later: "Just circling back." Their tool had your reply in its inbox the whole time. It just could not tell that the reply was yours.

I build the reply side of a prospecting tool, Phantera. Here is what "stop the sequence when the prospect replies" turns into once you write it.

Problem 1: which email is this a reply to?

The subject line is useless. People change it, delete the "Re:", or answer from a phone that rewrites it.

What survives is in the headers. Every email you send carries a Message-ID. A reply quotes it back in In-Reply-To (RFC 5322, section 3.6.4). So we match in this order:

  1. the provider's thread id against the one we stored at send time (the most reliable on Gmail)
  2. In-Reply-To against the Message-ID we stored
  3. a legacy id from an older sending path

If none matches, the message is not a reply to anything we sent. It is ignored, and we never store or log it. A tool that reads your inbox should forget everything that is not its business.

Problem 2: the reply did not come back by email

You email, they answer on LinkedIn. If each channel is watched by its own loop, the next email goes out anyway, and now you look like a bot on two channels.

The fix is boring and strict: a reply on any channel marks the lead as "do not contact," and every later step checks that flag before sending, whatever its channel. LinkedIn replies are matched to the lead by the sender id we stored when we sent the LinkedIn message.

One choice I would make again: the classifier that labels a reply (positive, meeting, neutral, negative) can fail. When it does, the sequence stops anyway. A wrong label costs a re-read. A wrong follow-up costs the relationship.

Problem 3: the reply that is not a reply

"I'm out of the office until the 3rd."

Count that as an answer and you stop the sequence, then miss the real reply when they are back. Worse in our case: we keep one reply per send, so the out-of-office would take the slot of the real answer.

So automatic replies are filtered before the model sees them, with keyword rules in French and English. The detail that took a second pass: the subject rule is anchored at the start. Auto-replies prefix the original subject ("Automatic reply: ..."). A human writing "Re: your question about absence management" must not be filtered, and an unanchored regex happily filters them.

What we still cannot see

A brand new email, outside the thread, from another address. A phone call. A reply in person. Nothing links those to your message, and no tool can guess a conversation it never saw. If a vendor promises otherwise, ask how.

A three-minute test for any tool

  1. Start a test sequence to two or three of your own addresses.
  2. Reply to the first from your phone, with a different subject.
  3. Reply to the second with an out-of-office.
  4. The first sequence must stop. The second must keep going.

If the second one stops, your tool thinks a holiday is a "no."

What is the worst follow-up you have received after saying no?


I work on Phantera, B2B prospecting that stops the moment a prospect replies.

Top comments (0)