Data Collection Object
Name | Type | Description |
---|---|---|
id | string | Data collection unique identifier |
title | string / object | Data collection title |
dc_mode | sting | Identifies the mode of use. Can assume one of the following values: “chat” “cbn” “cbl” “call” “survey_chat” “survey_call” |
next | string | Id of the next data collection to be displayed (not used at the moment) |
datacollection | array | Array of datacollection object. See the table below for a complete list of the properties. |
datacollection Object
Name | Type | description |
---|---|---|
dc_type | string | Identifies the data type of the data collection field. Possibles values are: “nickname” “name” “surname” “email” “phone” “date” “textarea” “checkbox” “radio” “select” “info” “time_slot_cbl” “cb_first_slot” “rating_star” “rating_smile” “rating_score” |
label | string / object | Field name to be displayed |
isMandatory | boolean | Specifies if the data collection field must be filled or not |
isVisibleAgent | boolean | Specifies if the data collection field will be visible by the agent |
isVisibleCustomer | boolean | Specifies if the data collection field will be visible by the customer |
isEditable | boolean | Specifies if the data collection field will be editable by the customer |
custom_regexp | string | Specifies a regular expression that will be used to validate the customer input |
value | string | Value entered by the customer or JS expression to get the data on auto mode. |
name | string | Data collection field identifier |
mode | string | Field compilation method. Can be set to: “manual” “auto” |
options | string / object | options of the checkbox / radio / select |
customMandatoryErrorMessage | string / object | Message to be displayed in case the required field is not filled in when tryng to go to next step |
customValidationErrorMessage | string / object | Message to be displayed in case the field value not match the custom_regexp when tryng to go to next step |
min | number | In case the value of dc_type is “rating_star” or “rating_score”, indicates the minimum value |
max | number | In case the value of dc_type is “rating_star” or “rating_score”, indicates the maximum value |
step | number | In case the value of dc_type is “rating_star” or “rating_score”, indicates the step from the minimum to the maximum value |
Examples
{
"_id" : ObjectId("5c6e700404445e26d8dbeee1"),
"id" : "67990d2d-5d35-4d7d-93ac-df3d9edb636d",
"title" : {
"it-it" : "Anagrafica #1",
"en-gb" : "Registry #1"
},
"dc_mode" : "chat",
"next" : "",
"datacollection" : [
{
"_id" : ObjectId("5c6e700404445e26d8dbeee4"),
"dc_type" : "nickname",
"label" : {
"it-it" : "Soprannome",
"en-gb" : "Nickname"
},
"isMandatory" : true,
"isVisibleAgent" : true,
"isVisibleCustomer" : true,
"isEditable" : true,
"custom_regexp" : "",
"customMandatoryErrorMessage" : {
"it-it" : "Nickname obbligatorio",
"en-gb" : "Nickname is mandatory"
},
"customValidationErrorMessage" : "",
"value" : "",
"name" : "nickname",
"mode" : "manual"
},
{
"_id" : ObjectId("5c6e700404445e26d8dbeee3"),
"dc_type" : "name",
"label" : {
"it-it" : "Nome",
"en-gb" : "Name"
},
"isMandatory" : false,
"isVisibleAgent" : false,
"isVisibleCustomer" : false,
"isEditable" : false,
"custom_regexp" : "",
"customMandatoryErrorMessage" : "",
"customValidationErrorMessage" : "",
"value" : "",
"name" : "name",
"mode" : "manual"
},
{
"dc_type" : "info",
"label" : {
"it-it" : "",
"en-gb" : ""
},
"isMandatory" : false,
"isVisibleAgent" : true,
"isVisibleCustomer" : true,
"isEditable" : false,
"custom_regexp" : "",
"customMandatoryErrorMessage" : "",
"customValidationErrorMessage" : "",
"value" : "<strong style=\"border: 1px solid; border-radius: 4px; background-color: #99ccf0; color: #f7ecdc; font-style: italic;\">Testo di prova</strong>",
"name" : "text_info",
"mode" : "manual"
},
{
"_id" : ObjectId("5c6e700404445e26d8dbeee2"),
"dc_type" : "surname",
"label" : {
"it-it" : "Cognome",
"en-gb" : "Surname"
},
"isMandatory" : false,
"isVisibleAgent" : true,
"isVisibleCustomer" : true,
"isEditable" : true,
"custom_regexp" : "",
"customMandatoryErrorMessage" : "",
"customValidationErrorMessage" : "",
"value" : "",
"name" : "surname",
"mode" : "manual"
}
],
"__v" : 0
}
{
"_id" : ObjectId("5cb4969440bbeaf04ae86d6c"),
"id" : "fc0450c8-4b2c-42b3-b8c9-04b672ca4a92",
"title" : {
"it-it" : "Anagrafica Test",
"en-gb" : "Registry Test"
},
"dc_mode" : "chat",
"next" : "",
"datacollection" : [
{
"dc_type" : "email",
"label" : "Email",
"isMandatory" : true,
"isVisibleAgent" : false,
"isVisibleCustomer" : false,
"isEditable" : false,
"custom_regexp" : "",
"customMandatoryErrorMessage" : {
"it-it" : "Email obbligatoria",
"en-gb" : "Email is mandatory"
},
"customValidationErrorMessage" : "",
"value" : "return $('#myName').text() + '@enghouse.com'",
"name" : "email",
"mode" : "auto"
},
{
"_id" : ObjectId("5c6e700404445e26d8dbeee9"),
"dc_type" : "text",
"label" : {
"it-it" : "Codice cliente",
"en-gb" : "Customer code"
},
"isMandatory" : true,
"isVisibleAgent" : false,
"isVisibleCustomer" : false,
"isEditable" : false,
"custom_regexp" : "",
"customMandatoryErrorMessage" : "",
"customValidationErrorMessage" : "",
"value" : "return $('#myCode').text()",
"name" : "custom_code",
"mode" : "auto"
}
],
"__v" : 0
}