Skip to main content

Creating Offers With Onboarding Customer Flows

Prerequisites

  • You have received your API Key (for stable and production environment)

Integrating our product

There are two ways to integrate our product – both lead the user from your website into our policy application flow (themed as per your brand guidelines) seamlessly.

Option 1: Embedding our user creation widget

User Creation Widget

You can integrate our user creation/registration widget inside your website as an <iframe> with the URL https://example.com/partner/register. On successful user creation, a verification email is then sent to the user with a verification link which will automatically redirect them to our policy application flow.

For a more customized experience, please have a look at our API. Use the register widget as a reference for implementing the consent checkboxes.

Option 2: Integrating through our Partner API (bringing customers to our UI for verification and submission)

If you already have information about the user or have a custom onboarding experience, you can integrate our product using the Partner API to create the user with the relevant data points. A successful request will provide you with a magic link (if the user is already verified on your platform) that, when used, will automatically login into the user account and take them to our policy application flow with the additional data already being filled in for them.

Unverified user

The flow differs slightly in the case of a user who is not verified beforehand. On creating the unverified user on our platform, we will send the user a verification email with a verification link that will also work as a magic link.

Option 3: API-only integration with Partner API (for partners with broker licenses)

If you already have all information about the user, you can integrate our product end-to-end with our Partner API and provide custom interfaces for the customers and brokers.

API-only integration allows you to create a flow from generating an offer for a customer to submitting the documents and applying for the offer with the insurance provider. This integration is for partners who want to create their broker dashboards to process and manage customers and complete another broker-related task without using external tools or interfaces for both brokers and customers.

The initial part of the flow remains the same as other integration. You can request the partner API to create a user with an offer. Once the user is created, you can use the user ID to perform additional actions on the offer.

  • If you created the user as a pre-verified user, you can upload the identity verification document.
  • The next step is to generate a policy ID from the offer, which generates the application form, and validates the user and offer request, including checks on the combination of funds, investment risk level, and sustainability choices.
  • The application is available for download once the policy ID is generated through the user query and uploaded back once the customer and the broker have signed it.
  • The last step is to submit the offer to the insurance provider for verification and being issued, it can only be done once the signed application form has been uploaded.
  • Once the offer has been submitted to the insurance company, no other mutation can be performed.
  • The user query provides additional information about the verification status, signed application form upload status, and policy ID (if generated).
API Limitations

This integration only works when the user/offer is created with all possible inputs prefilled in the createUser mutation. If the information is missing or invalid, we do not provide APIs to fix these issues, we return the response from the insurance provider's API, and any problems with the offer have to be fixed on the insurance provider's broker portal.

Option 4: Post-pickup only integration

Partners can also have a limited integration of our application for users who have already picked up their policies without the onboarding experience. These users have an ongoing policy and have already opened their on the policy pickup email, created account on our application, and verified and picked up their policy.

This flow is for partners who have their own application and sell product outside of our application. This flow also supports all Liechtenstein Life insurance products.

Partners can fetch the details about their customers who are using our application through multiple ways:

  • Use the GraphQL API to fetch all users using the users query
  • You can subscribe to our webhook (by subscribing to POLICY_ACTIVATED event) this will notify the partners when new users are created that are associated with them.

Both these API steps result in user IDs that can be used to generate magic-links which can then be used to load the application with the user already logged in within an iframe.

GraphQL API

  • Detailed instructions on how to setup our graphQL API can be found in the Our GraphQL API section.
  • The primary mutation you can start the integration process with is createUser. The operation can look like this:
mutation Mutation($user: UserInput!) {
createUser(user: $user) {
__typename
... on CreatedUnverifiedUser {
id
}
... on CreatedVerifiedUser {
id
magicLinkUrl
}
... on ErrorInterface {
message
}
}
}

The schema is fully commented, so consider the Playground as the API reference ("Docs" on the right).

We are handling errors inside of our schema (see ErrorInterface above). Possible errors are self-documenting and you know what to handle ahead of time. (More on the pattern)

Never query the error types directly and always access errors through the ErrorInterface as laid out above. This way you can avoid breaking changes, caused through added or removed errors.

Registering webhooks

We also support registering your own webhooks that are triggered when meaningful policy and user update events occur. You can read about webhooks in the API documentation within the registerWebhook mutation.

Integrating into native apps

  • Use the partner API to get a magic link for your logged-in user.
  • Load the magic link in a web-view as a separate tab or a modal.
  • Ensure that the cookies are persisted between sessions so that the magic link does not have to be regenerated when reopening the app.