Skip to content
Proud to collaborate with Microsoft for Startups

sap.ingest-page ​

Persist one externally-pushed page of normalized SAP records into commerce_entity

Persist one externally-pushed page of normalized SAP records.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-sap
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID injected by the workflow boundary
connection_uuiduuidYes—Organization-scoped SAP CloudConnection UUID
workflow_run_idstringNo—Engine-stamped parent DAG run id
entity_typestringYes—Which SAP entity this page carries: invoice, journal_entry, party, payable, receivable, supplier_invoice
itemslistYes—Normalized SAP rows, each carrying the identity field for its entity_type. At most 500 per page.
source_refstringNo—Free-form provenance for the pusher, e.g. a CPI iFlow name. Recorded on the run for audit; never interpreted.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID injected by the workflow boundary
connection_uuiduuidYes—Organization-scoped SAP CloudConnection UUID
workflow_run_idstringNo—Engine-stamped parent DAG run id
entity_typestringYes—Which SAP entity this page carries: invoice, journal_entry, party, payable, receivable, supplier_invoice
itemslistYes—Normalized SAP rows, each carrying the identity field for its entity_type. At most 500 per page.
source_refstringNo—Free-form provenance for the pusher, e.g. a CPI iFlow name. Recorded on the run for audit; never interpreted.
sap_environmentstringNo—Which SAP data set the records came from: 'sandbox' (Business Accelerator Hub canned data) or 'live'. Sourced from the connection, never from caller input. Persisted evidence must be partitioned by this value.
item_countintegerYes—Rows received on this page
persisted_countintegerYes—Rows durably written
created_countintegerYes—Rows that did not exist before
updated_countintegerYes—Rows that already existed and were refreshed
restored_countintegerYes—Soft-deleted rows brought back
rejected_countintegerYes—Rows the persistence layer refused
ingested_atstringYes—UTC ISO-8601 completion stamp
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_stepjsonNo——
failed_layerintegerNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——
provider_request_refstringNo——
retryablebooleanNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—execute—
executingNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
initiatedexecuteexecuting—
executingcompletecompleted—
* (any state)failfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
ingestedSUCCESSThe pushed page was persisted into commerce_entityitem_count, persisted_count, rejected_count, sap_environment
failedFAILUREThe ingest failedfailure_reason, failure_type, retryable

Business Errors ​

CodeMessage Template
SAP_ORGANIZATION_CONTEXT_INVALIDAuthenticated organization context is missing or does not match the workflow input
SAP_CONNECTION_NOT_FOUNDSAP connection {connection_uuid} was not found in the authenticated organization
SAP_CONNECTION_WRONG_PROVIDERConnection {connection_uuid} is not a SAP connection
SAP_CONNECTION_SERVICE_UNAVAILABLEThe shared cloud connection service is unavailable
SAP_ENVIRONMENT_INVALIDThe connection's SAP environment must be exactly 'sandbox' or 'live'
SAP_INGEST_ENTITY_TYPE_INVALIDentity_type must be one of the SAP entity types this library persists
SAP_INGEST_PAYLOAD_INVALIDitems must be a non-empty list of objects within the page bound
SAP_INGEST_ITEM_REF_MISSINGevery pushed item must carry a non-empty identity field for its entity_type
SAP_SYNC_PERSIST_FAILEDSAP sync persist-batch failed:

API Usage ​

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

{
  "workflow_type": "sap.ingest-page",
  "initial_data": {
    "organization_uuid": "value",
    "connection_uuid": "value",
    "entity_type": "value",
    "items": "value"
  }
}