Skip to content
Proud to collaborate with Microsoft for Startups

data.commerce.entity.persist ​

Idempotent upsert into commerce_entity. Restores soft-deleted rows. Keyed by (cloud_connection_uuid, provider, entity_type, external_ref).

Upsert one commerce_entity row by (connection, provider, type, external_ref).

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-commerce
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Org that owns the connection — soft ref, no FK
cloud_connection_uuiduuidYes—Connection the entity was fetched through
providerstringYes—Provider name (bling, conta_azul, tiny, ...)
entity_typestringYes—product
external_refstringYes—Provider-side reference (stringified)
rawjsonYes—Full LTIP contract dump (model_dump(mode='json'))
namestringNo—Hot field — entity display name when present
statusstringNo—Hot field — entity status (active, cancelled, etc.)
provider_updated_atstringNo—ISO-8601 — provider's last-modified for incremental sync
last_synced_by_workflow_uuidstringNo—workflow UUID of the caller for audit
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Org that owns the connection — soft ref, no FK
cloud_connection_uuiduuidYes—Connection the entity was fetched through
providerstringYes—Provider name (bling, conta_azul, tiny, ...)
entity_typestringYes—product
external_refstringYes—Provider-side reference (stringified)
rawjsonYes—Full LTIP contract dump (model_dump(mode='json'))
namestringNo—Hot field — entity display name when present
statusstringNo—Hot field — entity status (active, cancelled, etc.)
provider_updated_atstringNo—ISO-8601 — provider's last-modified for incremental sync
last_synced_by_workflow_uuidstringNo—workflow UUID of the caller for audit
actorstringNo——
commerce_entity_uuiduuidYes—Public UUID of the persisted commerce_entity row
createdbooleanYes—True when a row was inserted; False when updated
restoredbooleanYes—True when a soft-deleted row was reactivated
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 commerce_entity row
completedNoYesYes—Upsert succeeded
failedNoYesNo—Upsert failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

API Usage ​

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

{
  "workflow_type": "data.commerce.entity.persist",
  "initial_data": {
    "organization_uuid": "value",
    "cloud_connection_uuid": "value",
    "provider": "value",
    "entity_type": "value"
  }
}