Create a new workflow definition and its first version using the exported JSON document of an existing workflow version.
You must be assigned the Workflow Manage Access permission to run this operation.
Array of objects (Linkage) | |
Array of objects (Task) | |
object (workflow) A workflow. |
OK
{- "workflow": {
- "id": 458,
- "name": "Checking Workflow",
- "description": "",
- "type": "Workflow::Setup",
- "ondemand_trigger": true,
- "callout_trigger": false,
- "scheduled_trigger": false,
- "interval": "",
- "timezone": "",
- "status": "Active",
- "version": "0.0.1"
}, - "tasks": [
- {
- "id": 1418,
- "name": "Checking the Approval Email",
- "parameters": {
- "emailBody": "<body style=\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\>\\n\\t<p> Hello,</p>\\n\\t<p>You have a pending approval. Please <a href=\\{{Data.Approval.approveLink}}\\>approve</a> or <a href=\\{{Data.Approval.rejectLink}}\\>reject</a>.</p>\\n\\t<p>Thanks</p> \\n</body>",
- "senderName": "Admin",
- "senderEmail": "workflow@zuora.com",
- "approvalNote": "",
- "subjectEmail": "This is the email to check if this email is working",
- "delivery_method": "email",
- "email_approver_emails": [
- "admin@company.com"
]
}, - "action_type": "Approval",
- "object": "",
- "object_id": "",
- "call_type": "SOAP",
- "task_id": null,
- "concurrent_limit": 9999999,
- "tags": [ ]
}
], - "linkages": [
- {
- "source_workflow_id": 458,
- "source_task_id": null,
- "target_task_id": 1418,
- "linkage_type": "Finish"
}
]
}
{- "id": 3373,
- "name": "Checking Workflow",
- "description": "",
- "type": "Workflow::Setup",
- "version": "0.0.1",
- "ondemandTrigger": true,
- "calloutTrigger": false,
- "scheduledTrigger": false,
- "interval": "",
- "timezone": "",
- "createdAt": "2019-10-03T14:14:39.139Z",
- "updatedAt": "2019-10-03T14:14:39.139Z"
}