subscription.billing.platform-user-seat-downgrade.preview ​
Preview members affected by a platform user-seat downgrade below active usage.
Preview which organization members would lose seats for a platform user-seat downgrade.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-subscription |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
subscription_uuid | uuid | No | — | — |
quantity | integer | Yes | — | — |
selected_membership_uuids | list | No | — | — |
use_oldest_fallback | boolean | No | — | — |
user_uuid | uuid | No | — | — |
return_channel | json | No | — | — |
agent_session_ref | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | — |
subscription_uuid | uuid | No | — | — |
seat_downgrade_schedule_uuid | uuid | No | — | — |
workflow_schedule_uuid | uuid | No | — | — |
item_code | string | No | — | — |
current_quantity | integer | No | — | — |
target_quantity | integer | No | — | — |
used | integer | No | — | — |
active_count | integer | No | — | — |
seats_to_remove | integer | No | — | — |
effective_at | string | No | — | — |
effective_at_source | string | No | — | — |
fallback_strategy | string | No | — | — |
requires_confirmation | boolean | No | — | — |
candidates | list | No | — | — |
default_oldest_members | list | No | — | — |
selected_members | list | No | — | — |
pending_downgrade | json | No | — | — |
replaced_pending_downgrade_uuid | uuid | No | — | — |
seat_change | json | No | — | — |
members_applied | list | No | — | — |
members_skipped | list | No | — | — |
members_added_by_fallback | list | No | — | — |
workflow_schedule_deactivated | boolean | No | — | — |
return_channel | json | No | — | — |
agent_session_ref | string | No | — | — |
next_action | json | No | — | — |
status | string | No | — | — |
completed_at | string | No | — | — |
canceled_at | string | No | — | — |
cancel_reason | string | No | — | — |
failed_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | preview | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | preview | completed | — |
* (any state) | fail | failed | — |
Business Errors ​
| Code | Message Template |
|---|---|
BILLING_AUTHORIZATION_REQUIRED | |
BILLING_OPERATION_INPUT_ERROR | |
BILLING_OPERATION_PLATFORM_SUBSCRIPTION_NOT_FOUND | No active platform subscription found for organization |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "subscription.billing.platform-user-seat-downgrade.preview",
"initial_data": {
"organization_uuid": "value",
"quantity": 123
}
}