Fix issues with ticket closure when an outbound email is sent immediately before closing a ticket

When an agent sends an email from a ticket and immediately clicks Close, the ticket often reopens. The delayed email logging marks the ticket as requiring attention after the Close action, so the system reopens it. This creates repeat work for agents and downstream issues in routing, reporting, and SLAs.

Problem

  • Event timing: the Close action is processed first, but the subsequent email logging event arrives slightly later and reclassifies the ticket as active.
  • Result: agents must close the same ticket multiple times; reopened tickets can be treated as “newly active,” skewing skills-based and load‑balanced routing.
  • Knock‑ons: uneven workload distribution, noisy and inaccurate metrics, additional workload for team, complicated workaround developements in each area of the portal connected to tickets to automate the auto closure.