Skip to main content

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)DescriptionEndpoint
COTCompanyCompany configuration and settings/companies
COTUserUsers in your company, both humans and bots/users
COTJobTitleJob titles group users and give them special attributes/jobtitles
COTAccessRoleAccess roles that grant user permissions/accessroles

2. Groups & Messages

Data Model (Context)DescriptionEndpoint
COTChannelWorkspace channels where users can view task information, answer surveys, or chat with other users associated with the channel/channels
COTGroupGroups hold together tasks and channels or act as links to URLs/groups
COTMessageMessages correspond to chat messages users send to each in channels, responses submitted in a survey, or system-generated messages/messages
COTMessageContentTypeIndicates the content type of the message and is found in COTMessageN/A

3. Survey Forms

Data Model (Context)DescriptionEndpoint
COTAnswerAnswers represent the submitted survey response/answers
COTAnswerDataContains an answer's submitted data and is found in COTAnswerN/A
COTQuestionThe individual survey component/questions
COTQuestionContentTypeThe question's or survey component's content type.N/A
COTQuestionExecJavascript automation that runs within the survey and is found in COTQuestionN/A
COTSurveySurveys gather different types of input from users/surveys
COTSurveyChatEach survey chat holds questions that correspond to a survey component/surveychats

4. Database

Data Model (Context)DescriptionEndpoint
COTPropertyProperties (elements) make up the property types and can be used to act as assets or even states/properties
COTPropertyTypeProperty types (collections) are like tables that can store all kinds of data/propertyTypes

5. Tasks & Workflows

Data Model (Context)DescriptionEndpoint
COTSMSLAAutomated SLA routines associated to State Machines (workflow groups)/tasks/{id}/sla
COTSMStateThe state of workflow or task/tasks/{id}/sm/smstate
COTSMStateMachineA state machine is the workflow process a task goes through/tasks/{id}/sm/smstatemachine
COTTaskA task is the representation of an asset and its state/tasks/{id}/task
COTTaskGroupA task group contains the tasks of the same workflow group/tasks/group

6. Automations

Data Model (Context)DescriptionEndpoint
COTBotBots carry out diverse programmable routines/bots ,
COTParametrizedBotHolds an automated routine and is found in COTSMStateMachine, COTSMState, COTSMSLA, COTBot, COTPBScipt, and COTSchedule.N/A
COTPBScriptCorresponds to saved routine stages that can be later incorporated to any routine/pbscripts
COTScheduleSchedules are automated scheduled routines/schedules
COTWebhookWebhook settings for sending event data when triggered./webhook/subscription
COTWebhookLogWebhook logs contain all the webhook data at the moment of triggering./webhook/subscription/logs/{id}
COTEventThe triggering event's data./webhook/subscription/logs/{id}
COTSurveyExecutionSurvey data associated with triggering events./webhook/subscription/logs/{id}
Data Model (Context)DescriptionEndpoint
Search Engine ModelSettings for data search made through an API request./search/search
Search Category Results ModelReturned search results./search/search

8. Notes

Data Model (Context)DescriptionEndpoint
COTNoteAccess 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