Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
_id |
| Internal object identifier | ||||||||
id |
| Data collection unique identifier | ||||||||
title |
| Data collection title | ||||||||
dc_mode |
| Identifies the mode of use. Can assume one of the following values: “chat” “cbn” “cbl” | ||||||||
next |
| Id of the next data collection to be displayed | ||||||||
dc_type |
| Identifies the data type of the data collection field. Possibles values are: “nickname” “name” “surname” “email” “phone” “date” “textarea” “checkbox” “radio” “select” | ||||||||
label |
| Field name to be displayed | ||||||||
isMandatory |
| Specifies if the data collection field must be filled or not | ||||||||
isVisibleAgent |
| Specifies if the data collection field will be visible by the agent | ||||||||
isVisibleCustomer |
| Specifies if the data collection field will be visible by the customer | ||||||||
isEditable |
| Specifies if the data collection field will be editable by the customer | ||||||||
custom_regexp |
| Specifies a regular expression that will be used to validate the customer input | ||||||||
value |
| Value entered by the customer or JS expression to get the data on auto mode. | ||||||||
name |
| Data collection field identifier | ||||||||
mode |
| Field compilation method. Can be set to: “manual” “auto” |
...
options |
| options of the checkbox / radio / select |
Examples
Code Block | ||
---|---|---|
| ||
{
"_id" : "5c6e700404445e26d8dbeee1",
"id" : "67990d2d-5d35-4d7d-93ac-df3d9edb636d",
"title" : {
"IT" : "Anagrafica #1",
"GB" : "Registry #1"
},
"dc_mode" : "chat",
"next" : "",
"datacollection" : [
{
"_id" : "5c6e700404445e26d8dbeee4",
"dc_type" : "nickname",
"label" : "Nickname",
"isMandatory" : true,
"isVisibleAgent" : true,
"isVisibleCustomer" : true,
"isEditable" : true,
"custom_regexp" : "",
"value" : "",
"name" : "nickname",
"mode" : "manual"
},
{
"_id" : "5c6e700404445e26d8dbeee3",
"dc_type" : "name",
"label" : "Name",
"isMandatory" : false,
"isVisibleAgent" : true,
"isVisibleCustomer" : true,
"isEditable" : true,
"custom_regexp" : "",
"value" : "",
"name" : "name",
"mode" : "manual"
},
{
"_id" : "5c6e700404445e26d8dbeee2",
"dc_type" : "surname",
"label" : "surname",
"isMandatory" : false,
"isVisibleAgent" : true,
"isVisibleCustomer" : true,
"isEditable" : true,
"custom_regexp" : "",
"value" : "",
"name" : "surname",
"mode" : "manual"
},
{
"_id" : "5c6e700404445e26d8dbeee9",
"dc_type" : "text",
"label" : "Codice cliente",
"isMandatory" : true,
"isVisibleAgent" : false,
"isVisibleCustomer" : false,
"isEditable" : false,
"custom_regexp" : "",
"value" : "return $('#myCode').text()",
"name" : "custom_code",
"mode" : "auto"
}
],
"__v" : 0
} |
Code Block | ||
---|---|---|
| ||
{ "_id" : ObjectId("5e81aef78df3ba62c6480e6d"), "id" : "f14cb974-eeb0-47e8-bd51-c3e32adb6a40", "title" : { "it-it" : "Anagrafica #3", "en-gb" : "Registry #3" }, "dc_mode" : "chat", "next" : "", "datacollection" : [ { "dc_type" : "textarea", "label" : { "it-it" : "Suggerimenti", "en-gb" : "Tips" }, "isMandatory" : true, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : { "it-it" : "Per favore, scrivi qualcosa", "en-gb" : "Please, write something" }, "value" : "", "name" : "customer_tips", "mode" : "manual" }, { "dc_type" : "checkbox", "label" : { "it-it" : "Che veicolo possiedi?", "en-gb" : "What vehicle you own?" }, "options" : { "bike" : { "it-it" : "bicicletta", "en-gb" : "bicycle" }, "motorbike" : { "it-it" : "moto", "en-gb" : "motorcycle" }, "car" : { "it-it" : "auto", "en-gb" : "car" } }, "isMandatory" : false, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : "", "value" : "", "name" : "veichle", "mode" : "manual" }, { "dc_type" : "radio", "label" : { "it-it" : "Frutto preferito?", "en-gb" : "What's your favourite fruit?" }, "options" : { "b" : { "it-it" : "banana", "en-gb" : "banana" }, "a" : { "it-it" : "mela", "en-gb" : "apple" }, "w" : { "it-it" : "anguria", "en-gb" : "watermelon" } }, "isMandatory" : false, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : { "it-it" : "Per favore, scegli un frutto", "en-gb" : "Please, choose a fruit" }, "value" : "", "name" : "fruit", "mode" : "manual" }, { "dc_type" : "select", "label" : { "it-it" : "Scegli un colore:", "en-gb" : "Choose a color:" }, "options" : { "r" : "red", "g" : "green", "b" : "blue" }, "isMandatory" : true, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : { "it-it" : "Per favore, scegli una macchina", "en-gb" : "Please, choose a color" }, "value" : "", "name" : "color", "mode" : "manual" } ], "__v" : 0 } |