Skip to content
Proud to collaborate with Microsoft for Startups

data.commerce.sync-cursor.upsert ​

Idempotent upsert of a (connection, provider, entity_type) cursor row. Replaces last_synced_at; increments items_synced_total when the input carries it.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-commerce
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
cloud_connection_uuiduuidYes——
providerstringYes——
entity_typestringYes——
last_synced_atstringNo—ISO-8601. Becomes the since cursor for next run.
items_synced_totalintegerNo—Running total — incremented (not replaced) when provided
last_sync_workflow_uuidstringNo——
last_errorstringNo—On failed sync runs; cleared on success
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
cloud_connection_uuiduuidYes——
providerstringYes——
entity_typestringYes——
last_synced_atstringNo—ISO-8601. Becomes the since cursor for next run.
items_synced_totalintegerNo—Running total — incremented (not replaced) when provided
last_sync_workflow_uuidstringNo——
last_errorstringNo—On failed sync runs; cleared on success
actorstringNo——
sync_cursor_uuiduuidYes——
createdbooleanYes——
persisted_atstringYes——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—completeUpsert cursor
completedNoYesYes—Cursor written
failedNoYesNo—Cursor upsert failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

API Usage ​

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

{
  "workflow_type": "data.commerce.sync-cursor.upsert",
  "initial_data": {
    "cloud_connection_uuid": "value",
    "provider": "value",
    "entity_type": "value"
  }
}