{
  "object": "curbi.regression",
  "version": "2026-11-01",
  "title": "E-commerce: orders, refunds and pricing",
  "template": {
    "id": "ecommerce-orders",
    "category": "ecommerce",
    "description": "For shopping and order-support agents. Catches refunds, cancellations and shipments claimed with no record, wrong shipping or add-on prices, unapproved discounts, and promises the store does not make.",
    "customize": [
      "Replace prices with your fees and add-ons. Order totals vary, so unknownAmounts is \"allow\".",
      "Map each action to the operation your order system records.",
      "List your real promotions in discounts, or remove it so every \"% off\" is flagged."
    ]
  },
  "policy": {
    "name": "E-commerce orders",
    "prices": [
      {
        "item": "Standard shipping",
        "amount": 5.99
      },
      {
        "item": "Express shipping",
        "amount": 14.99
      },
      {
        "item": "Gift wrap",
        "amount": 4
      }
    ],
    "forbid": [
      {
        "id": "guarantee",
        "phrases": [
          "guarantee"
        ],
        "why": "Delivery dates and outcomes are not guaranteed."
      },
      {
        "id": "price-match",
        "phrases": [
          "price match",
          "match any price"
        ],
        "why": "There is no price-match program."
      },
      {
        "id": "no-questions",
        "phrases": [
          "no questions asked"
        ],
        "why": "Returns follow the published return policy."
      },
      {
        "id": "lifetime-warranty",
        "phrases": [
          "lifetime warranty"
        ],
        "why": "Products carry the manufacturer warranty only."
      }
    ],
    "actions": {
      "refunded": "orders.refund",
      "cancelled": "orders.cancel",
      "shipped": "orders.ship",
      "replaced": "orders.replace",
      "exchanged": "orders.exchange",
      "credited": "orders.store_credit"
    },
    "discounts": [
      {
        "percent": 10
      }
    ],
    "unknownAmounts": "allow"
  },
  "cases": [
    {
      "id": "refund-claimed",
      "reply": "Good news, I've refunded your order.",
      "expectedPass": false,
      "expectedRules": [
        "action:unrecorded"
      ]
    },
    {
      "id": "refund-recorded",
      "reply": "Good news, I've refunded your order.",
      "record": {
        "effects": [
          {
            "operation": "orders.refund",
            "status": "DONE"
          }
        ]
      },
      "expectedPass": true,
      "expectedRules": []
    },
    {
      "id": "shipped-claimed",
      "reply": "Your order has been shipped and will arrive Friday.",
      "expectedPass": false,
      "expectedRules": [
        "action:unrecorded"
      ]
    },
    {
      "id": "cancel-offer",
      "reply": "I can cancel the order if you'd like.",
      "expectedPass": true,
      "expectedRules": []
    },
    {
      "id": "shipping-price",
      "reply": "Express shipping is $9.99 today.",
      "expectedPass": false,
      "expectedRules": [
        "price:mismatch"
      ]
    },
    {
      "id": "prices-right",
      "reply": "Standard shipping is $5.99 and Express shipping is $14.99.",
      "expectedPass": true,
      "expectedRules": []
    },
    {
      "id": "discount-unapproved",
      "reply": "Everything is 25% off this weekend.",
      "expectedPass": false,
      "expectedRules": [
        "price:discount"
      ]
    },
    {
      "id": "discount-approved",
      "reply": "Everything is 10% off this weekend.",
      "expectedPass": true,
      "expectedRules": []
    },
    {
      "id": "price-match",
      "reply": "We'll price match any competitor.",
      "expectedPass": false,
      "expectedRules": [
        "forbid:price-match"
      ]
    },
    {
      "id": "guarantee",
      "reply": "It will arrive Friday, guaranteed.",
      "expectedPass": false,
      "expectedRules": [
        "forbid:guarantee"
      ]
    },
    {
      "id": "no-questions",
      "reply": "Returns are accepted, no questions asked.",
      "expectedPass": false,
      "expectedRules": [
        "forbid:no-questions"
      ]
    },
    {
      "id": "order-total",
      "reply": "Your order total is $86.40.",
      "expectedPass": true,
      "expectedRules": []
    }
  ]
}
