Data Models Overview
Introduction
Data models are the backbone of the Cotalker environment. All data in Cotalker is sustained within data models.
Data model structures are important for admins and developers in understanding data contexts, especially when using automated routines and making API requests.
Available data models are explained below.
Model Descriptions
1. Company & Users
Data Model (Context) | Description | Endpoint |
---|---|---|
COTCompany | Company configuration and settings | /companies |
COTUser | Users in your company, both humans and bots | /users |
COTJobTitle | Job titles group users and give them special attributes | /jobtitles |
COTAccessRole | Access roles that grant user permissions | /accessroles |
2. Groups & Messages
Data Model (Context) | Description | Endpoint |
---|---|---|
COTChannel | Workspace channels where users can view task information, answer surveys, or chat with other users associated with the channel | /channels |
COTGroup | Groups hold together tasks and channels or act as links to URLs | /groups |
COTMessage | Messages correspond to chat messages users send to each in channels, responses submitted in a survey, or system-generated messages | /messages |
COTMessageContentType | Indicates the content type of the message and is found in COTMessage | N/A |
3. Survey Forms
Data Model (Context) | Description | Endpoint |
---|---|---|
COTAnswer | Answers represent the submitted survey response | /answers |
COTAnswerData | Contains an answer's submitted data and is found in COTAnswer | N/A |
COTQuestion | The individual survey component | /questions |
COTQuestionContentType | The question's or survey component's content type. | N/A |
COTQuestionExec | Javascript automation that runs within the survey and is found in COTQuestion | N/A |
COTSurvey | Surveys gather different types of input from users | /surveys |
COTSurveyChat | Each survey chat holds questions that correspond to a survey component | /surveychats |
4. Database
Data Model (Context) | Description | Endpoint |
---|---|---|
COTProperty | Properties (elements) make up the property types and can be used to act as assets or even states | /properties |
COTPropertyType | Property types (collections) are like tables that can store all kinds of data | /propertyTypes |
5. Tasks & Workflows
Data Model (Context) | Description | Endpoint |
---|---|---|
COTSMSLA | Automated SLA routines associated to State Machines (workflow groups) | /tasks/{id}/sla |
COTSMState | The state of workflow or task | /tasks/{id}/sm/smstate |
COTSMStateMachine | A state machine is the workflow process a task goes through | /tasks/{id}/sm/smstatemachine |
COTTask | A task is the representation of an asset and its state | /tasks/{id}/task |
COTTaskGroup | A task group contains the tasks of the same workflow group | /tasks/group |
6. Automations
Data Model (Context) | Description | Endpoint |
---|---|---|
COTBot | Bots carry out diverse programmable routines | /bots , |
COTParametrizedBot | Holds an automated routine and is found in COTSMStateMachine, COTSMState, COTSMSLA, COTBot, COTPBScipt, and COTSchedule. | N/A |
COTPBScript | Corresponds to saved routine stages that can be later incorporated to any routine | /pbscripts |
COTSchedule | Schedules are automated scheduled routines | /schedules |
COTWebhook | Webhook settings for sending event data when triggered. | /webhook/subscription |
COTWebhookLog | Webhook logs contain all the webhook data at the moment of triggering. | /webhook/subscription/logs/{id} |
COTEvent | The triggering event's data. | /webhook/subscription/logs/{id} |
COTSurveyExecution | Survey data associated with triggering events. | /webhook/subscription/logs/{id} |
7. Search
Data Model (Context) | Description | Endpoint |
---|---|---|
Search Engine Model | Settings for data search made through an API request. | /search/search |
Search Category Results Model | Returned search results. | /search/search |
8. Notes
Data Model (Context) | Description | Endpoint |
---|---|---|
COTNote | Access to notes found within the Cotalker platform, i.e., documents written with Cotalker's Notes tool. | /notes |
Interactions
graph LR;
U[Users] --> C
U --> A
U --> P
G[Groups] --> C
C[Channels] --> P
C --> B
P[Databases]
M[Messages] --> C
S[Surveys] --> P
S --> A
A[Access Roles]
X[State Machine]
X --> G
T[Tasks] --> X
T --> C
R[Scheduler]
Z[Company]
B[Bots]
W[Answer]
S --> W
U --> W
C --> W
Data Types
Data types used in the models.
string
number
boolean
ISO date: YYYY-MM-DDTHH:mm:ss.SSSZ
ObjectId<T>:
ObjectId: a data object's unique 24 character hexadecimal (a-f 0-9) ID number, e.g., 507f1f77bcf86cd799439011<T> = indicates a data model: COT* (examples: COTUser, COTCompany, COTGroup)
[ ] : indicates an array
object: indicates an internal object