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.
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.
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.
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.
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”.
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.
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].
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].
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.
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.
A year, which should be formatted as an integer like [.h-code]2021[.h-code].
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 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].
A phone number, which should be formatted as a string using only numbers. Example: [.h-code]“1234567890”[.h-code].
An email address, like [.h-code]“email@example.com”[.h-code]. Note that some carriers do not accept email addresses that contain a [.h-code]+[.h-code] and may cause errors.
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.
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.