Home / Guides / Safe bulk cleanup

Planning a safe bulk tag cleanup

A cleanup of a few dozen tags is a checklist. A cleanup of hundreds is a change management problem: the order of operations decides whether you break a live trigger at step 3 or at step 30. This is the sequence we recommend.

Updated 30 September 2026 · ~9 min read

Prerequisites: the two tables you need before any change

A bulk cleanup stands or falls on two artifacts, both point-in-time:

  1. The inventory — every tag with ticket count, closed-ticket share, last use (method: auditing Zendesk ticket tags).
  2. The reverse index — every rule, field value and organization tag that references every tag you plan to touch (method: tags referenced by triggers, views and macros).

If either table was built more than a few weeks ago, re-scan before executing. Agents keep tagging, and a stale table is a plan built on a yesterday that no longer exists.

Step 1 — Decide the end state, not the operations

Start from the target taxonomy: what should exist afterwards? For each current tag, assign exactly one of:

  • Keep — unchanged (referenced, recently used, or both).
  • Rename — kept meaning, new spelling (the canonical form of its duplicate cluster).
  • Merge into — same meaning as another tag; its tickets move to the canonical tag.
  • Delete — stale and unreferenced, no meaning worth keeping.

Two sanity checks before you go further: no two tags may rename into the same spelling, and a merge must not create a collision with a tag that is kept. Both are the kind of error that is trivial to catch on paper and expensive to discover mid-run.

Step 2 — Check Zendesk constraints before you run, not while you run

Every target spelling you invent must pass Zendesk's tag rules, and every operation has constraints of its own. The classic rejections:

  • Length. Zendesk documents a 5,096-character limit for the ticket Tags field. Validate the final target spelling through the same interface you will use to apply it; the current tag formatting guidance explains the accepted characters and field limit.
  • Characters. Tags must be valid per Zendesk's tag format; special characters that look harmless in a spreadsheet are not. Check every target spelling, not just the source tags, since rename targets are the ones you typed.
  • Collisions. A rename or merge target that already exists is a collision, not a merge — decide explicitly which one wins.

The point of a preview: the failures above should surface as a list before anything is written — "these N operations will run, these M are rejected, for these reasons" — so the operator fixes the plan, not the damage. If your tooling does not give you that preview, do it manually: run the constraint check over your operation list and treat rejections as plan edits, not runtime noise.

Step 3 — Order the operations so every step is valid

This is the part that separates a safe bulk change from a long incident. The ordering principle: after each step, every rule in the instance must still be satisfiable — no rule may point at a tag that no longer exists, and no two different meanings may share a spelling.

A sequence that holds that property:

  1. Renames first. A rename changes a spelling without destroying a meaning, so no rule can be left dangling by it alone (as long as you update the rules that name the old spelling in the same step — see below).
  2. Rule updates in the same batch as their rename. If a trigger, automation, macro, view or SLA policy names the old spelling, update it together with the rename. Do not split "rename the tags" and "fix the rules" into two days: the gap between them is when tickets get misrouted.
  3. Merges next. Once the canonical spellings exist and are current, move the tickets of each source tag to its target. A merge is a rename-with-collision: the source tag becomes empty (or a duplicate of the target) and can then be deleted.
  4. Deletions last. Only after the renames and merges have landed — and the reverse index has been re-checked — delete the empty or stale tags. A delete of a tag that still has references is a rule change in disguise; the re-check catches exactly that.

One subtlety: negative conditions. A rule that says "tag is not X" does not break when X disappears — it silently changes meaning (it now matches everything). If your cleanup deletes tags that appear in negative conditions, treat those rules as separate, manual decisions, and document what the rule does before and after.

Step 4 — Batch by risk, not by size

Group operations into batches where each batch is independently reviewable and recoverable:

  • Batch A: zero-risk. Deletes of stale, unreferenced tags. No rule names them; nothing can break. Run this first — it clears the long tail and builds confidence.
  • Batch B: renames within duplicate clusters. Typo/case/separator variants collapsed to the canonical spelling, with their (few) rule updates. Bounded blast radius: only tickets carrying the variant spelling change.
  • Batch C: merges into kept tags. Bigger ticket counts, meaning-level decisions. These are the batches where a wrong clustering decision hurts real reporting — keep them small enough to review.
  • Batch D: anything referenced by many rules. One operation, one review, one go/no-go. If a tag sits in a trigger, a view, a macro and an SLA policy, its rename is a change with four dependencies — it deserves its own batch.

Between batches: re-run the reverse index. The index after Batch B should show the old variant spellings with zero references; if it does not, stop and read why before Batch C.

Step 5 — Rollback, or rather: forward-fix

Be honest about what "rollback" means for ticket tags. Renaming tags on thousands of tickets is a mass data change; the practical rollback is not "undo" but "the inverse operation", and it has the same cost. That is why the expensive quality work happens before the run: the constraint preview, the reference re-checks, the small batches.

  • Keep the operation log. Every batch is a list of (tag, operation, count). The inverse list is your rollback, and it is only useful if you kept the forward one.
  • Freeze new tagging on the affected spellings while you work — an announcement to agents beats a race condition. During a multi-day campaign, new uses of the old spellings are a re-dirtier that your next batch will have to absorb.
  • Re-scan at the end. The final state is: no tag in the plan remains, no rule references a deleted tag, and the duplicate clusters are gone. Anything that fails that check is a follow-up ticket, not a shrug.

What a healthy cleanup looks like

  • A dated inventory and reverse index, both covering the whole campaign scope.
  • An end-state table (keep / rename / merge / delete) with one row per tag, no collisions.
  • A constraint check with all rejections resolved before execution.
  • Batches ordered zero-risk → renames → merges → deletions, with rule updates attached to their renames.
  • Re-index between batches and a final re-scan that proves the end state.

Doing this in the app: Tag Janitor gives you the inventory, the reverse index and the preview in one place inside your instance: bulk rename/merge/delete runs behind a dialog that names what will change and which operations Zendesk will reject — constraints like tag length and invalid characters — before anything is sent. Nothing leaves your Zendesk instance. Get the app · how it works.