data.commerce.artifact.persist ​
Persist safe metadata and an object reference for a generated artifact
Idempotently record one generated provider artifact.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-commerce |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | — |
provider | string | Yes | — | — |
scope_ref | string | Yes | — | Provider partition such as merchant, store, account, or company reference. |
artifact_type | string | Yes | — | Kind of generated artifact, e.g. 'reconciliation' or 'statement'. |
period_key | string | Yes | — | Accounting period the artifact covers, e.g. '2026-08'. |
data_environment | string | No | production | Which data set produced the artifact: 'production' (default) or 'homologation'. Part of the row identity, so test and production artifacts for the same period never collapse into one. |
request_ref | string | No | — | Provider handle for the generation request, used to resume polling. |
status | string | No | — | — |
document_ref | string | No | — | Durable pointer into our own object store. Never a provider download URL: those expire and must not be persisted. |
content_type | string | No | — | — |
byte_size | integer | No | — | — |
checksum | string | No | — | Digest of the retrieved bytes, so a truncated download is detectable. |
row_count | integer | No | — | — |
requested_at | string | No | — | — |
expires_at | string | No | — | When the provider's grant lapses; a stale artifact is re-requested, not retried. |
retrieved_at | string | No | — | — |
last_sync_workflow_uuid | string | No | — | — |
last_error | string | No | — | — |
artifact_metadata | json | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | — |
provider | string | Yes | — | — |
scope_ref | string | Yes | — | Provider partition such as merchant, store, account, or company reference. |
artifact_type | string | Yes | — | Kind of generated artifact, e.g. 'reconciliation' or 'statement'. |
period_key | string | Yes | — | Accounting period the artifact covers, e.g. '2026-08'. |
data_environment | string | No | production | Which data set produced the artifact: 'production' (default) or 'homologation'. Part of the row identity, so test and production artifacts for the same period never collapse into one. |
request_ref | string | No | — | Provider handle for the generation request, used to resume polling. |
status | string | No | — | — |
document_ref | string | No | — | Durable pointer into our own object store. Never a provider download URL: those expire and must not be persisted. |
content_type | string | No | — | — |
byte_size | integer | No | — | — |
checksum | string | No | — | Digest of the retrieved bytes, so a truncated download is detectable. |
row_count | integer | No | — | — |
requested_at | string | No | — | — |
expires_at | string | No | — | When the provider's grant lapses; a stale artifact is re-requested, not retried. |
retrieved_at | string | No | — | — |
last_sync_workflow_uuid | string | No | — | — |
last_error | string | No | — | — |
artifact_metadata | json | No | — | — |
commerce_artifact_uuid | uuid | No | — | — |
created | boolean | Yes | — | — |
persisted_at | string | No | — | — |
updated_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.commerce.artifact.persist",
"initial_data": {
"organization_uuid": "value",
"cloud_connection_uuid": "value",
"provider": "value",
"scope_ref": "value"
}
}