...
Property | Description | Notes | Localizable |
---|---|---|---|
Name | Name used to identify the field | ||
Label | Label to be rendered in the UI | Can be localized | X |
Value | Default Pre-filled value if mode is manual or js code if mode is auto | XThe pre-filled value is not localized | |
isMandatory | If true the field is required | A * is added in the UI | |
isVisibleCustomer | If false the filed is hidden | Mainly use for mode auto to fetch info using JS evaluation | |
isVisibleAgent | False if the content is not intended to be shown to agent for privacy reason | ||
isEditable | False if user is not allowed to change default value | ||
custom_regexp | Regular expression for validating input | If input is not validated, an error message is shown when submitting the form. Not used for textarea | |
customMandatoryErrorMessage | Error shown when a mandatory field is not filled | X | |
customValidationErrorMessage | Error shown when input is not valid | X | |
dc_type | type Type of field. Possible values are. | Supported values are:
| |
options | Object whose properties are used as possible values | Used only for radio, select and checkbox | X |
value |
Examples:
...
field value | if dc_type is manual then it's considered as default value, if auto it's evaluted as a JS function returning a value | ||
name | field name | Not visible in UI | |
mode | field mode | it descibes how to use the value field. manual the value is used as default value, auto it's evaluated as a JS function |
Examples:
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "id" : "f14cb974-eeb0-47e8-bd51-c3e32adb6a40", "title" :{ "IT" : "Anagrafica #3", "GB" : "Registry #3" }, "dc_mode" : "chat", "next" : "", "datacollection" : [ { "dc_type" : "textarea", ---> new textarea data collection type "label" : { "IT" : "Suggerimenti", "GB" : "Tips" }, "isMandatory" : true, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : { "IT" : "Per favore, scrivi qualcosa", "GB" : "Please, write something" }, "value" : "", ---> contains the text typed by the customer or a default value if pre-filled "name" : "customer_tips", ---> calldata variable name "mode" : "manual" }, { "dc_type" : "checkbox", ---> new checkbox data collection type "label" : { "IT" : "Che veicolo possiedi?", "GB" : "What vehicle you own?" }, "options" : { ---> checkbox values. The keys (bike, motorbike, car) will be the value returned by the selected checkbox. The customer will only see one label for each checkbox according the selected language. "bike" : { "IT" : "bicicletta", "GB" : "bicycle" }, "motorbike" : { "IT" : "motocicletta", "GB" : "motorcycle" }, "car" : { "IT" : "automobile", "GB" : "car" } }, "isMandatory" : false, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : "", "value" : "", ---> Contains the values selected by the customer separated by commas. Example: "bike,car". It can be prefilled to automatically select checkboxes. "name" : "veichle", ---> calldata variabile name "mode" : "manual" }, { "dc_type" : "radio", ---> new radio data collection type "label" : { "IT" : "Frutto preferito?", "GB" : "What's your favourite fruit?" }, "options" : { ---> the logic is the same as in the checkbox field "b" : { "IT" : "banana", "GB" : "banana" }, "a" : { "IT" : "mela", "GB" : "apple" }, "w" : { "IT" : "anguria", "GB" : "watermelon" } }, "isMandatory" : false, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "pignatta", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : { "IT" : "Per favore, scegli un frutto", "GB" : "Please, choose a fruit" }, "value" : "", ---> Contains only one value selected by the customer. In can be prefilled to automatically select one value. "name" : "fruit", ---> calldata variable name "mode" : "manual" }, { "dc_type" : "select", ---> new select data collection type "label" : { "IT" : "Scegli una macchina:", "GB" : "Choose a car:" }, "options" : { ---> the logic is the same as seen in the previous fields. In this example there is only one string value for each key that describe the car company brand (no localization required). "audi" : "Audi", "fiat" : "Fiat", "renault" : "Renault" }, "isMandatory" : true, "isVisibleAgent" : true, "isVisibleCustomer" : true, "isEditable" : true, "custom_regexp" : "", "customValidationErrorMessage" : "", "customMandatoryErrorMessage" : { "IT" : "Per favore, scegli una macchina", "GB" : "Please, choose a car" }, "value" : "", ---> conterrĂ il valore selezionato dal cliente. Se, ad es sceglie "Fiat", il campo sarĂ valorizzato con "fiat" "name" : "manifacture", ---> nome della variabile che poi diventa di calldata (come prima) "mode" : "manual" } ], } |