Skip to main content

Tasks Data Model

COTTask

Description

Tasks are hosted within Task Groups (COTTaskGroup) and carry out their lifecycle through a workflow. The task data model (COTTask) contains a task's settings information.

JSON Sample

{
"__v": 9,
"_id": "617928f1d50f83209fc4c9a2",
"activeSlas": [
"61794f9d7e2207607dea305d" //COTAccessRole
],
"answers": [
"61792e75437145ca48a1d5cd", //COTAnswer
"61792e7c63bf434aabe08105", //COTAnswer
"61792e8cc031f322c5090275" //COTAnswer
],
"asset": "61792ea734f892fa71f1bea3", //COTProperty
"assignee": "61792ea18b81afb8b9d02898", //COTUser
"channel": "61792eb01011d273cdadd371", //COTChannel
"closedAt": null,
"company": "61792eb79f70471601d5239c", //COTCompany
"createdAt": "2021-06-23T18:52:43.650Z",
"createdBy": "61792ea18b81afb8b9d02898", //COTUser
"editors": [
"61792ea18b81afb8b9d02898", //COTUser
"61792eed7e632ed745423227" //COTUser
],
"endDate": "2021-08-31T04:00:00.000Z",
"estimatedTime": 5,
"extensions": { //Additional fields
"birthdays_00": {
"birthdate_00": "2021-10-01T03:00:00.000Z"
}
},
"followers": [
"61792ef89c0dc2f1f67c8ba6" //COTUser
],
"image": {
"small": "https://mysite.com/image_small.png",
"square": "https://mysite.com/image_square.png",
"original": "https://mysite.com/image_original.png"
},
"indentation": 0,
"info": "Elaborate and distribute this month's sales report.",
"isActive": true,
"language": "english",
"modifiedAt": "2021-10-07T10:33:34.350Z",
"modifiedStateAt": "2021-09-21T18:25:56.787Z",
"name": "Sales Report",
"owner": "manual",
"relativeWeight": 1,
"serial": 28,
"smState": "6179356dcb7a69311a26bb80", //State settings (COTSMState)
"smStateMachine": "61793577a8d46e736bdcd129", // Workflow settings (COTSMStateMachine)
"startDate": "2021-07-01T04:00:00.000Z",
"status": "6179366b1361882699b18e27", //Current state (COTProperty)
"status1": "61793672a2bd931f8838cd5a", //Additional field nº1 (COTProperty)
"status2": "61793678aebac07bfb11d587", //Additional fields nº2 (COTProperty)
"status3": "6179367ecb7ab1e467fe092f", //Additional field nº3 (COTProperty)
"status4": null, //Additional field nº4 (COTProperty)
"status5": null, //Additioanl field nº5 (COTProperty)
"taskGroup": "6179368883ddbe5b0ac30c2d", //COTTaskGroup
"userList": [
"61792ea18b81afb8b9d02898", //COTUser
"61792eed7e632ed745423227", //COTUser
"61792ef89c0dc2f1f67c8ba6", //COTUser
"617936ae27e055c29d00d823" //COTUser
],
"visibility": [
"617936ae27e055c29d00d823" //COTUser
],
"weight": 0,

}

Fields

FieldDescriptionTypeNote
_idThe task's ID.ObjectId<COTTask>
activeSlasIndicates SLAs that are in course.ObjectId<COTSMSla>[ ]
answersArray of answer IDs of surveys responded in the task channel workspace.ObjectId<COTAnswer>[ ]
assetIndicates the element used to classify the task by asset type.ObjectId<COTProperty>
assigneeIndicates the user assigned responsible for the task.ObjectId<COTUser>Only one user at a time can be designated the assignee. By default, the creator is designated as the assignee, but later can be changed.
channelThe task's channel workspaceObjectId<COTChannel>
childArray of child tasks.ObjectId<COTTask>[ ]
closedAtIndicates the resolution date, i.e., when the task was closed. If not yet closed, the value is null.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
companyIndicates the company in which the task is found.ObjectId<COTCompany>
createdAtDate the task was created.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
createdByThe user (human or bot) that created the task.ObjectId<COTUser>By default, the creator is designated as the assignee, but can later be changed.
editorsUsers tagged as editors. Editors can read and write on all task details and participate in the chat area.ObjectId<COTUser>[ ]
endDateIndicates the task's deadline.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
estimatedTimeIndicates the estimated number of days to finish the task.number
extensionsDisplays collections set as additional fields and their values.objectThe difference between the additional fields displayed here and the ones that appear as task.status{1,5} is explained in the administrative panel documentation.
followersUsers tagged as followers. Followers can read task details and participate in the chat area but cannot modify task states or details.ObjectId<COTUser>[ ]
imageContains URLs to uploaded images used as the task's avatar.object
image.smallSmall-sized avatarURL
image.squareOriginal-sized, square-shaped avatarURL
image.originalOriginal image used for avatarURL
indentationThis number represents the depth of the node. If it is a root node, it's value is 0; a first child is equal to 1; a child of a child has a value of 2.number
infoAdditional information field displayed in the task details setting panel.string
isActiveIndicates if the task is active or not.boolean
modifiedAtIndicates when the task settings were last modified.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
modifiedStateAtIndicates the last state change.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
nameThe task's display name.string
ownerFree-field-value to store who created the taskstringDefault value is manual.
parentParent task IDObjectId<COTTask>
relativeWeightTemporal value used to determine weight in relation to same-level nodes.number
resolutionDateIndicates when a task entered a closed state.ISODate
serialThe task's serial number. Numbers are assigned in sequential order.number
smStateIndicates de ID of the current workflow state.ObjectId<COTSMState>
smStateMachinePoints to the workflow settings.ObjectId<COTSMStateMachine>
startDateThe date the task begins.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
statusIndicates the ID of the element that represents the current workflow state.ObjectId<COTProperty>
status1Indicates the ID of an element that represents an additional field put into the task.ObjectId<COTProperty>Additional fields characterize tasks by using them to indicate things like priority, department, or permissions. They can also be used to group, filter, or sort tasks in the task view.
status2Indicates the ID of an element that represents an additional field put into the task.ObjectId<COTProperty>Additional fields characterize tasks by using them to indicate things like priority, department, or permissions. They can also be used to group, filter, or sort tasks in the task view.
status3Indicates the ID of an element that represents an additional field put into the task.ObjectId<COTProperty>Additional fields characterize tasks by using them to indicate things like priority, department, or permissions. They can also be used to group, filter, or sort tasks in the task view.
status4Indicates the ID of an element that represents an additional field put into the task.ObjectId<COTProperty>Additional fields characterize tasks by using them to indicate things like priority, department, or permissions. They can also be used to group, filter, or sort tasks in the task view.
status5Indicates the ID of an element that represents an additional field put into the task.ObjectId<COTProperty>Additional fields characterize tasks by using them to indicate things like priority, department, or permissions. They can also be used to group, filter, or sort tasks in the task view.
taskGroupIndicates the task group the task belongs to.ObjectId<COTTaskGroup>
userListThis is an automatically generated list of all users associated with the task (editor/follower/visibility/assignee).ObjectId<COTUser>[ ]This list is READ ONLY and cannot be manually modified.
visibilityUsers with the visibility tag can view limited task details. They can participate in the chat area and view notes, but they cannot change the task's state.ObjectId<COTUser>[ ]
weightIndicates the task's place within the group panel.number

Deprecated

FieldDescriptionTypeNote
channelTypeRefers to the relationship task's and their channels.
Enum: ["bound", "unbound", "unbound-hierarchy"]
SHOULD ALWAYS BE ON BOUND.
string[ ]DEPRECATED
colorChanges color.
Enum: ["none", "red", "blue", "green", "yellow"]
stringDEPRECATED
formMessagestring[ ]DEPRECATED
insertAtEndboolean
isValidboolean
projectCodeIndicates the project a task belongs to. A project contains the shared data between parent and children tasks. Superseded by parent.ObjectId<COTTaskProject>DEPRECATED
publicobjectDEPRECATED
public.isActivebooleanDEPRECATED
public.languageIndicates the company language.
Enum: ["spanish", "english"]
stringDEPRECATED
public.responsestringDEPRECATED
public.titlestringDEPRECATED
representationobjectDEPRECATED
representation.statusstringDEPRECATED
surveyObjectIdDEPRECATED
validatorsObjectId[ ]DEPRECATED

Additional Resources

Help