# Workflows A workflow is a sequence of tasks that are performed based on predefined logic. A workflow improves efficiency and reduces errors by automating a series of complex tasks that otherwise need to be performed manually and repetitively. For more information, see Workflow. ## Delete a workflow version - [DELETE /workflows/versions/{version_id}](https://developer.zuora.com/v1-api-reference/api/workflows/delete_workflowversion.md): Delete a workflow version based on the version id. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. ## List workflows - [GET /workflows](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflows.md): Retrieves a list of workflow definitions available in your Zuora tenant. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Import a workflow - [POST /workflows/import](https://developer.zuora.com/v1-api-reference/api/workflows/post_workflowimport.md): Create a new workflow definition and its first version using the exported JSON document of an existing workflow version. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. ## Retrieve workflow task usage - [GET /workflows/metrics.json](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflowsusages.md): Gets workflow task usage sorted by day within a specified time frame. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## List workflow tasks - [GET /workflows/tasks](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflowstasks.md): Retrieves a list of workflow tasks available in your Zuora tenant. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Update workflow tasks - [PUT /workflows/tasks/batch_update](https://developer.zuora.com/v1-api-reference/api/workflows/put_workflowstasksupdate.md): Updates a group of workflow tasks. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. ## Retrieve a workflow task - [GET /workflows/tasks/{task_id}](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflowstask.md): Retrieves a specific workflow task by its ID. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Rerun a workflow task - [POST /workflows/tasks/{task_id}/rerun](https://developer.zuora.com/v1-api-reference/api/workflows/post_workflowstaskrerun.md): Reruns a specific workflow task by its ID. ### User Access Permission You must be assigned the Workflow Run Access permission to run this operation. ## Retrieve a workflow run - [GET /workflows/workflow_runs/{workflow_run_id}](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflow_run.md): Retrieves information about a specific workflow run by its ID. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Delete a workflow - [DELETE /workflows/{workflow_id}](https://developer.zuora.com/v1-api-reference/api/workflows/delete_workflow.md): Deletes a specific workflow by its ID. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. ## Retrieve a workflow - [GET /workflows/{workflow_id}](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflow.md): Retrieves information about a specific workflow by its ID. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Update a workflow - [PATCH /workflows/{workflow_id}](https://developer.zuora.com/v1-api-reference/api/workflows/patch_updateworkflow.md): Updates a specific workflow by its ID, which allows you to configure the settings of a workflow via API. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. ## Export a workflow version - [GET /workflows/{workflow_id}/export](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflowexport.md): Exports a workflow version into a JSON file. This file can be used to create a copy of this workflow version. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Run a workflow - [POST /workflows/{workflow_id}/run](https://developer.zuora.com/v1-api-reference/api/workflows/post_run_workflow.md): Run a specified workflow. In the request body, you can include parameters that you want to pass to the workflow. For the parameters to be recognized and picked up by tasks in the workflow, you need to define the parameters first. Note: To run a workflow, do not use the following reserved words in the request body of the parameters. - controller - action - id - user_email - user_token - format ### User Access Permission You must be assigned the Workflow Run Access permission to run this operation. To learn about how to define parameters, see Configure the settings of a workflow. ## List all versions of a workflow definition - [GET /workflows/{workflow_id}/versions](https://developer.zuora.com/v1-api-reference/api/workflows/get_workflowversions.md): Return a list of all workflow versions under a workflow definition ### User Access Permission You must be assigned the Workflow View Access permission to run this operation. ## Import a workflow version - [POST /workflows/{workflow_id}/versions/import](https://developer.zuora.com/v1-api-reference/api/workflows/post_workflowversionsimport.md): Create a new workflow version under a workflow definition using the exported JSON document of an existing workflow version. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. ## Stop a workflow run - [PUT /workflows/workflow_runs/{workflow_run_id}/stop](https://developer.zuora.com/v1-api-reference/api/workflows/put_stopworkflowrun.md): Stop a specific workflow run by its ID. ### User Access Permission You must be assigned the Workflow View Access permission to run this operation.