# Questionnaire
WebSDK allows you to create the QUESTIONNAIRE
verification step for your users to answer your questions or fill out custom data fields in which you're interested.
# Configuration
Questionnaires are set up via questionnaire constructor at the dashboard on test and production environments.
Please note that every questionnaire id
attribute should be unique and if you intend to change questionnaire structure ids
shouldn't be reused.
# questionnaireDef
ATTRIBUTE
Name | Type | Required | Description |
---|---|---|---|
id | String | Yes | ID of questionnaire |
title | String | No | Questionnaire title |
desc | String | No | Questionnaire description |
sections | Array | Yes | Array of questionnaire sections |
# sections
ELEMENTS FIELDS
Name | Type | Required | Description |
---|---|---|---|
id | String | Yes | ID of the section |
title | String | No | Section title |
desc | String | No | Section description |
condition | String | No | Condition that makes section show up depending on the value of specified sectionId.itemId={options.value} (see example) |
items | Array | Yes | Array of questionnaire items (data fields) |
# items
ELEMENTS FIELDS
Name | Type | Required | Description | Supported values |
---|---|---|---|---|
id | String | Yes | ID of an item | Any unique item identifier |
title | String | No | Data field title | Any string value |
desc | String | No | Data field description | Any string value |
type | String | Yes | Data field type | See below |
required | Boolean | No | Sets data field as mandatory to fill | true or false |
format | String | No | Format of the data field with validation | min:3 , max:9 (sets min/max amount of symbols), email |
placeholder | String | No | Placeholder for text data field | Any string value |
options | Array | No | Array of values to select from | [{"value": "someValue", "title": "Yes"}] |
condition | String | No | Condition that makes item show up | sectionId.itemId={options.value} ( Example: 1-Section.1-2=someValue ) |
# SUPPORTED types
of items
Value | Description |
---|---|
text | Text field |
textArea | Expandable text area |
date | Date field in format mm/dd/yyyy |
dateTime | Shows calendar with date and time fields |
bool | A single checkbox |
select | Using array of options creates radio buttons |
selectDropdown | Using array of options creates dropdown list of selectable values |
multiSelect | Using array of options creates multiselect of checkboxes |
countrySelect | Dropdown list of available countries |
# Getting results
To get results of QUESTIONNAIRE
step you can use Getting applicant data method.
# Example response
Copy
{
"id": "5e9a35d30a975a656d67d473",
"createdAt": "2020-04-17 23:03:47",
"clientId": "yourClientId",
"inspectionId": "5e9a35d30a975a656d67d474",
"externalUserId": "random-gyudvkkg9u2221",
"requiredIdDocs": {
"docSets": [
{
"idDocSetType": "QUESTIONNAIRE",
"questionnaireDef": {
"id": "ExampleQuestionnaire",
"title": "SETTLEMENT ACCOUNT DETAILS",
"desc": "This is a **description** of the *questionnaire* in the markdown format. Fields marked with * are mandatory. You can customize pretty much everything here: texts, descriptions, placeholders, validation rules, conditional sections and questions based on the previous answers, etc.",
"sections": [
{
"id": "accountDetails",
"title": "Account Details",
"desc": "This is all about account details. You can use this space to explain your user what exactly he needs to fill in.",
"items": [
{
"id": "1-1",
"title": "Legal name",
"type": "text",
"required": true,
"format": "min:3",
"placeholder": "Your legal name (min 3 symbols)"
},
{
"id": "1-email",
"title": "Email",
"desc": "We are able to validate fields too - actually, this is just a custom field description",
"type": "text",
"format": "email",
"placeholder": "Only valid emails will do"
},
{
"id": "1-country",
"title": "Coutry of tax residency",
"type": "countrySelect",
"required": true,
"placeholder": "Country"
},
{
"id": "1-2",
"title": "Information provided in this section relates to all websites",
"desc": "If you select No we will ask you for more websites",
"type": "select",
"required": true,
"options": [
{
"value": "one",
"title": "YES"
},
{
"value": "two",
"title": "NO"
}
]
},
{
"id": "1-2one",
"title": "Really all of them?",
"type": "text",
"required": true,
"condition": "accountDetails.1-2=one",
"placeholder": "Please specify the main one"
},
{
"id": "1-2two",
"title": "Which ones?",
"type": "text",
"required": true,
"condition": "accountDetails.1-2=two",
"placeholder": "Please specify the website(s)"
},
{
"id": "1-4",
"title": "Please select the recipient of the funds",
"type": "select",
"options": [
{
"value": "no",
"title": "Merchant’s own account"
},
{
"value": "no",
"title": "Account of Affiliated Company"
},
{
"value": "no",
"title": "Other"
}
]
},
{
"id": "1-5",
"title": "Settlement account is held with",
"desc": "This is an example of dynamic sections based on the answer",
"type": "select",
"options": [
{
"value": "yes",
"title": "Bank"
},
{
"value": "no",
"title": "Other Payment Institution (e-wallet, etc)"
}
]
}
]
},
{
"id": "bankDetails",
"title": "Bank details",
"condition": "accountDetails.1-5=yes",
"items": [
{
"id": "2-1",
"title": "Bank name",
"type": "text"
},
{
"id": "2-2",
"title": "Bank registration country",
"type": "countrySelect"
},
{
"id": "2-3",
"title": "Fedwire routing number (ABA), for banks located in the USA",
"type": "text"
},
{
"id": "2-4",
"title": "Address (optional)",
"type": "text"
},
{
"id": "2-5",
"title": "BIC/SWIFT",
"type": "text"
},
{
"id": "2-6",
"title": "Account number (Reference number)/IBAN",
"type": "text"
},
{
"id": "2-7",
"title": "Information provided in this section relates to all websites",
"type": "select",
"options": [
{
"value": "yes",
"title": "EUR"
},
{
"value": "yes",
"title": "USD"
},
{
"value": "yes",
"title": "RUB"
},
{
"value": "yes",
"title": "Multicurrency"
},
{
"value": "no",
"title": "Other"
}
]
},
{
"id": "2-8",
"title": null,
"desc": null,
"type": "text",
"required": true,
"format": null,
"condition": "bankDetails.2-7=no",
"placeholder": "Please specify",
"options": null
}
]
},
{
"id": "withInstitution",
"title": "INFORMATION ON PAYMENT INSTITUTION",
"desc": null,
"condition": "accountDetails.1-5=no",
"items": [
{
"id": "3-1",
"title": "Name of the Payment Institution",
"desc": null,
"type": "text",
"required": false,
"format": null,
"condition": null,
"placeholder": null,
"options": null
}
]
}
]
}
}
]
},
"review": {
"elapsedSincePendingMs": 302957,
"elapsedSinceQueuedMs": 25213,
"createDate": "2020-04-17 23:05:46+0000",
"reviewDate": "2020-04-17 23:10:49+0000",
"startDate": "2020-04-17 23:10:24+0000",
"reviewResult": {
"reviewAnswer": "GREEN"
},
"reviewStatus": "completed"
},
"lang": "en",
"type": "individual",
"questionnaires": [
{
"id": "ExampleQuestionnaire",
"sections": {
"bankDetails": {
"items": {
"2-1": {
"value": null,
"values": null
},
"2-2": {
"value": null,
"values": null
},
"2-3": {
"value": null,
"values": null
},
"2-4": {
"value": null,
"values": null
},
"2-5": {
"value": null,
"values": null
},
"2-6": {
"value": null,
"values": null
},
"2-7": {
"value": null,
"values": null
},
"2-8": {
"value": null,
"values": null
}
}
},
"withInstitution": {
"items": {
"3-1": {
"value": "e-wallet"
}
}
},
"accountDetails": {
"items": {
"1-2one": {
"value": null,
"values": null
},
"1-1": {
"value": "Legal Name LTD"
},
"1-2": {
"value": "two"
},
"1-2two": {
"value": "sumsub.com"
},
"1-4": {
"value": "no"
},
"1-5": {
"value": "no"
},
"1-email": {
"value": "[email protected]"
},
"1-country": {
"value": "GBR"
}
}
}
}
}
]
}