Skip to main content

Configuration

Configuration of this widget occurs through a configuration options object. See below.

Options Object

The following options are available:

PropertyTypeDescription
orgIdStringYour organization's identifier.
tokenStringYour organization's public authentication token.
ui.inputStyle[String]An array of styles for the inputs. Default is ['outlined']. Use either 'outlined', 'solo', or 'filled'.
contactEmailStringA contact email address given to you by Sitata.
currencyCodeStringThe currency that the widget should use as specified in ISO 4217. Default is "USD".
langStringThe widget will attempt to determine the user's language automatically. This will force a language selection instead. Use two character languages codes. e.g. 'es' for Spanish.
noQuoteProcessStringValues are either: 'assist', 'sitata', or 'plain'. This option tells the widget how to behave if an insurance quote is not possible. Specify 'assist' if you would like to offer your customer's Sitata's Travel Assistance plans without insurance. Specify 'sitata' for an error message and a link back to Sitata. Specify 'plain' for a simple error message and no alternative options for your customer. The default is 'assist'.
productIds[String]A list of product identifiers that you wish to only show during the quote. Hint: Use the human readable identifiers and no the UUIDs to make things easier.
tripTripTrip object to pre-populate widget with trip cost, itinerary information, and destinations.
userUserUser object to pre-populate widget with for purchaser info.
otherTravellers[Beneficiary]List of beneficiaries to pre-populate the widget for additional traveller info.
departureCountryCodeStringISO 3166 Alpha 2 character code of the departure country if pre-populating the widget. e.g. "CA" for Canada.
residentStateStringISO 3166 character code of regional state of departure. e.g. US-CA for California, United States.
sessionIdStringA unique identifier (e.g. checkout cart id) for the user for caching purposes
sessionTimeoutIntegerA threshold number of milliseconds to automatically invalidate the local cache. If it has been longer than the number specified, the cache will clear itself. Only applicable if sessionId is null. Default is 24 hours (in milliseconds).
forceAbstainBooleanWhen true, the widget will present an explicit content area to ensure the user selects 'I don't want protection'. Default is true.
showPreExCheckBooelanWhen true, will display a checkbox to force the user to declare if they have pre-existing conditions or not. Default is false.
preExTitleStringThis title string is shown when the user has selected that they have pre-existing conditions (and hence no quote can be produced).
preExTextStringThis string is shown when the user has selected that they have pre-existing conditions (and hence no quote can be produced). HTML is valid and should be considered to provide a link for an alternative quote process.
forcedProductIds[String]An array of product identifiers to restrict the product selections. You may use the human-readable identifiers.

Functions

The following functions are available:

FunctionArgumentsDescription
run()Initializes the widget.
isValid()Returns true if the widget is in a state that would allow the user to proceed to the next step. i.e. Either no insurance selected, or there is a valid sales quote.
shouldFetchSalesQuote()Returns true if the widget has determined that a Sales Quote should be generated. This is called during onContinue.
canFetchSalesQuote()Returns true if the widget is in a state that is ready to generate a Sales Quote. This is called during onContinue.
onContinue()This function should be used when you are proceeding to the next step in your booking / checkout process. See the next page for details on how to complete the sale.

Events

The following events are available:

EventArgumentsDescription
sitata:inpathInsureReady()Fired when the widget is ready for configuration.
sitata:selectedProducts(event)Fired when the use has added or removed a product. Returns the currently selected products list. Each product should have an associated quote under the _quote attribute.
sitata:customerInfo(event)Fired when the user has updated any of the customer information.
sitata:inpathError(errorData)Fired when an error has occurred.