Skip to main content

Survey Chats Data Model

COTSurveyChat

Description

Each Survey Chat data model (COTSurveyChat) represents a component on a survey form. Usually, through the contentArray field, two COTQuestion ObjectIds are paired together. One pertains to the component's title or displayed text, the other to the area for data input.

graph LR; S[COTSurvey] --> C1[COTSurveyChat #1] S --> C2[COTSurveyChat #2] S --> C3[COTSurveyChat] C1 --> Q1T[COTQuestion - Field Label] C1 --> Q1I[COTQuestion - Input Settings] C2 --> Q2T[COTQuestion - Field Label] C2 --> Q2I[COTQuestion - Input Settings] Q2I --> QE[COTQuestionExec] C3 --> Q3[COTQuestion - Label & Input]

JSON Sample

{
"_id" : "61436eb4dd1e5a60a302ea9a",
"__v" : 0,
"content" : "",
"contentArray" : [
"61436eb4dd1e5af41302eab6",
"61436eb4dd1e5a1e8302eab7"
],
"contentType" : "application/vnd.cotalker.survey",
"isActive" : true,
"isSystemModel" : false,
"modifiedAt" : "2021-09-16T16:20:04.438Z",
"order" : 0,
"sender" : "#system",
"survey" : "61436eb4dd1e5a023102ea8b"
}

Fields

FieldDescriptionTypeNotes
_idThe Survey Chat data model's ID codeObjectId<COTSurveyChat>
__vVersion numbernumberFor internal system use only.
contentThis field stays emptystring
contentArrayPairs the two parts of a survey component or question: one corresponds to the question title, the other to data input configurationObjectId<COTQuestion>[ ]Question data model
contentTypeIndicates the content typestringDefault value: application/vnd.cotalker.survey
isActiveIndicates if it is available for useboolean
isSystemModelIf true, it cannot be changed, even by adminsboolean
modifiedAtIndicates the last time it was modifiedISODateYYYY-MM-DDTHH:mm:ss.SSSZ
orderIndicates the represented question's place on the survey formnumberLower numbers are higher on top
senderIndicates origin string Options: #system, #user
surveyIndicates the survey the question corresponds toObjectId<COTSurvey>Survey data model

Additional Resources

Help