{
  "id": 12549627,
  "title": "Modelling a Custom Jewellery Order as a State Machine (with Human Approval Gates)",
  "url": "https://urgent.news/2026/10/07/modelling-a-custom-jewellery-order-as-a-state-machine-with-human",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-07T05:02:13.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ujjwal_dubey_9/modelling-a-custom-jewellery-order-as-a-state-machine-with-human-approval-gates-3a6c"
  },
  "original_language": "en",
  "account": "Custom jewellery orders pose challenges for retail automation due to the state of the order and the human approvals required. This state machine outlines the progression of a custom jewellery order, with gates that require human approval before certain steps involving money or promises. The states in the machine include ENQUIRY, DESIGN_SHARED, DESIGN_APPROVED, ADVANCE_RECEIVED, IN_MAKING, READY_FOR_TRIAL, ALTERATION (optional), READY_FOR_PICKUP, and DELIVERED. Additionally, there are two side exits: DELAYED (needing a human message) and CANCELLED.\n\nThe rules governing the transitions between states require that every transition is made by a named staff member. Some transitions automatically trigger a customer message using an approved template, while others only draft a message that must be approved by a person before proceeding. The approvals apply to any message about price, balance due, or delay. The code utilizes dataclasses for the Order object, a dictionary for the transition rules, and defines two sets: AUTO_SEND for states that automatically send customer messages, and NEEDS_APPROVAL for states that require human approval. The Order class maintains a history of state transitions and allows for moving between states through the move method, which checks for valid transitions, updates the order's state and history, and formats customer messages for appropriate actions.",
  "summary": "Custom jewellery orders are a nice, small example of why \"add a chatbot\" is the wrong first move for retail automation. The real problem is state: the customer wants to know where their order is, and the answer lives in someone's head or a paper order book. This post shows a tiny state machine for a custom order, with approval gates on the steps that touch money or promises. It is the pattern we…",
  "key_points": [
    "Custom jewellery orders progress through defined states with human approval gates.",
    "States include ENQUIRY, DESIGNAPPROVED, INMAKING, READYFORPICKUP, and DELIVERED.",
    "Transitions require named staff member approval, with some triggering automated customer messages."
  ],
  "editors_take": "This state machine framework allows for structured progression of custom jewellery orders, integrating human approval gates to ensure accuracy and transparency in customer communications and financial transactions.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}