Deal Workflows
Deal workflows define the stages a deal moves through — from first touch to closed-won or closed-lost. Create multiple pipelines, add stages with colors, and flag stages as open, won, or lost.
The Deal Workflow Object
Section titled “The Deal Workflow Object”| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the deal workflow |
account_id | uuid | ID of the account that owns the workflow |
name | string | Name of the workflow |
is_default | bool | True when this is the account’s default workflow used for new deals that do not specify one |
stages | object[] | Ordered list of stages in the workflow |
created_at | datetime | ISO 8601 timestamp when the workflow was created |
updated_at | datetime | ISO 8601 timestamp when the workflow was last updated |
Create a deal workflow
Section titled “Create a deal workflow”Endpoint: deal-workflows-create
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the workflow |
stages | object[] | Yes | Ordered list of stages for the workflow; at least one stage is required |
curl -X POST https://api.driftwoodapp.com/api/deal-workflows-create \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "...", "stages": []}'Delete a deal workflow
Section titled “Delete a deal workflow”Endpoint: deal-workflows-delete
Get a deal workflow
Section titled “Get a deal workflow”Endpoint: deal-workflows-get
List deal workflows
Section titled “List deal workflows”Endpoint: deal-workflows-list
Set stages for a deal workflow
Section titled “Set stages for a deal workflow”Endpoint: deal-workflows-set-stages
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the workflow whose stages are being replaced |
stages | object[] | Yes | Full ordered list of stages to set on the workflow; at least one stage is required and existing stages still in use cannot be removed |
curl -X POST https://api.driftwoodapp.com/api/deal-workflows-set-stages \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "...", "stages": []}'Update a deal workflow
Section titled “Update a deal workflow”Endpoint: deal-workflows-update
Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
deal_workflows.name_required | Name required |
deal_workflows.stages_required | Stages required |
deal_workflows.stage_label_required | Stage label required |
deal_workflows.invalid_id | Invalid id |
deal_workflows.cannot_delete_default | Cannot delete default |
deal_workflows.not_found | Not found |
deal_workflows.invalid_stage_id | Invalid stage id |
deal_workflows.stage_in_use | Stage in use |