Guides / Cookbooks
Cookbooks · Text · Beginner · about 5 min
Route support tickets
Pick the team, rate the urgency and spot a workaround request in one call, and route automatically only when the answer is confident.
When to use it
Any queue of short messages that needs a team and a priority. With text in
state, the request goes to the text engine, which also answerschoiceandscorequestions.The request
{ "model": "ora-fin1", "state": "Hi, since this morning every export to CSV from the reports page times out after about a minute. We have a board meeting tomorrow and need these numbers. Is there a workaround?", "questions": { "team": { "type": "choice", "instructions": "Which team should handle this?", "criteria": { "billing": "Charges, invoices, refunds", "technical": "Bugs, errors, timeouts, integrations", "account": "Login, users, permissions", "sales": "Plans and pricing" } }, "urgency": { "type": "score", "instructions": "How urgent is this?", "criteria": [ "Can wait", "This week", "Today", "Right now" ] }, "workaround": { "type": "yes_no", "instructions": "Is the customer asking for a workaround?" } } }Open this in the PlaygroundThe real response
{ "model": "ora-fin1", "answers": { "team": { "type": "choice", "choice": "technical", "confidence": 0.732, "probabilities": { "billing": 0.052, "technical": 0.799, "account": 0.102, "sales": 0.047 } }, "urgency": { "type": "score", "score": 2.188, "confidence": 0.802, "legend": [ "Can wait", "This week", "Today", "Right now" ], "probabilities": [ 0.002, 0.001, 0.804, 0.193 ] }, "workaround": { "type": "yes_no", "yes_no": 0.868 } }, "usage": { "input_tokens": 445, "output_tokens": 20 }, "version": "ora-text-0.2.0" }teamis technical with confidence 0.732.urgencyis 2.188 on a 0–3 scale (most of the probability on “Today”), andworkaroundis 0.868.The code
Requires curl 7.76+. Save as run.sh, then: bash run.shcurl -sS https://oramodel.com/v1/systemone \ -H "Authorization: Bearer $JEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "ora-fin1", "state": "Hi, since this morning every export to CSV from the reports page times out after about a minute. We have a board meeting tomorrow and need these numbers. Is there a workaround?", "questions": { "team": { "type": "choice", "instructions": "Which team should handle this?", "criteria": { "billing": "Charges, invoices, refunds", "technical": "Bugs, errors, timeouts, integrations", "account": "Login, users, permissions", "sales": "Plans and pricing" } }, "urgency": { "type": "score", "instructions": "How urgent is this?", "criteria": [ "Can wait", "This week", "Today", "Right now" ] }, "workaround": { "type": "yes_no", "instructions": "Is the customer asking for a workaround?" } } }'Act on it
a = data["answers"] if a["team"]["confidence"] >= 0.6: assign(ticket, team=a["team"]["choice"], priority=round(a["urgency"]["score"])) else: send_to_triage(ticket) # a person decides if a["workaround"]["yes_no"] >= 0.7: attach_known_workarounds(ticket)Variations
- Add descriptions and examples to the options when two teams are often confused.
- Send urgent ones to Slack with an action:
"when": "urgency >= 2.5".
Information, not investment advice. Every number on this page is a real response for the session shown; answers change with each session.
What's next
Create an account Open the Playground
Everything here also lives in the console, next to your keys and usage.