Workflow

Box Relay Workflows are objects that represent a named collection of flows.

You application must be authorized to use the Manage Box Relay application scope within the developer console in order to use this resource.

This resource has a few variations that can be encountered when using the API.

The fields that are part of the standard variant are generally returned when the resource is requested via its own API endpoints. For example, when retrieving a file by ID, it will return these fields unless the fields parameter has been specified.

string
12345

The id of the object

string
12345

The identifier of the outcome

string
12345

The identifier of the outcome

string
12345

The identifier of the flow

string
11446498

The unique identifier for the workflow

string
folder

Value is always folder

string
outcome

Value is always outcome

string
trigger_scope

Value is always trigger_scope

string
outcome

Value is always outcome

string
trigger

Value is always trigger

string
flow

Value is always flow

string
workflow

Value is always workflow

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

string / date-time
2012-12-12T10:53:43-08:00

When this flow was created

The user who created this flow

This workflow sets off a new hire approval flow

The description for a workflow.

object array

A list of flows assigned to a workflow.

string
12345

The identifier of the flow

flow

Value is always flow

string / date-time
2012-12-12T10:53:43-08:00

When this flow was created

The user who created this flow

object array

Actions that are completed once the flow is triggered

12345

The identifier of the outcome

outcome

Value is always outcome

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

If action_type is assign_task and the task is rejected, returns a list of outcomes to complete

12345

The identifier of the outcome

outcome

Value is always outcome

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

Approval Rejection Outcome

The name of the outcome

Information about how to complete the outcome which varies based on action_type selected

Task Approval Outcome

The name of the outcome

Information about how to complete the outcome which varies based on action_type selected

Trigger that initiates flow

trigger

Value is always trigger

object array

List of trigger scopes

trigger_scope

Value is always trigger_scope

The object the ref points to

/event/source/parameters/folder

Indicates the path of the condition value to check

WORKFLOW_MANUAL_START

Value is always WORKFLOW_MANUAL_START

object array

If action_type is assign_task and the task is rejected, returns a list of outcomes to complete

12345

The identifier of the outcome

outcome

Value is always outcome

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

Approval Rejection Outcome

The name of the outcome

Information about how to complete the outcome which varies based on action_type selected

boolean
true

Specifies if this workflow is enabled

string
New Hire Workflow

The name of the workflow

string
Task Approval Outcome

The name of the outcome

string
Approval Rejection Outcome

The name of the outcome

object

The object the ref points to

string
12345

The id of the object

folder

Value is always folder

Information about how to complete the outcome which varies based on action_type selected

Information about how to complete the outcome which varies based on action_type selected

object array

Actions that are completed once the flow is triggered

12345

The identifier of the outcome

outcome

Value is always outcome

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

If action_type is assign_task and the task is rejected, returns a list of outcomes to complete

12345

The identifier of the outcome

outcome

Value is always outcome

assign_task

The type of outcome

Value is one of add_metadata,assign_task,copy_file,copy_folder,create_folder,delete_file,delete_folder,lock_file,move_file,move_folder,remove_watermark_file,rename_folder,restore_folder,share_file,share_folder,unlock_file,upload_file,wait_for_task,watermark_file,go_back_to_step,apply_file_classification,apply_folder_classification,send_notification

Approval Rejection Outcome

The name of the outcome

Information about how to complete the outcome which varies based on action_type selected

Task Approval Outcome

The name of the outcome

Information about how to complete the outcome which varies based on action_type selected

string
/event/source/parameters/folder

Indicates the path of the condition value to check

object array

List of trigger scopes

trigger_scope

Value is always trigger_scope

The object the ref points to

string
12345

The id of the object

folder

Value is always folder

/event/source/parameters/folder

Indicates the path of the condition value to check

object

Trigger that initiates flow

trigger

Value is always trigger

object array

List of trigger scopes

trigger_scope

Value is always trigger_scope

The object the ref points to

string
12345

The id of the object

folder

Value is always folder

/event/source/parameters/folder

Indicates the path of the condition value to check

WORKFLOW_MANUAL_START

Value is always WORKFLOW_MANUAL_START

WORKFLOW_MANUAL_START

Value is always WORKFLOW_MANUAL_START

Response Example

{
  "id": 11446498,
  "type": "workflow",
  "description": "This workflow sets off a new hire approval flow",
  "flows": [
    {
      "id": 12345,
      "type": "flow",
      "trigger": {
        "type": "trigger",
        "trigger_type": "WORKFLOW_MANUAL_START",
        "scope": [
          {
            "type": "trigger_scope",
            "ref": "/event/source/parameters/folder",
            "object": {
              "type": "folder",
              "id": 12345
            }
          }
        ]
      },
      "outcomes": [
        {
          "id": 12345,
          "type": "outcome",
          "name": "Task Approval Outcome",
          "action_type": "assign_task",
          "if_rejected": [
            {
              "id": 12345,
              "type": "outcome",
              "name": "Approval Rejection Outcome",
              "action_type": "assign_task"
            }
          ]
        }
      ],
      "created_at": "2012-12-12T10:53:43-08:00",
      "created_by": {
        "id": 11446498,
        "type": "user"
      }
    }
  ],
  "is_enabled": true,
  "name": "New Hire Workflow"
}