{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-subflow-xero-draft",
  "title": "Xero Prepare Draft Sales Invoice",
  "section": "Library asset reference",
  "description": "Prepare a DRAFT ACCREC sales invoice from an existing contact UUID, a typed invoice line and optional further lines/date/reference/currency. Account and regional tax choices belong to the caller. This does not create or authorize an invoice",
  "kind": "node",
  "url": "/wiki/reference-subflow-xero-draft/",
  "markdown": "/wiki/reference-subflow-xero-draft/index.md",
  "json": "/wiki/reference-subflow-xero-draft/index.json",
  "headings": [
    {
      "id": "audited-socket-contract-21-october-2026",
      "title": "Audited socket contract (21 October 2026)",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../OpenNodeFlow-Library/work/catalog-all.mjs",
    "../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs",
    "../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs",
    "shared/seed.ts",
    "shared/storage-library.ts",
    "shared/variable-library.ts",
    "shared/control-flow.ts",
    "shared/remote-routes.ts",
    "server/runtime-library.ts",
    "shared/error-library.ts",
    "shared/storage-model.ts",
    "shared/builtin-documentation.ts"
  ],
  "family": "subflows",
  "contract": {
    "key": "subflow.xero.draft",
    "slug": "subflow-xero-draft",
    "name": "Xero Prepare Draft Sales Invoice",
    "kind": "node",
    "family": "subflows",
    "packId": null,
    "category": "Subflows",
    "description": "Prepare a DRAFT ACCREC sales invoice from an existing contact UUID, a typed invoice line and optional further lines/date/reference/currency. Account and regional tax choices belong to the caller. This does not create or authorize an invoice.",
    "inputs": [
      {
        "id": "exec",
        "name": "exec",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "contactId",
        "name": "contact Id",
        "type": "string",
        "typeName": "Text",
        "required": true
      },
      {
        "id": "line",
        "name": "line",
        "type": "@xero.line",
        "typeName": "Xero Invoice Line",
        "typeKey": "xero.line",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "moreLines",
        "name": "more Lines",
        "type": "@xero.lines",
        "typeName": "Xero Invoice Lines",
        "typeKey": "xero.lines",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "date",
        "name": "date",
        "type": "string",
        "typeName": "Text",
        "required": false
      },
      {
        "id": "dueDate",
        "name": "due Date",
        "type": "string",
        "typeName": "Text",
        "required": false
      },
      {
        "id": "reference",
        "name": "reference",
        "type": "string",
        "typeName": "Text",
        "required": false
      },
      {
        "id": "currencyCode",
        "name": "currency Code",
        "type": "string",
        "typeName": "Text",
        "required": false
      }
    ],
    "outputs": [
      {
        "id": "invoice",
        "name": "invoice",
        "type": "@xero.invoiceDraft",
        "typeName": "Xero Draft Invoice Write",
        "typeKey": "xero.invoiceDraft",
        "typeVersion": 1,
        "required": true
      },
      {
        "id": "next",
        "name": "next",
        "type": "control",
        "typeName": "Control",
        "required": false
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    },
    "documentation": "Prepare a DRAFT ACCREC sales invoice from an existing contact UUID, a typed invoice line and optional further lines/date/reference/currency. Account and regional tax choices belong to the caller. This does not create or authorize an invoice.\n\nPure reusable typed composition; no provider request, publication, accounting change or persistent state. Inner assets and custom sockets are pinned to immutable versions. Input mappings fan control into independent builders; output next waits for the internal composition. Optional inputs retain absence and documented builder defaults. Configure or inspect the inner graph through Subflows; publishing a later version does not upgrade existing instances. See the disabled integration examples for synthetic input.\n\n## Audited socket contract (21 October 2026)\n\nInputs:\n- `contactId`: `string`; required.\n- `line`: `@xero.line`; optional (absent stays absent).\n- `moreLines`: `@xero.lines`; optional (absent stays absent).\n- `date`: `string`; optional (absent stays absent).\n- `dueDate`: `string`; optional (absent stays absent).\n- `reference`: `string`; optional (absent stays absent).\n- `currencyCode`: `string`; optional (absent stays absent).\n\nOutputs:\n- `invoice`: `@xero.invoiceDraft`; required.\n\nConfiguration:\nNo asset-specific configuration.\n\nKnown provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.",
    "tags": [
      "library-expansion",
      "subflow",
      "pure",
      "xero"
    ],
    "source": "baseline-catalog"
  }
}
