Input Types

Learn how to use input types to build a front-end with a Dynamic Application.

What are Input Types?

The Dynamic Application provides you with all of the relevant questions needed for a set of products, and handles all of the conditionality for when additional questions must be asked. In order to render these questions on screen, Herald provides an [.h-code]input_type[.h-code] for each risk and coverage parameter. An input type is a string to assist in customizing inputs beyond what is denoted by the JSON schema, examples are [.h-code]long_text[.h-code] and [.h-code]short_text[.h-code].

Every risk and coverage parameter is assigned 1 of 13 input types, and we recommend being able to support each one. You might not encounter every input type with the insurance products you are using today, but it’s possible that a carrier may add additional underwriting questions in the future (you’ll hear from us if they do).

[.icon-circle-blue][.icon-circle-blue] Herald also returns [.h-code]text[.h-code] for the question and a [.h-code]schema[.h-code] using JSON schema to describe the expected values, which can be used for validating. Read more about building a dynamic app.

Full List of Input Types

You can read more about each input type by clicking on its name.

Input Type Description
select_one A multiple choice question where the user can select only one option.
select_many A multiple choice question where the user can select more than one option, with special logic for cases when "None of the above" is an option.
short_text A short amount of text. While not enforced, we encourage you to allow the user to submit fewer than 140 characters.
long_text A large amount of text.
number Any number, including decimals.
integer Any integer (no decimals allowed).
date A calendar date including date, month, and year.
year A year.
address An address that denotes a location, with multiple fields for values like ZIP and state. More documentation here.
claim_event Details describing the date and events of a claim, along with the amount of loss in USD.
email An email address.
phone A phone number.
domain A domain for a website.

Choices

select_one

A multiple choice question where the user can select only one option. The possible values are provided as enum values in the [.h-code]schema[.h-code] object.

select_many

A multiple choice question where the user can select more than one option. The possible values are provided as enum values in the [.h-code]schema[.h-code] object. The minimum and maximum number of acceptable values are defined in the schema as [.h-code]minItems[.h-code] and [.h-code]maxItems[.h-code].

Note: If you see [.h-code]minItems: 0[.h-code], this means that "None of the above" is one of the options (as the very last enum value). Herald has validation to remove any additional values if "None of the above" is selected.

Text

short_text

A short amount of text. While not enforced, we encourage you to allow the user to submit fewer than 140 characters. Used for inputs like “business name”.

long_text

A large amount of text, for inputs like a description. If an applicant has had health violations, we may ask them to provide more details.

Numbers

number

An integer that can include decimals, like [.h-code]1000.99[.h-code]. If there are minimum or maximum values, they will be provided in the [.h-code]schema[.h-code].

integer

An integer that does not allow decimals, like [.h-code]1000[.h-code]. If there are minimum or maximum values, they will be provided in the [.h-code]schema[.h-code].

Dates

date

A calendar date including date, month, and year. Should be formatted like [.h-code]"2021-10-18"[.h-code]. Naturally, most carriers have restrictions to prevent dates in the past or the current date for effective dates.

year

A year, which should be formatted as an integer like [.h-code]2021[.h-code].

Object Inputs

address

An address that describes a location, with multiple fields. One line for the address, city, state, ZIP, and country are always required.  The full list of fields is documented in our address schema. The [.h-code]schema[.h-code] will provide additional details for each field, including enum values for [.h-code]state[.h-code] to enable dropdowns.

For certain lines of business, address inputs will have child parameters. This is to support cases like an applicant that has multiple class codes at a single location. To handle these scenarios, read more about the parent <> child relationship.

claim_event

Claim event describes an event that either was a filed claim or would have warranted a claim if the customer had coverage at the time. As documented in the claim event schema, each claim event input has fields for the [.h-code]date[.h-code] the claim occurred, the [.h-code]amount[.h-code] the claim was for, and a [.h-code]description[.h-code] of the claim.

Claim events are always [.h-code]creates_array: true[.h-code], to allow for applicants to submit values for multiple claims that have occurred. You can submit multiple claim events using [.h-code-link]instance[.h-code-link].

Contact Info

phone

A phone number, which should be formatted as a string using only numbers. Example: [.h-code]“1234567890”[.h-code].

email

An email address, like [.h-code]“name@domain.com”[.h-code]. Note that some carriers do not accept email addresses that contain a [.h-code]+[.h-code] and may cause errors.

Domain

A domain, formatted as a string which can include subdomains. Acceptable formats are [.h-code]www.heraldapi.com[.h-code] or [.h-code]heraldapi.com[.h-code]. Protocols, i.e. [.h-code]https://[.h-code], will be stripped out. Slugs are also not accepted.