Ticket Center: auto-mark Urgent/Priority subjects as Urgent and email all collaborators
🔍 Problem Statement
As a support agent, I set ticket priority by hand and only see new tickets inside the Ticket Center, so urgent requests wait unnoticed.
💡 User Story
As a support agent, I want tickets whose subject contains "Urgent" or "Priority" marked Urgent on creation, so that they stand out without manual triage.
As a support team, I want every collaborator emailed when a new Urgent ticket arrives, with subject, description, sender and priority, so that we respond without watching the Ticket Center.
🎯 Definition of Done (DoD)
Given a new ticket from any source, when its subject contains the whole word "urgent" or "priority" in any case, then its priority is set to Urgent.
Given an agent picks a priority when creating a ticket in the dashboard, when the subject contains a keyword, then the agent's priority is kept.
Given a site admin in Ticket Center settings, when they turn urgent ticket emails on or off, then the setting is saved; it is off by default.
Given the setting is on, when a ticket is created as Urgent, by an agent or by the keyword rule, then each active collaborator on the site gets one email with subject, description, sender, priority and a ticket link.
Given the setting is on, when a ticket is created with any other priority or none, then no email is sent.
Given a collaborator who is deactivated or has not accepted their invitation, when an Urgent ticket is created, then they get no email.
Given a ticket with a linked customer or an inbound From address, when the email is sent, then the sender shows that name and email; otherwise it reads Unknown.
Given a collaborator replies to the alert email, when the reply arrives, then no new ticket is opened and nothing reaches the customer.
Given SendGrid re-delivers an inbound email that already opened an Urgent ticket, when it is processed, then no second alert email is sent.
Given the email to one collaborator fails, when an Urgent ticket is created, then the ticket is still created, the other collaborators still get theirs and the failure is reported to Sentry.
Given an API user, when they call GET or PATCH
v1/core/ticket-settings(proposed, modeled onv1/core/email-settings), then they can read and update the urgent ticket email setting.Given the keyword rule and the new endpoint, when they are released, then they are documented on docs.pelcro.com and covered by automated tests.
This change will impact the API and UI, specifically ticket creation (
InboundTicketFactory, PublisherTicketController@store), a queued collaborator email, Ticket Center settings and a newv1/core/ticket-settingsendpoint.This solution will include the following limitations: keywords fixed to "urgent" and "priority", not configurable per site; whole words only, so "urgently" and "prioritize" do not match; subjects such as "Low priority question" are also marked Urgent; the keyword rule runs on creation only, not on subject edits or replies; never overrides a priority already set; only tickets that are Urgent when created trigger an email, so raising a ticket to Urgent later does not; Voice AI tickets never trigger an email because they are created without a priority and with a generated subject; one site-wide setting, no per-collaborator opt-out or digest; ticket attachments are not included in the email; [decision: every Ticket Center site, or site 5781 only].
Log in to comment and vote
No comments yet
Be the first to share your thoughts.