1. Objective
Build a platform-agnostic support automation architecture around three connected workflows:
- High-priority ticket SMS escalation
- AI ticket sentiment tagging
- 48-hour SLA breach alert
The system should help support teams identify risky tickets earlier, prioritize critical customer situations, and prevent unresolved tickets from silently exceeding service expectations.
The architecture should work independently of the specific CRM, helpdesk, ticketing platform, SMS provider, AI provider, or communication tool. The implementation should rely on standardized states and business logic rather than platform-specific features.
2. Core system architecture
SUPPORT TICKET
|
v
[VALIDATE]
|
v
[LOOKUP/FETCH] Customer + Ticket Context
|
v
[AI ANALYSIS]
|
v
Sentiment + Risk Signals
|
v
[ROUTER] Priority / Sentiment / SLA
|
+----------------------+
| | |
v v v
HIGH PRIORITY NEGATIVE SLA WATCH
| SENTIMENT |
| | 48-HOUR TIMER
v v |
SMS ESCALATION Owner Alert |
| SLA BREACH
| |
+---------+------------+
|
v
[VERIFY]
|
v
[AUDIT]
The important rule: alerts should only be triggered after confirming the ticket still requires action. A ticket that has already been resolved should never continue generating SLA or escalation alerts.
3. Shared ticket data model
Every workflow should operate against a standardized ticket object.
| Field | Purpose |
|---|---|
ticket_id | Stable ticket identifier |
customer_id | Customer or account reference |
customer_name | Display name |
customer_email | Contact email |
customer_phone | Contact phone (for SMS escalation) |
ticket_subject | Short summary of the issue |
ticket_description | Full problem description |
ticket_channel | Email, chat, phone, portal, social |
ticket_status | Lifecycle state (see below) |
ticket_priority | Manually selected priority |
calculated_escalation_priority | Computed priority (does not overwrite the original) |
support_owner | Assigned agent or queue |
support_team | Owning team |
created_at | Ticket creation timestamp |
first_response_at | First agent response |
last_customer_message_at | Most recent customer activity |
last_agent_response_at | Most recent agent activity |
resolved_at | Resolution timestamp |
sentiment | Latest sentiment classification |
sentiment_score | Model confidence (0–1) |
sentiment_reason | Short explanation from the classifier |
sla_target | Configured SLA duration (e.g. 48h) |
sla_started_at | When the SLA clock started |
sla_deadline | sla_started_at + SLA target |
sla_status | NORMAL / AT_RISK / CRITICAL / BREACHED |
escalation_level | NONE → OWNER_ALERTED → ... → CRITICAL_ESCALATION |
last_escalated_at | Timestamp of the last escalation action |
escalation_reason | Why the escalation was triggered |
manual_review_required | Flag for human review |
workflow_version | Version of the automation that last touched the ticket |
updated_at | Last metadata update |
4. Ticket lifecycle states
Use standardized states regardless of helpdesk platform:
NEW → OPEN → IN_PROGRESS → WAITING_CUSTOMER → WAITING_INTERNAL → ESCALATED → RESOLVED → CLOSED
Additional system states:
SLA_AT_RISKSLA_BREACHEDESCALATION_PENDINGESCALATED_LEVEL_1ESCALATED_LEVEL_2MANUAL_REVIEW
5. Priority model
Priority should not necessarily depend only on the manually selected ticket priority.
P1 — Critical
Examples: complete service outage; payment/service failure affecting operations; security-sensitive incident; strategic/VIP customer issue; repeated unresolved critical failure.
Target response: immediate escalation.
P2 — High
Examples: major functionality unavailable; serious customer impact; blocked workflow; multiple users affected; strongly negative sentiment combined with an unresolved issue.
Target response: rapid escalation.
P3 — Normal
Standard support request.
P4 — Low
Questions, informational requests, low-impact issues.
6. Dynamic priority inputs
Priority can be calculated using multiple signals:
MANUAL PRIORITY + CUSTOMER TIER + ISSUE TYPE + SENTIMENT + TICKET AGE + REOPEN COUNT + BUSINESS IMPACT
Example:
Customer Tier = Strategic
Current Priority = P2
Sentiment = Highly Negative
Ticket Reopened = 2x
→ Escalation Priority = P1
This should not necessarily overwrite the original ticket priority. Store both ticket_priority and calculated_escalation_priority.
BLUEPRINT 1 — HIGH-PRIORITY TICKET SMS ESCALATION
7. Trigger
Possible triggers:
[TRIGGER] Ticket Created
or:
[TRIGGER] Ticket Updated
or:
[TRIGGER] Priority Changed
8. Fetch complete ticket context
[FETCH] Get Ticket
Retrieve: status, priority, owner, customer, ticket history, current message, timestamps, and escalation history.
9. Customer lookup
[LOOKUP] Find Customer Record
Use: customer ID, email, account ID, or company domain.
Possible states:
CUSTOMER_FOUND
CUSTOMER_MISSING
CUSTOMER_AMBIGUOUS
10. Missing customer edge case
If the customer record cannot be resolved, do not block critical escalation entirely.
[FILTER] Customer Record Missing?
If yes:
[ACTION] Flag CUSTOMER_LOOKUP_FAILED
Continue using ticket-level information if priority is P1 or another critical condition exists. Notify support operations to resolve the customer mapping.
11. Determine effective priority
[ROUTER] Priority
Routes:
| Priority | Route |
|---|---|
| P1 | Immediate escalation |
| P2 | High priority workflow |
| P3 | Standard support |
| P4 | Standard support |
12. Verify the ticket is still active
Before SMS:
[FILTER] Ticket Status != RESOLVED AND Ticket Status != CLOSED
If already resolved:
STOP
[AUDIT: ESCALATION_SKIPPED_RESOLVED]
This prevents delayed workflow executions from alerting people about completed tickets.
13. Resolve support owner
[LOOKUP] Find Support Owner
Check: direct ticket owner, queue owner, team lead, and fallback escalation manager.
14. Missing support owner
If support_owner = null, route to:
[FALLBACK] Support Team Lead
If the team lead is unavailable:
[FALLBACK] Duty Manager / Escalation Queue
Never silently drop the escalation.
15. Prevent duplicate SMS escalation
Before sending:
[LOOKUP] Previous Escalation
Check: ticket_id, escalation_type, escalation_level, last_escalated_at.
Then:
[FILTER] Already Escalated Within Cooldown?
Example cooldown: 30 minutes. If yes: SKIP_SMS, unless the escalation level has increased.
16. SMS escalation logic
Example:
IF Priority = P1
→ SMS immediately
IF Priority = P2 AND Sentiment = Highly Negative
→ SMS immediately
IF Priority = P2 AND Ticket Age > Threshold
→ SMS
17. SMS message structure
Keep SMS short. Example:
P1 Support Escalation
Client: [Customer]
Ticket: #[ID]
Issue: [Short Subject]
Age: 3h 42m
Owner: [Name]
Action required. [Ticket Link]
Avoid sensitive customer information in SMS.
18. Escalation path
LEVEL 0 Support Owner
↓
LEVEL 1 Support Team Lead
↓
LEVEL 2 Support Manager
↓
LEVEL 3 Operations / Leadership
Each escalation level should have its own threshold. Example:
| Event | Recipient |
|---|---|
| P1 created | Owner immediately |
| Unacknowledged after 15 min | Team Lead |
| Unacknowledged after 30 min | Support Manager |
| Unacknowledged after 60 min | Operations |
All timings should be configurable.
19. Escalation acknowledgement
SMS delivery does not prove action occurred. Track:
escalation_sent_atescalation_acknowledged_atacknowledged_by
If supported:
[ACTION] Request Acknowledgement
If no acknowledgement arrives, increase the escalation level.
BLUEPRINT 2 — AI TICKET SENTIMENT TAGGING
20. Objective
Automatically classify the emotional tone and customer risk represented by incoming support messages.
The goal is not simply positive/negative. The useful output should help the support team decide whether attention is required.
21. Trigger
[TRIGGER] New Customer Message
Run sentiment classification whenever meaningful new customer text is received.
Avoid rerunning unnecessarily on: internal notes, automated system messages, agent replies, and status-only updates.
22. Fetch conversation context
[FETCH] Ticket Conversation
Recommended inputs:
- Current customer message
- Previous customer message
- Latest agent response
- Ticket subject
- Ticket age
- Reopen count
Do not necessarily send the entire historical conversation to the model. Use the most relevant context.
23. Sentiment categories
Recommended taxonomy:
POSITIVE
NEUTRAL
CONCERNED
NEGATIVE
HIGHLY_NEGATIVE
URGENT
Optional additional dimension:
customer_risk: LOW | MEDIUM | HIGH | CRITICAL
Sentiment and risk should remain separate.
Example:
Sentiment = Negative
Risk = Medium
versus:
Sentiment = Neutral
Risk = Critical
A customer reporting a production outage may sound calm while still representing a critical risk.
24. AI output schema
Require structured output.
{
"sentiment": "HIGHLY_NEGATIVE",
"sentiment_score": 0.91,
"risk_level": "HIGH",
"reason": "Customer reports repeated failure after multiple previous attempts.",
"signals": ["repeat issue", "strong dissatisfaction", "cancellation language"],
"manual_review_required": false
}
Avoid free-form output if possible.
25. Sentiment router
[ROUTER] Sentiment
| Sentiment | Action |
|---|---|
| Positive | Update tag. No escalation. |
| Neutral | Update tag. No escalation. |
| Concerned | Tag + monitor. |
| Negative | Notify owner if other risk factors exist. |
| Highly Negative | Notify owner. Potentially escalate. |
| Urgent | Route immediately into priority evaluation. |
26. Combine sentiment with operational signals
Never use sentiment alone to determine severity.
Example:
Highly Negative + Strategic Customer + Ticket Age > 24h → HIGH RISK
Another:
Highly Negative + New Ticket + Low-impact Question → Owner Notification but not necessarily SMS escalation
27. Cancellation / churn signals
Optionally identify phrases indicating: cancellation, refund request, contract termination, switching provider, legal escalation, or executive complaint.
Store these separately:
churn_signal = true
Do not hide them inside sentiment.
28. Sentiment confidence
Use:
HIGH | MEDIUM | LOW
If confidence = LOW and the classification would cause an escalation:
[ACTION] Manual Review
rather than automatically escalating based on uncertain AI output.
29. Store sentiment history
Do not only keep the latest sentiment. Maintain:
ticket_idsentimentrisk_levelclassified_atmessage_id
This allows trend detection. Example:
Neutral → Concerned → Negative → Highly Negative
The trajectory itself becomes a risk signal.
30. Sentiment deterioration alert
Optional rule:
[FILTER] Sentiment worsened by >= 2 levels?
Example: Neutral → Highly Negative.
Then:
[ACTION] Notify Support Owner
This can identify escalation before an SLA breach happens.
BLUEPRINT 3 — 48-HOUR SLA BREACH ALERT
31. Objective
Track unresolved support tickets and escalate when the defined SLA reaches 48 hours.
The SLA clock must be explicitly defined. Configurable options:
CALENDAR HOURS
BUSINESS HOURS
SUPPORT HOURS
Do not mix these definitions.
32. SLA start time
Possible starting event:
ticket_created_atfirst_customer_message_at
Store sla_started_at. Then calculate:
sla_deadline = sla_started_at + 48 hours
33. SLA pausing
Some support processes pause the timer when the ticket is WAITING_CUSTOMER. Others do not. Make this configurable.
Example:
sla_pause_states = [ WAITING_CUSTOMER ]
If no pause is supported, the timer continues.
34. SLA monitoring
Recommended schedule:
[SCHEDULE] Run SLA Monitor Every Hour
Then:
[FETCH] Open Tickets
Filter:
status != RESOLVED
status != CLOSED
35. Calculate ticket age
[TRANSFORM] Calculate SLA Age
Outputs: sla_elapsed, sla_remaining, sla_percentage, sla_status.
Example:
Elapsed: 41h
Remaining: 7h
SLA Used: 85%
Status: AT_RISK
36. Pre-breach warning
Do not wait until hour 48. Example:
36 HOURS → SLA WARNING
44 HOURS → SLA CRITICAL
48 HOURS → SLA BREACHED
These thresholds should be configurable.
37. SLA router
[ROUTER] SLA State
| Elapsed | State |
|---|---|
| < 36h | NORMAL |
| 36–44h | SLA_WARNING |
| 44–48h | SLA_CRITICAL |
| >= 48h | SLA_BREACHED |
38. SLA warning
At the first threshold:
- Notify the ticket owner.
- Set
sla_status = AT_RISK.
39. SLA critical
At the critical threshold:
- Notify the ticket owner.
- Notify the support lead.
- Set
sla_status = CRITICAL.
40. SLA breach
At 48 hours:
[ACTION] Create SLA Breach Alert
Notify:
- Ticket owner
- Support manager
- Configured escalation recipient
Set sla_status = BREACHED.
41. Prevent repeated SLA alerts
Without deduplication:
49h → alert
50h → alert
51h → alert
52h → alert
Do not do this. Track:
last_sla_alert_levellast_sla_alert_at
Then:
[FILTER] Has this SLA level already been sent?
If yes: skip, unless the escalation level increases.
42. Repeat breach escalation
Example:
48h → Breach Alert
60h → Breach Escalation Level 2
72h → Breach Escalation Level 3
This allows long-running unresolved issues to receive progressively greater attention.
43. Resolved tickets triggering SLA alerts
This is one of the most important safeguards. Immediately before any SLA notification:
[FETCH] Refresh Ticket Status
Then:
[FILTER] Status Still Open?
If RESOLVED or CLOSED, cancel the alert and audit:
SLA_ALERT_CANCELLED_RESOLVED
This avoids race conditions where the ticket was resolved after the SLA-monitoring job initially fetched it.
44. Combined risk engine
The three workflows become more valuable when connected. Create support_risk_score.
Potential inputs: priority, sentiment, customer tier, SLA usage, reopen count, ticket age, and previous escalations.
Example:
| Signal | Points |
|---|---|
| Priority P2 | +25 |
| Highly negative sentiment | +25 |
| Strategic customer | +20 |
| SLA > 80% | +20 |
| Reopened | +10 |
| Total risk score | 100 |
Then:
| Score | Risk level |
|---|---|
| 0–29 | LOW |
| 30–59 | MEDIUM |
| 60–79 | HIGH |
| 80–100 | CRITICAL |
Exact weighting should be configurable by organization.
45. Combined routing example
[ROUTER] Support Risk
| Risk | Action |
|---|---|
| LOW | Normal queue. |
| MEDIUM | Owner notification. |
| HIGH | Owner + Team Lead. |
| CRITICAL | SMS escalation + manager notification. |
This prevents each workflow from operating in isolation.
46. Master node architecture
01 [TRIGGER] Ticket Event
02 [FETCH] Ticket
03 [LOOKUP] Customer
04 [LOOKUP] Support Owner
05 [FILTER] Ticket Still Active?
06 [FETCH] Relevant Conversation
07 [ACTION] AI Sentiment Analysis
08 [TRANSFORM] Normalize Sentiment
09 [TRANSFORM] Calculate Priority
10 [TRANSFORM] Calculate SLA
11 [TRANSFORM] Calculate Risk
12 [ROUTER] Risk / Priority / SLA
13 [LOOKUP] Previous Escalation
14 [FILTER] Duplicate Escalation?
15 [ACTION] Notify Owner
16 [ACTION] Send SMS
17 [ACTION] Escalate Manager
18 [VERIFY] Ticket Still Active
19 [ACTION] Update Ticket Metadata
20 [AUDIT] Record Workflow Event
47. SLA monitoring architecture
Separate scheduled workflow:
01 [SCHEDULE] SLA Monitor
02 [FETCH] Active Tickets
03 [FILTER] SLA Applicable?
04 [TRANSFORM] Calculate SLA Age
05 [ROUTER] Normal / Warning / Critical / Breached
06 [LOOKUP] Previous Alert
07 [FILTER] Already Alerted?
08 [FETCH] Refresh Ticket
09 [FILTER] Still Open?
10 [ACTION] Send Escalation
11 [ACTION] Update SLA State
12 [AUDIT] Record Alert
48. Sentiment workflow architecture
01 [TRIGGER] Customer Message
02 [LOOKUP] Ticket
03 [FETCH] Conversation Context
04 [FILTER] Customer Message?
05 [ACTION] AI Analysis
06 [VERIFY] Valid Structured Output?
07 [ROUTER] Sentiment Category
08 [ACTION] Update Sentiment
09 [FILTER] High Risk?
10 [ACTION] Notify Owner
11 [AUDIT] Record Classification
49. Escalation state model
NONE
↓
WATCH
↓
OWNER_ALERTED
↓
TEAM_LEAD_ALERTED
↓
MANAGER_ALERTED
↓
CRITICAL_ESCALATION
Every transition should be recorded.
50. Escalation record
Create a dedicated record:
escalation_idticket_idcustomer_idescalation_typeescalation_levelreasontriggered_atrecipientdelivery_statusacknowledged_atacknowledged_byworkflow_run_id
51. Important edge cases
Missing customer record
CUSTOMER_LOOKUP_FAILED — continue critical alerts using ticket information, but flag for manual correction.
Missing support owner
Fallback: team lead → support manager → escalation queue.
Repeated escalation
Check previous escalation before every notification. Use cooldown + escalation_level.
Resolved ticket still in queue
Refresh ticket state immediately before alert. Cancel if resolved.
Ticket reopened
Reset relevant monitoring state:
RESOLVED → REOPENED → SLA MONITORING ACTIVE
Do not blindly reuse the previous resolution state.
AI sentiment fails
Fallback:
sentiment = UNKNOWN
manual_review_required = true
Do not block normal support operations.
Invalid AI output
Retry once using structured-output validation. If still invalid: manual review.
SMS provider failure
Retry according to configured policy. Then route to the fallback notification channel. Status: SMS_DELIVERY_FAILED.
Missing phone number
Fallback to internal messaging, email, or escalation dashboard. Do not treat the escalation as successfully delivered.
Customer sends multiple messages
Debounce rapid message sequences before rerunning AI analysis where appropriate. Example: 30–60 second aggregation window. This prevents unnecessary model calls.
52. Vault architecture
Credentials must remain outside workflow logic.
Workflow
↓
[LOOKUP] Credential Vault
↓
Authorized Service
Possible credentials: ticketing API, CRM API, SMS provider, AI provider, email provider, internal messaging.
Never place API keys, tokens, passwords, or customer secrets inside workflow code, ticket comments, SMS messages, or audit logs.
53. Audit layer
Recommended event schema:
event_idticket_idcustomer_idevent_typeprevious_statenew_stateprioritysentimentsla_statusrisk_scoreescalation_levelrecipientresulterrorworkflow_versionworkflow_run_idcreated_at
54. Example audit events
TICKET_ANALYZED
SENTIMENT_CLASSIFIED
SENTIMENT_ESCALATED
SLA_WARNING
SLA_CRITICAL
SLA_BREACHED
SMS_ESCALATION_SENT
SMS_ESCALATION_FAILED
ESCALATION_SKIPPED_DUPLICATE
ESCALATION_SKIPPED_RESOLVED
OWNER_MISSING
CUSTOMER_LOOKUP_FAILED
55. Recommended dashboard
Priority
P1 · P2 · P3 · P4
Sentiment
Positive · Neutral · Concerned · Negative · Highly Negative · Urgent
SLA
Healthy · At Risk · Critical · Breached
Escalation
No Escalation · Owner · Team Lead · Manager · Critical
56. Useful support metrics
SLA
- Percentage of tickets resolved within SLA
- Tickets currently at risk
- SLA breach rate
- Average time before escalation
Sentiment
- Negative-ticket volume
- Sentiment deterioration
- Recovery from negative → neutral/positive
- High-risk sentiment by customer tier
Escalation
- P1 escalation volume
- Acknowledgement time
- Duplicate escalations prevented
- Unresolved escalations
- Escalation by owner/team
Operational
- Tickets without owners
- Customer records missing
- Failed notifications
- False-positive escalations
57. Final architecture
CUSTOMER MESSAGE
|
v
SUPPORT TICKET
|
v
[LOOKUP/FETCH] Customer + Ownership
|
+------+-------+
| |
v v
AI SENTIMENT SLA ENGINE
| |
SENTIMENT TAG TIME USED
| |
+------+-------+
|
v
PRIORITY ENGINE
|
v
RISK SCORE
|
v
[ROUTER]
|
+---------+---------+
| | |
v v v
NORMAL HIGH CRITICAL
| | |
Standard Owner SMS
Queue Alert Escalation
| | |
| v v
| Team Lead Manager
| | |
+----+----+---------+
|
v
[VERIFY]
|
Ticket Still Active?
|
/ \
NO YES
| |
v v
STOP NOTIFY
|
v
[AUDIT]
58. Core automation principle
The goal is not "send an SMS when a ticket is high priority."
The real system should answer:
- Is this ticket still open?
- How important is the issue?
- How is the customer reacting?
- How much SLA time remains?
- Who owns the response?
- Has this escalation already happened?
- Who should be notified next?
The result becomes a controlled support-risk system:
Ticket → Context → Sentiment → Priority → SLA → Risk → Escalation → Verification → Audit
rather than three isolated automations.
Blueprint spec sheet
| Field | Value |
|---|---|
| Document ID | SUPPORT-OPS-001 |
| Workflow ID | SUPPORT-ESCALATION-001 |
| Workflow Category | Support Operations |
| Workflow Type | Ticket Escalation + Sentiment + SLA Monitoring |
| Version | v1.0 |
| Status | Blueprint / Ready for Build |