Template · Support
Support SLA triage
Flag tickets that have breached their response target by plan, and list the breaches first.
Steps
- 1
If / else 5→5
sla_hours = plan equals starter ? "48" : "4"
- 2
Calculate 5→5
hours_over = opened_hours - sla_hours
- 3
If / else 5→5
breached = hours_over > 0 ? "yes" : "no"
- 4
Sort 5→5
By hours_over descending
- 5
Keep fields 5→5
Keep id, subject, plan, priority, opened_hours, sla_hours, hours_over, breached
OUTPUT ON SAMPLE DATA · 5 ITEMS
[
{
"id": 8816,
"subject": "Webhook retries flooding our endpoint",
"plan": "business",
"priority": "high",
"opened_hours": 26,
"sla_hours": "4",
"hours_over": 22,
"breached": "yes"
},
{
"id": 8815,
"subject": "Feature request: dark mode",
"plan": "starter",
"priority": "low",
"opened_hours": 52,
"sla_hours": "48",
"hours_over": 4,
"breached": "yes"
},
{
"id": 8812,
"subject": "Cannot log in after password reset",
"plan": "business",
"priority": "high",
"opened_hours": 7,
"sla_hours": "4",
"hours_over": 3,
"breached": "yes"
},
{
"id": 8814,
"subject": "API returning 500 on /v2/export",
"plan": "enterprise",
"priority": "urgent",
"opened_hours": 2,
"sla_hours": "4",
"hours_over": -2,
"breached": "no"
}
]