Widget Integration

Introduction

This document describes the process when Scalepoint Itemization is going to be used as part of an Insurance Company’s FNOL process.

Highlevel process:

A claimant goes to his insurance company webpage to report a loss. This may or may not involve that the claimant identifies himself by logging in. After the claimant has answered the initial questions as part of the FNOL process, the insurance company can chose to send the claimant to Scalepoint Itemization page to enter the lost items.

fnol process

In order to start the Itemization page an itemization case needs to be created first. This must be done by using the Scalepoint Case Integration API. Case linking

In order to link the itemization case to a ClaimShop case, there are two options:

  • Insurance company already have some unique identifier for the FNOL case. This identifier can be sent along when creating the itemization case.
  • Regardless if a unique identifier is sent along when creating the itemization case, the Scalepoint Case Integration API will always return a unique itemization case id.

Either one of the identifiers should be sent to Scalepoint in the ClaimShop case creation request.

Integration flow

fnol-highlevel

For more detailed steps on how to inject scalepoints widget into IC's portal.

Let us try to describe the above picture in details so we are on the same page. At this point we are assuming that all the required documentation and sample codes are provided and we are also assuming that you are able to send an authorization request using necessary scopes and able to get the authorization token. To put it more black and white if you are not able to get the authorization token you should not continue further with this widget integration. It’s important that below steps are followed in order.

  1. Get the Authorization Token - IC’s backend service need to obtain an authorization token from the Scalepoint authorization service. Please see documentation how to get the Authorization token.
  2. Create FNOL Case and save Case Token - Use Authorization token as a Header and create a FNOL case using Scalepoint Unified Case Integration API. This is a synchronous request so part of the response you will receive a case token, you should save this case token on your side. Since this case token should be used as itemizationCaseReference while you are creating a case inside Scalepoint ClaimShop platform.
  3. Get SSO Token - Once you received the case token, use this token to get sso token. SSO token is a temporary token and which is only valid for couple of minutes and its unique to the specific user. See documentation.
  4. Render widget - Use the case token + sso token to load the widget, please see how to render the widget.
  5. Loss Items saved automatically - At the moment, claimant is able to start report the loss items. By default as soon as the loss items are added to the Basket they are saved in Scalepoint backend system.
  6. Submit widget and read callback response - Once the items have been added to the basket a claimant should be able to submit the items or IC should be able to trigger the submit button (by javascript Client API). It’s up to Insurance companies on defining how the end user journey should be. By nature Scalepoint widget solution would provide both success and error callbacks all the time so IC would be able to define the user journey. Please see how to submit the loss items and also see the JSON schema for both Success and Error callbacks. NOTE Submit can be performed from a backend as well
  7. Create ClaimShop Claim using Unified Case Integration API - From here are onwards it up to the Insurance Companies on how to create the Claim in Scalepoint ClaimShop system.

Today Scalepoint supports two ways of creating a claim in ClaimShop, one using legacy XML integration which we are not going to extend in the future. Second one is using Unified Integration case create REST API. The only difference between FNOL case creation (which we did on part of the step 1) and ClaimShop case creation is only the contentType. Apart from the contentType the URL and authentication are same.

  • FNOL case creation contentType is contentItemization
  • ClaimShop case creation contentType is contentClaim
  • Another most important thing when you are creating ClaimShop case is send FNOL case token as itemizationCaseReference. When you do this ClaimShop will automatically map the reported loss items to the ClaimShop case, so when a claim handler login to ClaimShop system all the lost items will automatically appear.

Please note that Scalepoint widget solution is not only protected by OAuth 2.0 but we also use CORS protection. In order to access our solution you need to provide your DNS name to us, so we will add to our database.

Itemization case creation example

This is the example of a simple create itemization case request:

{
  "tenant": "abcinsurance",
  "company": "budgetinsurance",
  "country": "dk",
  "caseType": "contentItemization",
  "externalReference": "DPMWI29us9IcUvGb",
  "customer": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@gmail.com",
    "mobile": "12345678",
    "address": {
      "street1": "Ingemandsvej 27",
      "postalCode": "2000",
      "city": "Frederiksberg"
    }
  },
  "extraModifiers": [{
    "type": "postItemizationCompletedUrl",
    "value": "http://www.abcinsurance.com/thankyou.aspx?userid=DPMWI29us9IcUvGb"
  }]
}

The caseType is what identifies this case as an itemization case. The externalReference is an optional identifier for the case.

If the request is successful, the Scalepoint Case Integration API will respond with something like:

{
  "success": true,
  "token": "ci.d9a3c67d-ce7d-4e43-aa74-884f8f8b5bf6",
  "url": "https://sanbox.scalepoint.com/api/integration/dk/abcinsurance/v1/case/ci.d9a3c67d-scaqce7d-4e43-aa74-884f8f8b5bf6"
}

In this example, we now have two identifiers for the itemization case:

  • The insurance companys own reference ("externalReference": "DPMWI29us9IcUvGb")
  • The identifier assigned to this case by Scalepoint ("token": "ci.d9a3c67d-ce7d-4e43-aa74-884f8f8b5bf6")

Either one of these can be used later, when the contentClaim is created. The “url” returned is what the insurance company FNOL page(s) should redirect to, when they are ready to send the customer to Scalepoint Itemization. ClaimShop (content) case creation example

This is the example of a simple create content case request:

{
  "tenant": "abcinsurance",
  "company": "budgetinsurance",
    "country": "dk",
    "caseType": "contentClaim",
    "caseNumber": "927354-992226,001",
    "itemizationCaseReference": "ci.d9a3c67d-ce7d-4e43-aa74-884f8f8b5bf6",
    "policy": {
        "number": "6226934"
    },
    "customer": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@gmail.com",
        "mobile": "12345678",
        "address": {
            "street1": "Ingemandsvej 27",
            "postalCode": "2000",
            "city": "Frederiksberg"
        }
    }
}

In this example we use the identifier assigned by Scalepoint to the itemization case, created in the previous example. Another example would be to use the insurance companys own itemization reference:

{
  "tenant": "abcinsurance",
  "company": "budgetinsurance",
  "country": "dk",
  "caseType": "contentClaim",
  "caseNumber": "927354-992226,001",
  "itemizationCaseReference": "DPMWI29us9IcUvGb",
  "policy": {
    "number": "6226934"
  },
  "customer": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@gmail.com",
    "mobile": "12345678",
    "address": {
      "street1": "Ingemandsvej 27",
      "postalCode": "2000",
      "city": "Frederiksberg"
    }
  }
}

Both of the examples would accomplish the same thing: the itemization case would be linked together with the ClaimShop case as it is created.

Widget embedding example

Below please find the Customer Java Script which you could use to Inject on to Insurance Company`s Online Portal (see more details)


var script = document.createElement("script");
script.setAttribute('defer','');
script.src = "https://sanbox.scalepoint.com/api/integration/dk/abcinsurance/v1/case/ci.74316e01-53c0-413d-8abe-e089aad3df5e?sso_token=2b207459114a8f7a8d45a87c39b1649c&widget=true&target=scalepoint_widget_id";

document.getElementsByTagName("head")[0].appendChild(script);




see more about widget implementation: