Skip to content
Proud to collaborate with Microsoft for Startups

subscription.usage.consolidate ​

Snapshot retained workflow and audit storage usage for one organization

Consolidate retained workflow/audit storage for billing and retention reporting.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID
subscription_uuiduuidNo—Subscription UUID for billing attribution
intervalstringNo—Consolidation interval label: hour or day
period_startstringNo—Inclusive period start ISO timestamp
period_endstringNo—Exclusive period end ISO timestamp
window_hoursintegerNo—Window length when period_start is omitted
persistbooleanNo—Persist or update the usage snapshot

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo——
subscription_uuiduuidNo——
snapshotjsonNo——
usage_measurement_uuiduuidNo——
lumen_usagejsonNo——
usage_measurement_uuidsjsonNo——
workflow_executionsintegerNo—Workflow runs that reached a terminal state in the period.
workflow_billable_unitsfloatNo—Charged units the billable_event ledger recorded for the period; null when the ledger table is unavailable.
lumen_measurement_uuidsjsonNo——
policyjsonNo——
persistedbooleanNo——
warningslistNo——
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
pendingfailfailed—

API Usage ​

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

{
  "workflow_type": "subscription.usage.consolidate",
  "initial_data": {
    "organization_uuid": "value"
  }
}