Skip to main content

SLA Data Model

COTSMSLA

Description

The COTSMSLA data model contains the settings of a service-level agreement (SLAs) within a workflow.

JSON Sample

{
"_id": "61827e0978b92cfb95ce66b6",
"start": {
"types": [],
"states": [
"61827e102e8b30db66f7ef63" //COTSMState (Workflow State)
]
},
"end": {
"types": [],
"states": [
"61827e6ede16c588a66e3b42", //COTSMState (Workflow State)
"61827e74fe6d5bde4134a1f1" //COTSMState (Workflow State)
]
},
"data": {
"timeType": "dynamic",
"time": "DATE|endDate",
"baseDate": "startDate"
},
"isActive": true,
"reset": false,
"repeat": true,
"stateMachine": "61827e81855c63e18d38be7a", //COTSMStateMachine (Workflow)
"taskGroup": "61827e87b9c09c7f7e121596", //COTTaskGroup (Workflow Group)
"code": "reminder_00",
"display": "Reminder",
"pb": {}, //COTParametrizedBot (Routine)
"company": "61827e8fb10fe5e98e1438ef", //COTCompany
"createdAt": "2021-03-27T21:29:16.756Z",
"modifiedAt": "2021-10-27T13:07:38.906Z",
"__v": 0
}

Fields

FieldDescriptionTypeNote
codeThe SLA's code namestringMaximum 60 characters; only lowercase letters, numbers, and underscores allowed; must be unique.
companyThe ID of the company the SLA is found in.ObjectId<COTCompany>
createdAtDate the SLA was created.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
dataDate and time configuration for the SLA.object
data.baseDateSets static and dynamic time reference.stringEnum: ["endDate", "startDate", "resolutionDate", "default"]
Details availible here.
data.timeSpecifies the date or time that the task is supposed to go from its initial to final state.stringDetails available here.
data.timeTypeIndicates how time is calculated. Options are dynamic or static.stringDetails available here.
displayThe SLA's display namestring
endSpecifies when an SLA should be considered completed.objectEither states or types can be used to specify SLA completion, but it is not recommended to use both.
end.statesSpecifies the task states in which the SLA is completed.ObjectId<COTSMStates>[ ]
end.typesSpecifies the task types in which the SLA is completed.string[ ]Enum: ["new", "in-progress", "closed"]
isActiveIndicates if the SLA is active or not.boolean
modifiedAtIndicates the last time the SLA was modified.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
pbContains the routine that sets off with the SLA.COTParametrizedBot
repeatIf "true", time will cycle infinitely until the condition is met. Therefore, the SLA routine will be executed as many times as necessary. Otherwise, the SLA will only run once.booleanUse with precaution to avoid undesired looping activity.
resetIf "true", time will start again when the task returns to start.states or start.types.boolean
startSpecifies when an SLA should initiate.objectEither states or types can be used to specify SLA initiation, but it is not recommended to use both.
start.statesSpecifies the task states in which the SLA is initialized.ObjectId<COTSMStates>[ ]
start.typesSpecifies the task types in which the SLA is initialized.string[ ]Enum: ["new", "in-progress", "closed"]
stateMachineThe state machine or workflow the state belongs to.ObjectId<COTSMStateMachine>
taskGroupThe task group or workflow group the state belongs to.ObjectId<COTTaskGroup>

Additional Resources

Help