All insights

Every tag needs an expiry date

Removing a tag is a write operation with exceptions, a safety catch and a rollback. Adding one is a single step. That asymmetry is why segments rot.

A client's mailing system marks everyone in a twelve-month programme with a membership tag. The purchase flow sets it. The onboarding journey uses it. Nothing ever takes it off. When I counted, just under half of the people carrying the tag had started more than twelve months ago. Every mail aimed at current members had been going to alumni as well, for as long as anyone could tell. Nobody had made a mistake. The system had simply been built with a way in and no way out.

A way in and no way out

Tags are the cheapest state a mailing system has. Any form, purchase, import or journey step can set one, and each of those steps was built by someone solving a specific problem that day. Removing a tag belongs to nobody. It is not part of any single flow, so it is not part of any flow.

In this case the onboarding journey did clean up after itself at the end, but only its own control tags. The membership tag that people are segmented by was left alone, because it was never the journey's to remove. After a year of normal operation the segment still looked healthy. It just described a different group than its name.

The drift shows up late and indirectly. Open rates on member mails sink a little, because a growing share of recipients no longer care. Someone asks why a former participant got an invitation meant for the current cohort. By then the tag has been wrong for months.

A tag without an end date turns into a history of everyone who was ever in the group.

Fix it next to the flow, not inside it

The obvious fix is a final step in the onboarding journey that removes the tag. I did not do it there. Changing a live journey in this platform is risky: pausing it does not stop the waiting steps, and a journey edit is hard to verify for contacts who are already halfway through. It also would not help the people who had left the journey long ago.

So the removal became its own small daily job. It reads the programme start date from each contact, and when that date is more than twelve months back, it removes the membership tag and sets a separate marker saying the membership expired. The rule lives in one place, runs every morning and can be switched off without touching anything customers are moving through.

Removal has exceptions, and exceptions fail

One partner group has a longer programme under a separate agreement, eighteen months. Those contacts have to be excluded. The job loads the list of exceptions first and skips everyone on it.

That exclusion is also the most dangerous part of the job. If the exception list comes back empty because an interface had a bad moment, the job would read that as "no exceptions" and strip the tag from the very people it was meant to protect. An empty list and a failed load look the same unless you check. So the job only proceeds when the exception list actually loaded a plausible number of contacts. If it did not, it stops and does nothing.

A related trap turned up during testing. The platform reports a total count for a segment, and after tag changes that count lagged well behind reality, in one check by more than a sixth. A reported total is not proof that you have everyone. The job counts the IDs it actually received.

Read-only first, with a way back

Before the first write, the job ran once in read-only mode. The number of contacts it would have changed matched my offline calculation exactly. Only then did it run for real, once, by hand.

Two more things made that first run safe. The marker tag is the rollback: every contact the job touched carries it, so the change can be found and reversed as a set. And before introducing a new tag at all, I checked that nothing in the account reacts to it. Every journey, segment, webhook and automation that listens for tags was searched. A new tag is a new input to every one of them, and one that fires a welcome sequence at a former member would have turned a cleanup into an incident.

What I set up with every tag now

  • Every state tag gets an owner and an end condition when it is introduced, not when the segment starts to look wrong.
  • Removal runs as its own job, separate from the customer-facing flow, so it can be changed and paused safely.
  • Exceptions are loaded first, and the job stops when the exception list is empty or implausibly small.
  • Counts come from the records actually loaded, never from the platform's reported total.
  • A marker tag records every change the job makes, which is the rollback.
  • Before adding any new tag, check which automations listen for it.
Key

Setting a tag is one step. Removing it needs an owner, a rule, a safety catch and a way back, which is why nobody builds it until the segment has already drifted.

Hung Mai

Hung Mai is an independent consultant in Weilmünster, Germany, mostly working remotely. He plans, builds and monitors AI automation for marketing and sales for companies without a digital team. About Hung Mai

Let's build something real.

Let's talkResponse within 24h.