Skip to content
Proud to collaborate with Microsoft for Startups

data.commerce.entity.persist-batch ​

Transactionally upsert one bounded page of provider-neutral commerce entities

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-commerce
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloud_connection_uuiduuidYes——
providerstringYes——
entity_typestringYes——
itemsjsonYes—List of item objects containing external_ref, raw, and optional name, status, provider_updated_at. With external_ref_field set, a provider's normalized rows are accepted as they come instead.
external_ref_fieldstringNo—Dotted path to the field already holding each item's identity, e.g. 'sale_ref'. Set it to persist a provider's normalized rows directly -- the item itself becomes raw. Exists because a saved composition cannot reshape a record: control.collection.map does unary transforms, not projection, so without this no sync composition could feed this workflow at all.
last_synced_by_workflow_uuidstringNo——
max_itemsintegerNo500—
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
persisted_countintegerYes——
created_countintegerYes——
updated_countintegerYes——
restored_countintegerYes——
rejected_countintegerYes——
resultslistYes——
rejected_itemslistYes——
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.entity.persist-batch",
  "initial_data": {
    "organization_uuid": "value",
    "cloud_connection_uuid": "value",
    "provider": "value",
    "entity_type": "value"
  }
}