Order issue type

Tell what went wrong with an order: not received, damaged, wrong item, missing item, or a change request.

F@f

Problem

Order problems arrive as free text in chat, email and contact forms. Each kind needs a different next step, and an agent spends the first minutes of every conversation working out which one it is.

Goal

Name the kind of order problem so the right resolution flow starts, and leave mixed or unclear messages to a person.

Input / state

The customer's message and an order summary looked up in code.

message
The customer's message, unedited.
order
Order id, status, items and delivery date, from your order system.

Decision question

ChoiceQuestion key issue_type

What kind of problem with this order is the customer reporting?

Options

  • not_receivedThe order, or the whole parcel, has not arrived or cannot be found.
  • damaged_itemAn item arrived broken, cracked, dented, leaking or otherwise damaged.
  • wrong_itemA different product, size, colour or variant arrived than the one ordered.
  • missing_itemThe parcel arrived but one or more ordered items or parts are not in it.
  • change_or_cancelThe customer wants to change or cancel the order rather than report a problem with what arrived.

Allowed outcomes

Decided in your code from the answer and its confidence. Thresholds are yours to set and test.

  • Not receivedChoice is not_received and confidence meets your threshold.
  • Damaged itemChoice is damaged_item and confidence meets your threshold.
  • Wrong itemChoice is wrong_item and confidence meets your threshold.
  • Missing itemChoice is missing_item and confidence meets your threshold.
  • Change or cancelChoice is change_or_cancel and confidence meets your threshold.
  • Needs a personConfidence is below your threshold: probability is spread across options.

Example scenarios

Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.

Example state

{
  "order": {
    "items": [
      "Stoneware mug set (4)",
      "Bamboo tray"
    ],
    "status": "delivered",
    "order_id": "A-48213",
    "delivered_at": "2026-03-14"
  },
  "message": "Two of the four mugs arrived cracked, the box looked fine from outside."
}

Outcome

Illustrative
Damaged item

Choice is damaged_item and confidence meets your threshold.

Why

Items arrived broken; the parcel itself was delivered.

Using it well

  • Pass the order status from your system. "Delivered" plus "I never got it" reads very differently from "in transit" plus the same words.
  • Messages that report two problems at once usually come back with spread-out probability. Send them to a person instead of picking one.
  • Keep "missing item" and "not received" apart in the option text: one parcel arrived, the other didn't.

Request definition

POST https://api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": {
    "message": "<message>",
    "order": "<order>"
  },
  "questions": {
    "issue_type": {
      "type": "choice",
      "instructions": "What kind of problem with this order is the customer reporting?",
      "criteria": {
        "not_received": "The order, or the whole parcel, has not arrived or cannot be found.",
        "damaged_item": "An item arrived broken, cracked, dented, leaking or otherwise damaged.",
        "wrong_item": "A different product, size, colour or variant arrived than the one ordered.",
        "missing_item": "The parcel arrived but one or more ordered items or parts are not in it.",
        "change_or_cancel": "The customer wants to change or cancel the order rather than report a problem with what arrived."
      }
    }
  }
}

Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.

Version History

v1Current Versionabout 8 hours ago@f

Initial version

Comments (0)