Collection methods
The prebuilt UI supports three ways for a user to provide their data. Connexion is the default and powers the large majority of integrations; PDF upload and manual selection are additional options for insurance.
Connexion (login)
The core method, and what we recommend. The user authenticates directly with their provider — for example BankID, or a username and password, depending on the company and market — and Insurely collects the data straight from their account.
Connexion is available across all Insurely products and gives the most complete, up-to-date data. Setup is covered in the Introduction, and the events you can listen for are documented in Configuration.
PDF upload
Available for certain insurance only, for certain markets and LoBs. Instead of logging in, the user uploads an insurance document (such as a policy PDF) and Insurely reads the coverage from it. This is useful when the user prefers not to authenticate, or when login is not available for their provider.
Manual selection
Available for certain insurance only, for certain markets and LoBs. Instead of logging in, the user selects their insurance company and their specific package (their insurance formula), and Insurely returns the standard coverage associated with that package. Internally this is sometimes called manual compare.
The result is based on the selected package, not collected from the user's own account.
There is no data collection step and no API response — all the data is delivered to your page
in a single postMessage.
Manual selection is currently available for French insurance.
The message to listen for
The interface posts the SELECTED_COVERAGE_PACKAGE message when the user clicks
"View coverage" after choosing their company and package. You don't need to send anything
back. You listen for it the same way as the other events in
Configuration.
| Field | Type | Description |
|---|---|---|
company | string | Insurely company code of the selected insurer (e.g. fr-credit-agricole). |
companyDisplayName | string | Human-readable name of the insurer (e.g. Crédit Agricole). |
insuranceType | string | The insurance type (e.g. vehicleInsurance). |
insuranceSubType | string | The more specific insurance subtype (e.g. carInsurance). |
packageName | string | Name of the package (formula) the user selected (e.g. Tiers+ intégrale). |
coverage | string | Coverage level of the selected package (e.g. THIRD_PARTY_PLUS). |
insuranceParameters | array | The insurance parameters for the selected package — same structure as in standard collected results. |
Example
{
"origin": "insurely",
"name": "SELECTED_COVERAGE_PACKAGE",
"value": {
"insuranceSubType": "carInsurance",
"packageName": "Tiers+ intégrale",
"insuranceType": "vehicleInsurance",
"company": "fr-credit-agricole",
"companyDisplayName": "Crédit Agricole",
"insuranceParameters": [],
"coverage": "THIRD_PARTY_PLUS"
}
}How to handle it
window.addEventListener('message', ({ data }) => {
if (data.name === 'SELECTED_COVERAGE_PACKAGE') {
// The user selected their package manually instead of logging in.
// data.value contains the selected company, package and its coverage.
console.log('Manual selection:', data.value);
// Handle the manually selected coverage in your application
}
});Last updated on