Input Types

Learn how to use input types to build front end applications.

What are Input Types?

Applications and bind applications provide you with all of the relevant parameters needed for a set of products, handling 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 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 parameter is assigned one 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]parameter_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).
currency Acts the same as an integer, but communicates that the input is for currency to support unique styling on a front-end.
date A calendar date formatted "YYYY-MM-DD". Example: "2020-10-18"
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.
file A file, which accepts the id of an uploaded file.
agree_to A record of an applicant agreeing to terms and conditions.

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. Learn about how some coverage parameters have flexible enum values.

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.

agree_to

A checkbox to collect agreements to a set of conditions. For [.h-code]agree_to[.h-code], there is only 1 enum value and it is agree.

Note: this input type may come with additional parameters as part of the [.h-code]parameter_text[.h-code] object. This is because the text for review, and the text associated with the checkbox may be separate.

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].

currency

Acts the same as an integer, but communicates that the input is for currency such as Total Payroll in dollars. Can be used to add unique formatting on the front-end, but the value should still be formatted as an integer.

Dates

date

A calendar date formatted [.h-code]"YYYY-MM-DD"[.h-code]. Example: [.h-code]"2020-10-18"[.h-code]. Keep in mind, some 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.

Files

file

The [.h-code]id[.h-code] of a file, which is a UUID generated by Herald when the file is uploaded. Example: [.h-code]33a5ff38-5e72-4cd2-86cf-bea643dc697d[.h-code]

For all file inputs, Herald also provides a [.h-code]source_file[.h-code] property. [.h-code]source_file[.h-code] will be set when the file to be uploaded is a file that must first be downloaded. For example, an institution may require a signed and dated copy of the application. In this case, [.h-code]source_file[.h-code] will provide an [.h-code]id[.h-code] to get the application that must be signed. A [.h-code]null[.h-code] value expresses that the expected file was not originally provided by the institution.