Saltar al contendio prinicipal

Answers Data Model

Advertencia

Esta página aún no se encuentra traducida al español.

COTAnswer

Description

Each time a survey is submitted, a unique answer is created to store the gathered data. Meaning that one survey can have as many answers as times it has been filled out and submitted. When submitted surveys are edited or modified, the changes are stored over the original answer.

JSON Sample

{
"_id": "615c6a3eb478e900079e5250",
"properties": [
"613fd05e4a8541000782ec84",
"613fd0154a8541000782eb14",
"613fd0224a8541000782eb25"
],
"propertyTypes": [
"branch_survey_00",
"location"
],
"extendsAnswer": [],
"rExtendsAnswer": [
"615c8c3bb478e900079e606e"
],
"data": [
{
"code": [],
"display": [
"Date of Arrival"
],
"responses": [],
"process": [],
"_id": "615c8c3bb478e900079e6076",
"user": "600ac7d8df54617a28ac89ff",
"question": "613fd2304a8541000782f313",
"contentType": "application/vnd.cotalker.survey+text",
"identifier": "date_arrival_00_1631572528245",
"diff": []
},
{
"code": [
"date",
"timezone=America/New_York"
],
"display": [
"Date"
],
"responses": [
"2021/10/4",
"14:00"
],
"process": [
"1633363200000"
],
"_id": "615c8c3bb478e900079e6077",
"user": "600ac7d8df54617a28ac89ff",
"question": "613fd2304a8541000782f314",
"contentType": "application/vnd.cotalker.survey+datetime",
"identifier": "date_arrival_00",
"diff": []
}
],
"uuid": "615c6a2bc7d8ac89ff9dbac2",
"survey": "613fd2304a8541000782f312",
"formId": "615c6a3eb478e900079e521d",
"company": "600df3e8b0ee1ab411a09fdd",
"user": "601df3c0853682a8d9395336",
"createdAt": "2021-10-05T15:07:42.617Z",
"modifiedAt": "2021-10-05T17:32:43.637Z",
"channel": "612e468581155c0007baa084",
}

Fields

FieldDescriptionTypeNotes
channelThe channel in which the survey was answeredObjectId<COTChannel>Channel Data Model
companyThe company in which the survey was answeredObjectId<COTCompany>Companies Data Model
createdAtDate answer was submittedISODateYYYY-MM-DDTHH:mm:ss.SSSZ
dataThis is where all the data of answered surveys is stored.COTAnswerData[ ]Answer Data Data Model
extendsAnswerExtends or adds information through an answer of an embedded surveyObjectId<COTAnswer>Superseded by answers.rExtendsAnswer
formIdUnique ID for the submitted survey; referenced in messages.form.id, i.e., Messages Data ModelObjectId
modifiedAtIndicates when last modifiedISODateYYYY-MM-DDTHH:mm:ss.SSSZ
propertiesProperties (elements) used in the surveyObjectId<COTProperty>[ ]See Properties Data Model
propertyTypesProperty Types (Collections) the used properties belong tostring[ ]Strings refer to property types' identifier name: propertyType.code. See Property Types Data Model
rExtendsAnswerExtends or adds information through an answer of an embedded surveyObjectId<COTAnswer>
surveySurvey the answer responds toObjectId<COTSurvey>See Survey Data Model
userUser that submitted the formObjectId<COTUser>See Users Data Model
uuidAnswer's identification code; used as reference key by other modelsObjectIdSystem generated code

Deprecated

FieldDescriptionTypeNotes
endDateISODateDEPRECATED
endsAtISODateDEPRECATED
identifiersNeededstring[ ]DEPRECATED
isAutoAllows messages and importer to write into answersbooleanDEPRECATED
metaobjectDEPRECATED
meta.actionstringDEPRECATED
meta.payloadobjectDEPRECATED
meta.payload.groupObjectIdDEPRECATED
propertiesNeededObjectId[ ]DEPRECATED
scoreobject[ ]DEPRECATED
score[index].mainnumberDEPRECATED
score[index].scoresobject[ ]DEPRECATED
score[index].scores[index].keystringDEPRECATED
score[index].scores[index].valueobjectDEPRECATED
startDateISODateDEPRECATED
tagstringDEPRECATED
targetObjectIdDEPRECATED

Additional Resources

Help