[
  {
    "id": "straight-through",
    "name": "A clean invoice posts without a clerk",
    "inputs": {
      "documentUrl": "s3://inbox/inv-1.pdf"
    },
    "mocks": {
      "document-extract": {
        "outputs": {
          "fields": {
            "supplier": "Acme",
            "number": "A-17",
            "net": 100,
            "tax": 19,
            "gross": 119
          },
          "confidence": 0.97
        }
      },
      "erp-invoice-post": {
        "outputs": {
          "documentNumber": "5100000017"
        }
      }
    },
    "expect": {
      "path": [
        "validate-totals",
        "straight-through",
        "post-invoice",
        "invoice-posted"
      ],
      "variables": {
        "totalsValid": true,
        "erpDocument": "5100000017"
      }
    }
  },
  {
    "id": "totals-mismatch",
    "name": "Totals that do not add up go to a clerk",
    "inputs": {
      "documentUrl": "s3://inbox/inv-2.pdf"
    },
    "mocks": {
      "document-extract": {
        "outputs": {
          "fields": {
            "supplier": "Acme",
            "number": "A-18",
            "net": 100,
            "tax": 19,
            "gross": 191
          },
          "confidence": 0.95
        }
      },
      "userTask": {
        "outputs": {
          "verificationNote": "gross misread"
        }
      },
      "erp-invoice-post": {
        "outputs": {
          "documentNumber": "5100000018"
        }
      }
    },
    "expect": {
      "path": [
        "validate-totals",
        "verify-invoice",
        "post-invoice"
      ],
      "variables": {
        "totalsValid": false
      }
    }
  }
]
