# Ticket routing SOP

Version: 1.0  
Owner: Support operations  
Review cadence: Monthly and after roster, permission, skill, capacity, or queue changes

## Purpose

Assign one triaged ticket to one eligible owner and obtain acknowledgement. Routing consumes triage fields and must not reinterpret the request or relax a hard eligibility rule silently.

## Trigger and completion

- Start: `triage.completed`, `route.rejected`, `route.lease_expired`, or approved reroute event.
- Complete: an eligible owner acknowledges the lease, or a named fallback queue owns the exception.
- Idempotency key: `{ticket_id}:{triage_version}:{route_attempt}`.

## Required inputs

- Stable category, product, language, region, priority and entitlement
- Required permissions and required/optional skills
- Timestamped roster, availability and weighted capacity snapshot
- Current assignment state and SLA deadline
- Versioned ranking, lease and fallback policy

## Procedure

1. Reject incomplete or superseded triage records.
2. Build the roster from the authoritative source and remove candidates lacking permission, region, required language, required skill or current availability.
3. Record eliminated candidates by rule class without copying private roster detail into the ticket.
4. Read capacity once. If stale beyond policy, assign a queue rather than an individual.
5. Rank eligible candidates using published criteria: mandatory fit, continuity, capacity, oldest-last-assignment and deterministic tie-breaker.
6. Atomically create an assignment and time-bounded ownership lease.
7. Notify the selected owner with the acknowledgement deadline.
8. Owner accepts or rejects using a bounded reason code.
9. On expiry or rejection, re-read ticket and owner state, invalidate only the current lease and apply the configured fallback.
10. Close the route record after acknowledgement; expose the owner to SLA monitoring.

## Fallback policy

- Optional skill: wait for its configured timeout, record the relaxation, then rerank.
- Required skill: never relax automatically; send to specialist queue or duty lead.
- Stale capacity: queue ownership only.
- Missing acknowledgement: next eligible owner, then duty queue after attempt ceiling.
- Material ticket change: return to triage before rerouting.
- Repeated rejection: alert route-policy owner for taxonomy/roster review.

## Controls and measures

Use compare-and-set on assignment writes. Give every lease one active token. Track time to acknowledged ownership, no-eligible-candidate rate, lease expiry, rejection by code, reroutes within one hour, queue hops, capacity imbalance and queue-age percentiles by route-rule version.

## Audit record

Keep source triage version, candidate-set hash, hard filters, capacity snapshot time, rank result and reason, route-rule version, assignment response, lease, notifications, acknowledgement, rejection and fallbacks.

## Rollback

Disable individual assignment and route into transparent, staffed queues that preserve the same eligibility boundaries. Never roll back by sending restricted work to a general queue.
