The WorkflowTaskTemplate object allows users to manage the different task templates that are part of a workflow in Maximizer CRM.
A Workflow Task Template defines how a task will appear and behave when created as part of a workflow.
Key considerations for Workflow Task Templates:
-
Each workflow task template can belong to only one parent workflow.
-
Task templates within a workflow must have a unique sequence number, and the sequence must follow the correct order (1, 2, 3, 4, …).
-
Most fields in a workflow task template accept only predefined values. Refer to the field options to see the available choices.
For more details, check the CRUD request documentation based on your needs.
MetaData
Read WorkflowTaskTemplate metadata (simple)
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"Schema": {
"Scope": {
"Fields": 1
},
"Criteria": {
"SearchQuery": {
"Key": {
"$TREE": "/WorkflowTaskTemplate"
}
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}Read WorkflowTaskTemplate metadata (more)
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"Schema": {
"Scope": {
"Fields": {
"Key": 1,
"Alias": 1,
"Type": 1,
"Name": 1,
"AppliesTo": 1,
"Sortable": 1,
"Queryable": 1,
"Mandatory": 1,
"Attributes": 1,
"DisplayValue": 1
}
},
"Criteria": {
"SearchQuery": {
"Key": {
"$TREE": "/WorkflowTaskTemplate"
}
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}FieldOptions
Read WorkflowTaskTemplate FieldOptions - Priority
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"FieldOptions": {
"Priority": [
{
"Key": 1,
"DisplayValue": 1
}
]
}
}
}Read WorkflowTaskTemplate FieldOptions - Category
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"FieldOptions": {
"Category": [
{
"Key": 1,
"DisplayValue": 1
}
]
}
}
}Read WorkflowTaskTemplate FieldOptions - DateOffsetUnit
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"FieldOptions": {
"DateOffsetUnit": [
{
"Key": 1,
"DisplayValue": 1
}
]
}
}
}Read WorkflowTaskTemplate FieldOptions - AlarmOffsetUnit
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"FieldOptions": {
"AlarmOffsetUnit": [
{
"Key": 1,
"DisplayValue": 1
}
]
}
}
}Read WorkflowTaskTemplate FieldOptions - AssignedToExpression
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"FieldOptions": {
"AssignedToExpression": [
{
"Key": 1,
"DisplayValue": 1
}
]
}
}
}WorkflowTaskTemplate CRUD
Create - WorkflowTaskTemplate
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"Data": {
"Key": null, // Will be generated automatically
"WorkflowKey": "V29ya2Zsb3cJMjUwODEyMDAwMDAwMDAwODQ1Mzk4V0YJMA==", // Mandatory
"Sequence": 1, //Order of the task in the workflow.
"Subject": "Contact client and book meeting", // Same as normal task
// Depending on the order of the task (sequence) the engine will decide if below is added to the workflow start date or to the previous task completed date
// For this payload example, as sequence is 1 (first task), the task based on this template will be created with a due date 2 days (offset unit 3 + offset value 2) after workflow start date at 11:45:00 AM
"DateOffsetUnit": 3, // Check field options (3-Days, 4-Weeks, 5-Months)
"DateOffsetValue": 2, // Only positive values
"Time": "1900-01-01T11:45:00Z", // Could be time only as date portion will be always ignored. If not sent or null the engine will create the task as a all day task
// For this task the alarm will be set 12 hours (offset unit 2 + offset value 12) before the due date
"AlarmOffsetUnit": 2, // Check field options (1-Minutes, 2-Hours, 3-Days, 4-Weeks)
"AlarmOffsetValue": 12, // Only positive values, still we consider the alarm is before the date so that number will be substracted from the due date
"Priority": "Hi", // Same as normal task
"IconType": 1, // Same as normal task
"Category": ["1"], // Same as normal task
"AssignedToExpression": "JNAPOLI" // Allows any UID of active user
}
}
}Update - WorkflowTaskTemplate
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
// If the workflow (WorkflowKey) has been used already we don't allow update of task templates (for now)
"Data": {
"Key": "V29ya2Zsb3dUYXNrVGVtcGxhdGUJMjUwODEyMDAwMDAwMDAwODQ1Mzk4V0YJNg==", // Mandatory
"Sequence": 3,
"Subject": "Send Email" // Same as normal task
}
}
}Read - WorkflowTaskTemplate
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
"Scope": {
"Fields": {
"Key": 1,
"WorkflowKey": 1,
"Sequence": 1, //Order of the task in the workflow.
"Subject": 1,
"DateOffsetUnit": 1, // Check field options (1-Minutes, 2-Hours, 3-Days, 4-Weeks)
"DateOffsetValue": 1,
"Time": 1,
"AlarmOffsetUnit": 1, // Check field options (1-Minutes, 2-Hours, 3-Days, 4-Weeks)
"AlarmOffsetValue": 1,
"Priority": 1, // Same as normal task
"IconType": 1, // Same as normal task
"Category": 1, // Same as normal task
"AssignedToExpression": 1 // Allows any UID
}
},
"Criteria": {
"SearchQuery": {},
"Top": 3
}
}
}Delete - WorkflowTaskTemplate
// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
"WorkflowTaskTemplate": {
// If the workflow (WorkflowKey) has been used already we don't allow delete of task templates (for now)
"Data": {
"Key": "V29ya2Zsb3dUYXNrVGVtcGxhdGUJMjUwODEyMDAwMDAwMDAwODQ1Mzk4V0YJNQ==" // Mandatory
}
}
}