> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/api-reference/core-resources/workflow-sessions/smart-form-responses.md).

# Smart form responses

Smart Form responses contain answers and risk scores from a workflow session.

Responses are returned in the `tasks` array of the [Workflow Session object](https://docs.complycube.com/documentation/api-reference/core-resources/workflow-sessions.md). A Smart Form task has a `subType` of `smart_form_capture_screen`. Its `resourceIds` entry with `type: "form"` contains the response.

{% hint style="info" %}
Use [Get a workflow session](https://docs.complycube.com/documentation/api-reference/core-resources/workflow-sessions/get-a-workflow-session.md) to retrieve Smart Form responses.
{% endhint %}

### The Smart Form response object

The response is stored in the `resourceIds` entry with `type: "form"`.

| Attribute | Type    | Description                                                                                                               |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
| `type`    | string  | The resource type. The value is `form`.                                                                                   |
| `isDraft` | boolean | Indicates whether the response contains saved progress. `true` indicates a draft; `false` indicates a submitted response. |
| `locale`  | string  | The language used by the customer. Returned on submitted responses.                                                       |
| `result`  | object  | The form answers and risk scores. See the [result](#the-result-object) object below.                                      |

#### The `result` object

| Attribute   | Type   | Description                                                                                  |
| ----------- | ------ | -------------------------------------------------------------------------------------------- |
| `id`        | string | The form ID configured in the builder. This identifies the form, not a unique submission.    |
| `riskScore` | number | The sum of the section risk scores.                                                          |
| `sections`  | object | The form sections, keyed by section ID. See the [section](#the-section-object) object below. |

#### The `section` object

Each entry in `result.sections` represents a section of the form.

| Attribute   | Type   | Description                                                                                                                                                                        |
| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `riskScore` | number | The sum of the question risk scores within the section. Hidden questions do not contribute to this score.                                                                          |
| `questions` | object | The answers within the section, keyed by question ID. See the [answer](#the-answer-object) object below. A hidden section has an empty `questions` object and a risk score of `0`. |

#### The `answer` object

| Attribute     | Type                                      | Description                                                                                                                                                                                               |
| ------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `value`       | string, number, boolean, object, or array | The captured answer. Its format depends on the question type. See Answer types below.                                                                                                                     |
| `type`        | string                                    | The question's API type, such as `ShortAnswer`, `SingleChoice`, or `Amount`.                                                                                                                              |
| `riskScore`   | number                                    | The question's risk score. Returned on answered `SingleChoice`, `MultipleChoice`, `Country`, `MultiCountry`, and `currentCountryCapture` questions when scoring is enabled. An Other response scores `0`. |
| `subtype`     | string                                    | Additional question format. Values are `percentage`, `date_of_birth`, `gov_uk_share_code`, or `uk_vat_number`. Only returned when applicable.                                                             |
| `calculation` | string                                    | The calculation used to produce the value. Values are `age`, `table_column_sum`, or `formula`. Only returned for calculated answers.                                                                      |
| `columns`     | object                                    | Column IDs mapped to column types. Only returned for Table answers.                                                                                                                                       |

### Answer types

The following table describes populated answer values. See [Empty and omitted answers](#empty-and-omitted-answers) for blank values.

| Question type                                         | Value type       | Description                                                                                                                                   |
| ----------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `ShortAnswer`, `Paragraph`, `Email`, `Url`            | string           | The entered text.                                                                                                                             |
| `Number`                                              | number or string | The numeric value. Percentages are whole percentage values, such as `60` for 60%. Formula results are decimal strings.                        |
| `Amount`                                              | object           | An object containing `amount` as a decimal string and `currency` as a currency code.                                                          |
| `SingleChoice`                                        | string           | The selected option's value, not its label. An Other response contains the entered text.                                                      |
| `MultipleChoice`                                      | array\[string]   | The selected option values. An Other entry contains the entered text.                                                                         |
| `Boolean`                                             | boolean          | `true` or `false`. An untouched checkbox or switch returns `false`.                                                                           |
| `PhoneNumber`                                         | string           | The phone number in E.164 format.                                                                                                             |
| `TaxNumber`                                           | object           | An object containing `number` and, when applicable, `country`.                                                                                |
| `Date`                                                | string           | A calendar date represented at UTC midnight, such as `1988-04-02T00:00:00.000Z`. Interpret the date portion without converting to local time. |
| `Country`, `currentCountryCapture`                    | string           | An ISO 3166-1 alpha-2 country code. `currentCountryCapture` is used by routing forms.                                                         |
| `MultiCountry`                                        | array\[string]   | A list of ISO 3166-1 alpha-2 country codes.                                                                                                   |
| `currentIpAddressCapture`                             | string           | The captured IP address. Used by routing forms.                                                                                               |
| `Address`                                             | object           | An object containing `address` and, when saved to the client record, `addressId`.                                                             |
| `Table`                                               | array\[object]   | Rows in entry order. Each row contains cell values keyed by column ID. Values follow the column type; date cells use `YYYY-MM-DD`.            |
| `FileUpload`, `MultiFileUpload`, `GovernmentIdUpload` | array\[object]   | Document references. See the [document reference](#the-document-reference-object) object below.                                               |
| `Signature`                                           | string           | A base64-encoded PNG without a `data:` prefix. This is a signature image, not a signed eSignature PDF.                                        |

#### The document reference object

| Attribute        | Type    | Description                                              |
| ---------------- | ------- | -------------------------------------------------------- |
| `id`             | string  | The ID of the document associated with the answer.       |
| `type`           | string  | The document type, when captured.                        |
| `issuingCountry` | string  | The document's issuing country, when captured.           |
| `classification` | string  | The document's classification or purpose, when captured. |
| `documentNumber` | string  | The document number, when captured.                      |
| `frontFile`      | boolean | Indicates whether a front file is present.               |
| `backFile`       | boolean | Indicates whether a back file is present.                |

Use the document `id` with the [Documents API](https://docs.complycube.com/documentation/api-reference/core-resources/documents.md) to retrieve files and extracted data. Attributes that were not requested during capture can be absent; `id`, `frontFile`, and `backFile` are always present.

#### Draft responses

Draft responses are available when **Progress saving** is enabled. They contain the answers entered so far and the customer's position in the form. Draft answers are unvalidated and may be incomplete.

The submitted response replaces the draft and has `isDraft: false`.

{% hint style="info" %}
Form submission and workflow completion are separate states. A submitted form does not indicate that verification checks have finished. Use the workflow session's `status` and `outcome` to determine the verification state.
{% endhint %}

#### Empty and omitted answers

| State    | Response                                                                                                                                                                                                                         |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Answered | The question key is present with a populated `value`.                                                                                                                                                                            |
| Blank    | The question was shown but left empty. `MultipleChoice`, `MultiCountry`, and upload types return `[]`. Other types return `""`, including normally numeric or structured types. An untouched checkbox or switch returns `false`. |
| Omitted  | The question key is absent. This applies to hidden questions, read-only content, calculations with blank inputs, or failed automatic country or IP captures. An omitted answer does not represent a negative response.           |

#### Form identifiers and display order

Use `taskId` or `result.id` to distinguish forms within a workflow session. Use the workflow session ID to distinguish separate runs of the same form.

Sections and questions are keyed by their configured IDs. The task's `options.form` contains the form definition used for the response, including question wording, option labels, and display order. Object-key order should not be used to determine display order.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.complycube.com/documentation/api-reference/core-resources/workflow-sessions/smart-form-responses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
