# Support routing

> Send each support ticket to the right queue, act on the routes decisio can stand behind, and send only the rest to a person.

Source: https://opendecisio.com/docs/use-cases/support-routing/

This script asks for the queue and acts only on a [certified answer](https://opendecisio.com/docs/glossary/#certified-answer):

 

```
import json
import urllib.request

QUESTION = {
    "type": "choice",
    "instructions": "Which support queue should handle this ticket?",
    "criteria": {
        "billing": "Invoices, charges, refunds",
        "access": "Login, passwords, permissions",
        "bug": "The product behaves wrongly",
        "shipping": "Orders and deliveries",
        "other": "Anything else"
    }
}

def route(text):
    request = urllib.request.Request(
        "http://127.0.0.1:8000/v1/systemone",
        data=json.dumps({"state": text, "questions": {"queue": QUESTION}}).encode(),
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(request) as response:
        answer = json.load(response)["answers"]["queue"]
    # A certified answer acts on its own; anything else goes to a person.
    if answer.get("certified"):
        return f"send to {answer['choice']}"
    return f"to a person, {answer['choice']} suggested"

print(route("My card was charged twice this month. Please refund one of the charges."))
```

 

Run against the CPU stand-in at v0.18.1 on 2026-10-19. It printed:

```
to a person, billing suggested
```

 

Until the [task](https://opendecisio.com/docs/glossary/#task) is certified (step 2), every answer goes to a person, as on the stand-in.

 

Good fit

- A fixed list of queues your team already routes to.
- Past tickets with the queue a person chose, to teach and certify from.
- A person or a queue for what is left over.

Not a good fit

- Queues that change every week: each change makes a new task to teach.
- No labelled tickets to teach and certify from.

 

## 1 Write the question

 

One `choice` [question](https://opendecisio.com/docs/glossary/#question), with a description for each queue and an `other` queue, so a ticket that fits none of them is not forced into one.

 

## 2 Teach it and certify it

 

Teach the question from past tickets and ask for a certificate at your [error target](https://opendecisio.com/docs/glossary/#error-target), here 5%.

 

Send at least 118 labelled tickets. The server holds back half to certify, and a 5% certificate needs 59 of those. More examples certify a larger share.

 

```
POST /v1/tasks
{"id": "support-routing",
 "examples": [{"request": {"state": "&#x3C;a past item of yours>", "questions": {"queue": &#x3C;the question above>}},
               "answer": "billing"},
              ...],
 "certify": {"alpha": 0.05}}
```

 

A shape to fill in, not a command to run.

 

[Certify answers](https://opendecisio.com/docs/tasks/certify/#2-teach-the-task-with-a-certificate) runs this call on a server, with its answer.

 

## 3 Route on the certificate

 

- A certified answer goes to its queue on its own.
- Everything else goes to a person, with decisio’s suggestion beside it.
- When traffic moves away from the tickets you certified on, certification is suspended, so the shift goes to people instead of into the wrong queues ([Watch for drift](https://opendecisio.com/docs/tasks/drift/)).

 

## What it did

 

- **43.3%** of a support inbox's messages answered on their own at a 5% error target, 3.2% of them wrong: BANKING77's 77 intents, Gemma 4 31B taught with 10 examples per intent, 3,080 test messages.
- **97.0%** of 400 held-out tickets routed right over 20 queues by Gemma 4 31B with the plain question, and 97.2% after teaching it from 200 labelled tickets: decisio's triage demo.

The inbox: measured on decisio 0.14.0, one RTX PRO 6000 Blackwell, 2026-10-16.

The triage demo: measured on decisio v0.6.0, one RTX PRO 6000, 2026-10-05.

 

## What next

 

- [Certify answers](https://opendecisio.com/docs/tasks/certify/): the promise, and the slider on this same inbox.
- [Certified answers on real tasks](https://opendecisio.com/demos/teach-and-certify/): the inbox, message by message.
- [Use cases](https://opendecisio.com/docs/use-cases/): the other recipes.
