Workflows
Because of the complexity of Workflows, the endpoint does not allow for Create functionality, but it will allow you to Retrieve, Update, and Delete workflows. The following actions can be performed on this resource...
Retrieve All Workflows
Retrieves all workflows associated with a specific brand.
You can include additional parameters in the request as described in the Query Parameters section. For instance, the request below will return only inactive workflows.
Example Response:
{
"data": [
{
"workflow_id": 444444,
"_brand_id": 123456789,
"name": "Gather First and Last Name",
"description": "Will kick off when contact is created.",
"entry_rule": "oneAtTime",
"active": 0,
"created": "2024-11-13 02:41:43",
"last_updated": "2024-11-20 17:38:34",
"last_activated": "2024-11-13 02:41:43",
"last_deactivated": "2024-11-20 17:38:34",
"last_cleared": null
}
],
"pagingData": {
"prevPage": null,
"currentPage": null,
"nextPage": null,
"currentPageString": null,
"hasMore": false
}
}
Retrieve a Specific Workflow
Retrieves a single workflow with the Workflow ID equal to {id}. The Workflow ID can be found using the retrieve all workflows endpoint.
Example Response:
{
"workflow_id": 444444,
"_brand_id": 123456789,
"name": "Gather First and Last Name",
"description": "Will kick off when contact is created.",
"entry_rule": "oneAtTime",
"active": 0,
"created": "2024-10-30 13:11:02",
"last_updated": "2024-11-20 17:10:32",
"last_activated": "2024-11-20 15:47:59",
"last_deactivated": "2024-11-20 17:10:32",
"last_cleared": "2024-11-20 15:59:02"
}
Edit a Specific Workflow
Allows you to edit existing workflows. You can target an existing workflow by passing the Workflow ID in your PUT request. The Workflow ID can be found using the retrieve all workflows endpoint.
Arguments:
PARAMETER | DESCRIPTION |
---|---|
name | Name of workflow |
description | Description of workflow |
entry_rule | Determines entry rules for a workflow (once, oneAtTime, or multiple) |
active | 1 for active, 0 for inactive |
Example Request Body:
{
"name": "Gather First and Last Name",
"description": "Will kick off when contact is created.",
"entry_rule": "oneAtTime",
"active": 0
}
Example Response:
{
"workflow_id": 444444,
"_brand_id": 123456789,
"name": "Gather First and Last Name",
"description": "Will kick off when contact is created.",
"entry_rule": "oneAtTime",
"active": 0,
"created": "2024-10-30 13:11:02",
"last_updated": "2024-11-20 17:10:32",
"last_activated": "2024-11-20 15:47:59",
"last_deactivated": "2024-11-20 17:10:32",
"last_cleared": "2024-11-20 15:59:02"
}
Delete a Specific Workflow
Deletes an existing workflow with the Workflow ID equal to {id}. The Workflow ID can be found using the retrieve all workflows endpoint. Using this action, the workflow is simply removed completely from the brand.
Example Response:
[]