POST /workflows/import

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.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Content-Encoding String No

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Zuora-Track-Id String No

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

Authorization String Yes

The value is in the Bearer {token} format where {token} is a valid OAuth token generated by calling Create an OAuth token.

Idempotency-Key String No

Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types.

With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.

Accept-Encoding String No

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Query parameters

Name Type Required Description
workflow_definition_id Integer No

The unique id of the workflow definition to import a workflow version under.

activate Boolean No

Indicates whether the imported version is an active version. Default to be false.

version String No

The version number of the new workflow version to import. Must be greater than any existing version numbers.

Request body fields

Name Type Required Description
linkages[] Array No
linkages[].target_task_id Integer No

the task that the source task is linked to.

linkages[].source_workflow_id Integer No

the workflow the target task is associated with

linkages[].source_task_id Integer No

the task that spawned the target task

linkages[].linkage_type String No

Possible values:

  • "Failure"
  • "False"
  • "Approve"
  • "Success"
  • "Start"
  • "Reject"
  • "Iterate"
  • "True"
tasks[] Array No
tasks[].start_time String No

If Instance is true, the start time of the task instance.

tasks[].error_class String No

If Instance is true and status is Error, the error class of the task instance failure.

tasks[].object_id String No

The id of the selected object of the task.

tasks[].original_workflow_id Integer No

If Instance is true, the ID of the original workflow.

tasks[].parameters Object No

The configuration of the task.

tasks[].workflow_id Integer No

The ID of the workflow that the task belongs to.

tasks[].status String No

If Instance is true, the status of the task instance.

Possible values:

  • "Queued"
  • "Processing"
  • "Success"
  • "Error"
  • "Stopped"
  • "Pending"
tasks[].id Integer No

The unique ID of the task.

tasks[].data Object No

The data payload for the task.

tasks[].name String No

The name of the task.

tasks[].object String No

The selected object for the task.

tasks[].task_id Integer No

the id of this task's parent task. Will be null if this is the first task of the workflow

tasks[].call_type String No

The type of API used.

tasks[].tags[] Array No

The array of filter tags.

tasks[].error String No

If Instance is true and status is Error, the error reason of the task instance failure.

tasks[].original_task_id Integer No

If Instance is true, the ID of the original task in the original workflow.

tasks[].concurrent_limit Integer No

the number of concurrent tasks that are allowed to run simultaneously

tasks[].instance Boolean No

Indicates whether this task belongs to an instance of a workflow.

tasks[].action_type String No

The type of the task.

Possible values:

  • "Suspend"
  • "Reporting::ReportData"
  • "NewProduct"
  • "CustomObject::Query"
  • "Upload::FTP"
  • "Approval"
  • "Callout"
  • "Iterate"
  • "Billing::CurrencyConversion"
  • "Logic::CSVTranslator"
  • "Logic::XMLTransform"
  • "Billing::CustomInvoice"
  • "Cancel"
  • "Billing::BillRun"
  • "Create"
  • "Logic::CustomCode"
  • "WriteOff"
  • "UI::Stop"
  • "Update"
  • "Notifications::GoogleCloudPrint"
  • "Reporting::RunReport"
  • "CustomObject::Create"
  • "CustomObject::Delete"
  • "Resume"
  • "CustomObject::Update"
  • "Data::Link"
  • "Delay"
  • "Delete"
  • "Attachment"
  • "Upload::SFTP"
  • "InvoiceGenerate"
  • "Payment::PaymentRun"
  • "Notifications::SMS"
  • "Query"
  • "Download::SFTP"
  • "If"
  • "Logic::Lambda"
  • "Data::BillingPreviewRun"
  • "RemoveProduct"
  • "Export"
  • "Logic::Case"
  • "Email"
  • "File::CustomPDF::CustomDocument"
  • "Payment::GatewayReconciliation"
  • "UI::Page"
  • "Logic::JSONTransform"
  • "Notifications::PhoneCall"
  • "Logic::ResponseFormatter"
tasks[].error_details String No

If Instance is true and status is Error, the error details of the task instance failure.

tasks[].end_time String No

If Instance is true, the end time of the task instance.

workflow Object No

A workflow.

workflow.id Integer No

The unique ID of the workflow.

workflow.timezone String No

The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled.

workflow.ondemandTrigger Boolean No

Indicates whether the ondemand trigger is enabled for the workflow.

workflow.updatedAt String No

The date and time when the workflow is updated the last time, in the YYYY-MM-DD HH:MM:SS format.

workflow.name String No

The name of the workflow.

workflow.scheduledTrigger Boolean No

Indicates whether the scheduled trigger is enabled for the workflow.

workflow.description String No

The description of the workflow.

workflow.interval String No

The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled.

workflow.calloutTrigger Boolean No

Indicates whether the callout trigger is enabled for the retrieved workflow.

workflow.version String No

The version number of the workflow.

workflow.type String No

The type of the workflow. Currently the only valid value is 'Workflow::Setup'.

Possible values:

  • "Workflow::Instance"
  • "Workflow::Setup"
workflow.createdAt String No

The date and time when the workflow is created, in the YYYY-MM-DD HH:MM:SS format.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.