Task
Task object captures a single task done or being done by a user. For example calling a lead or navigating to a location on the field can both be modeled as tasks.
At the core of it a task is defined by the following fields
status
Every task can have one of the following status
- OPEN
- COMPLETED
- CANCELLED When a task is being worked upon its status is
OPEN. A task can be created inCOMPLETEDstate - this is what we refer to as logging a task.
data
data is a json field containing the actual data defining a task instance. the key is either the shortId or the id of the task attribute. all internal apis publish task data as id:value pair while external apis publish data as shortId:value pairs
Example:
{ "primary_disposition": "CALLBACK", "when_to_callback": 1634025183219, "first_name": "Cixin", "last_name": "Liu", "remarks": "lead wants a callback"}fields
name | data type | type info | description |
|---|---|---|---|
id | string | uuid | id of the task - auto generated |
title | string |
| Title of the task |
description | string |
| description for the task |
order | number |
| order rank for this task |
status | string |
| can be either OPEN, COMPLETED or CANCELLED |
team | string | uuid | id of the team to which this task belongs to |
stateTask | string | uuid | Id of the statetask which defines the schema of this task |
taskType | string |
| task type |
createdBy | string | uuid | user id of the user who created the task |
assignedTo | string | uuid | user id of the user to whom this task is assigned to |
belongsTo | string | uuid | pod id of the pod to which this task belongs to |
startsAt | number | epoch ms | datetime at which task started at |
endsAt | number | epoch ms | datetime at which this task ends |
dueBy | number | epoch ms | datetime by which this task needs to be completed |
startedAt | number | epoch ms | datetime at which the task actually got started |
completedAt | number | epoch ms | datetime at which task actually got completed |
cancelledAt | number | epoch ms | datetime at which the task was cancelled |
procedure | string | uuid | id of the procedure to which this task belongs to |
task | string | uuid | id of the task to which this task is associated with |
entity | string | uuid | id of the entity of the record to which this task is associated to |
record | string | uuid | id of the record to which task is associated with |
form | string | uuid | id of the form to which this task is associated |
members | json |
| list of user ids who are also participants in the task |
data | json |
| id:value json object storing the actual data |
derivedData | json |
| id:value json object storing the derived data |
createdAt | number | epoch ms | timestamp at which the task was created |
updatedAt | number | epoch ms | timestamp at which the task was updated |
isDeleted | boolean |
| flag indicating wether this task is deleted or not |