Skip to content
Proud to collaborate with Microsoft for Startups

data.commerce.bank-line.persist-batch ​

Transactionally upsert one bounded page of bank statement lines

Idempotently upsert one bounded page of bank statement lines.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-commerce
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
providerstringYes—Source that produced the lines, e.g. 'ofx', 'csv', or a bank slug.
account_refstringYes—Opaque pseudonym for the account. NEVER a branch/account number: banking coordinates are customer data and are rejected.
data_environmentstringNoproduction'production' (default) or 'homologation'. Part of the row identity, so a sanitized statement never overwrites a real one.
cloud_connection_uuiduuidNo—Absent for a file import, which has no connection behind it.
statement_artifact_uuiduuidNo—The commerce_artifact this batch was extracted from, for provenance.
itemsjsonYes—Normalized lines: external_ref, posted_at, amount, and optional value_date, currency, balance_after, description, counterparty_ref, metadata.
imported_by_workflow_uuidstringNo——
max_itemsintegerNo500—

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
providerstringYes——
account_refstringYes——
data_environmentstringYes——
persisted_countintegerYes——
created_countintegerYes——
updated_countintegerYes——
rejected_countintegerYes——
resultslistYes——
rejected_itemslistYes——
net_amountstringYes——
persisted_atstringYes——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "data.commerce.bank-line.persist-batch",
  "initial_data": {
    "organization_uuid": "value",
    "provider": "value",
    "account_ref": "value",
    "items": "value"
  }
}