Quote Creation

When a customer confirms the inserted information on the Quote Review page, the system sends a call to SAP Quotation and Underwriting. Based on the provided data, the insurance quote can be either approved or referred in the back end.

Integration Package

Integration Flow (iFlow): Create New Business Quotation from SAP Commerce FSA in SAP Quotation and Underwriting in Insurance
Value Mappings SAP Commerce to S4HANA Value Mapping

Overview

For underwriting process, the integration with SAP Quotation and Underwriting (FS-QUO) is used. To create a quote and to start the underwriting process, FS-QUO needs the information about the chosen product offering, as well as the customer-relevant data. These pieces of information are collected in the first four steps of the checkout process.

When a customer confirms the inserted information on the Quote Review page, the system sends a call to SAP Quotation and Underwriting. Based on the provided information, the underwriting result that is received in Financial Services Accelerator can be either 'APPROVED' or 'REFERRED'. If a quote is approved by back end, a customer can continue to the Payment Details page and finish the checkout. The referred quote, however, indicates that the manual underwriting is required. In this case, the customer can't finish the checkout. Instead, the customer is advised to contact an insurance agent. Customer can't finish the checkout as well if there are any errors.

In all of these cases, the quote is in the binding state, which means that the customer can't modify the data any more.

Integration Object

The integration object OutboundFullCart is defined in the projectdata-fullcart-outbound.impex file in the sappqmintegrationfacades extension.

$integrationgroup = integrationadmingroup
$defaultPassword = 123456
$lang = en

INSERT_UPDATE IntegrationObject; code[unique = true];
; OutboundFullCart

INSERT_UPDATE IntegrationObjectItem; integrationObject(code)[unique = true]; code[unique = true]; type(code)
; OutboundFullCart ; Cart               ; Cart               ;
; OutboundFullCart ; Currency           ; Currency           ;
; OutboundFullCart ; CartEntry          ; CartEntry          ;
; OutboundFullCart ; Product            ; Product            ;
; OutboundFullCart ; InsuranceQuote     ; InsuranceQuote     ;
; OutboundFullCart ; FSPaymentFrequency ; FSPaymentFrequency ;
; OutboundFullCart ; InsuredObject      ; InsuredObject      ;
; OutboundFullCart ; User               ; User               ;
; OutboundFullCart ; Address            ; Address            ;
; OutboundFullCart ; Country            ; Country            ;

INSERT_UPDATE IntegrationObjectItemAttribute; integrationObjectItem(integrationObject(code), code)[unique = true]; attributeName[unique = true]; attributeDescriptor(enclosingType(code), qualifier); returnIntegrationObjectItem(integrationObject(code), code); unique[default = false]; autoCreate[default = false]
; OutboundFullCart:Cart               ; cartId           ; Cart:code                       ;                                     ; true ;
; OutboundFullCart:Cart               ; currency         ; Cart:currency                   ; OutboundFullCart:Currency
; OutboundFullCart:Cart               ; coverages        ; Cart:entries                    ; OutboundFullCart:CartEntry          ;      ;
; OutboundFullCart:Cart               ; quoteInformation ; Cart:insuranceQuote             ; OutboundFullCart:InsuranceQuote     ;      ;
; OutboundFullCart:Cart               ; policyHolder     ; Cart:user                       ; OutboundFullCart:User

; OutboundFullCart:Currency           ; isocode          ; Currency:isocode                ;                                     ;      ;

; OutboundFullCart:CartEntry          ; insuredObject    ; CartEntry:insuredObject         ; OutboundFullCart:InsuredObject      ;      ;
; OutboundFullCart:CartEntry          ; entryNumber      ; CartEntry:entryNumber           ;                                     ; true ;
; OutboundFullCart:CartEntry          ; product          ; CartEntry:product               ; OutboundFullCart:Product            ;      ;

; OutboundFullCart:InsuranceQuote     ; startDate        ; InsuranceQuote:startDate        ;                                     ;      ;
; OutboundFullCart:InsuranceQuote     ; paymentFrequency ; InsuranceQuote:paymentFrequency ; OutboundFullCart:FSPaymentFrequency ;      ;

; OutboundFullCart:FSPaymentFrequency ; code             ; FSPaymentFrequency:code         ;                                     ; true ;

; OutboundFullCart:Product            ; code             ; Product:code                    ;                                     ; true ;

; OutboundFullCart:User               ; firstName        ; User:firstName                  ;                                     ;      ;
; OutboundFullCart:User               ; lastName         ; User:lastName                   ;                                     ;      ;
; OutboundFullCart:User               ; dateOfBirth      ; User:dateOfBirth                ;                                     ;      ;
; OutboundFullCart:User               ; email            ; User:uid                        ;                                     ;      ;
; OutboundFullCart:User               ; customerId       ; User:externalId                 ;                                     ; true ;
; OutboundFullCart:User               ; address          ; User:residentialAddress         ; OutboundFullCart:Address            ;      ;

; OutboundFullCart:Address            ; street           ; Address:streetname              ;                                     ;      ;
; OutboundFullCart:Address            ; housenumber      ; Address:streetnumber            ;                                     ;      ;
; OutboundFullCart:Address            ; postalcode       ; Address:postalcode              ;                                     ;      ;
; OutboundFullCart:Address            ; city             ; Address:town                    ;                                     ;      ;
; OutboundFullCart:Address            ; country          ; Address:country                 ; OutboundFullCart:Country            ;      ;

; OutboundFullCart:InsuredObject      ; insuredObjectId  ; InsuredObject:insuredObjectId   ;                                     ; true ;

; OutboundFullCart:Country            ; isocode          ; Country:isocode                 ;                                     ; true ;				
			

You can view and modify the integration object in the Integration UI Tool perspective of Backoffice, under Modelling node.

Example Payload and Response

The PQMQuoteServiceFacade calls the OutboundServiceFacade to prepare the payload.

Sometimes, as is the case with quote creation, the payload needs to be decorated in a specific way. The PQMCartRequestDecorator removes the key and value labels from the payload to make it more readable. The decorator also puts the main product and selected quote variant to the root of the payload (for example, "AUTO_INSURANCE_SILVER", which is at the same time the main product and a selected quote variant).

The following code shows the example payload request:

{
  "selectedQuoteVariant": "AUTO_INSURANCE_SILVER",
  "cartId": "00014111",
  "quoteInformation": {
    "paymentFrequency": {
      "code": "YEARLY"
    },
    "startDate": "/Date(1564524000000)/",
    "insuredObjects": [
      {
        "childInsuredObjects": [
          {
            "driverDob": "/Date(269478000000)/",
            "firstName": "Julie",
            "lastName": "Armstrong",
            "driverLicenceDate": "/Date(963784800000)/",
            "driverCategory": "Main",
            "insuredObjectType": "DRIVER",
            "insuredObjectId": "00026273",
            "driverGender": "Female",
            "driverMaritalStatus": "Married",
            "driverLicenceNumber": "4556789"
          },
          {
            "driverDob": "/Date(206233200000)/",
            "firstName": "Charlie",
            "lastName": "Armstrong",
            "driverLicenceDate": "/Date(778456800000)/",
            "driverCategory": "Occasional",
            "insuredObjectType": "DRIVER",
            "insuredObjectId": "00026274",
            "driverGender": "Male",
            "driverMaritalStatus": "Married",
            "driverLicenceNumber": "567899"
          }
        ],
        "vehicleUsage": "Personal",
        "vehicleOwnerPostalCode": "68167",
        "insuredObjectId": "00026272",
        "vehicleIdentificationNumber": "12345671234567878",
        "vehicleMake": "Audi",
        "vehicleYear": "2019",
        "vehicleLicenseNumber": "HT 567 23",
        "insuredObjectType": "AUTO",
        "vehicleModel": "A5",
        "vehicleValue": "35000",
        "vehiclePurchaseDate": "/Date(1554847200000)/",
        "vehicleAnnualMileage": "12000",
        "vehicleType": "A5Quattro"
      }
    ]
  },
  "currency": {
    "isocode": "EUR"
  },
  "mainProduct": "AUTO_INSURANCE_SILVER",
  "coverages": [
    {
      "insuredObject": {
        "insuredObjectId": "00026272"
      },
      "entryNumber": 0,
      "product": {
        "features": [
          {
            "code": "limit",
            "type": "bodilyinjurylimit",
            "amount": "1000000.0"
          },
          {
            "code": "limit",
            "type": "propertydamagedlimit",
            "amount": "100000.0"
          }
        ],
        "code": "AUTO_TPL_SILVER"
      }
    },
    {
      "insuredObject": {
        "insuredObjectId": "00026272"
      },
      "entryNumber": 1,
      "product": {
        "features": [
          {
            "code": "deductible",
            "type": "deductible",
            "amount": "2500.0"
          }
        ],
        "code": "AUTO_COLLISION_COVERAGE_SILVER"
      }
    }
  ],
  "policyHolder": {
    "customerId": "FSBP012018",
    "lastName": "Armstrong",
    "firstName": "Julie",
    "dateOfBirth": "/Date(270082800000)/",
    "address": {
      "country": {
        "isocode": "DE"
      },
      "housenumber": "15",
      "city": "Mannheim",
      "postalcode": "68167",
      "street": "Friedrich Nietzsche Str."
    },
    "email": "julie.armstrong@gmail.com"
  }
}				
			

Note that for coverages, the entryNumber "0" always refers to the main coverage.

Response

The PQMQuoteServiceFacade is responsible for response and error handling. The following code example illustrates a response received from SAP Cloud Integration:

{
  "coverages": [
    {
      "entryNumber": "0",
      "premiumAfterTax": "1989.77",
      "premiumBeforeTax": "1989.77"
    },
    {
      "entryNumber": "1",
      "premiumAfterTax": "27.54",
      "premiumBeforeTax": "27.54"
    }
  ],
  "quoteInformation": {
    "policyNumber": "00002210000347507",
    "submissionNumber": "11062",
    "endDate": "/Date(1596326400000)/",
    "premiumAfterTax": "2017.31",
    "premiumBeforeTax": "2017.31",
    "quoteId": "11082",
    "underwritingResult": "APPROVED"
  }
}
The most important pieces of information that are received in the response are:
  • quoteID
  • underwritingStatus: "APPROVED" or "REFERRED"

When the response is recieved, the PQMQuoteServiceFacade sets the quote workflow status to the corresponding underwriting status, as well as the quote state to "BIND". The "BIND" state means that the quote is now binding, so the customer can't further modify the data. If there is an error, the decorator sets the quote to "ERROR" status.

You can monitor the outbound requests in the Integration UI Tool perspective of Backoffice, under the Start of the navigation pathMonitoring Next navigation step OutboundEnd of the navigation path node.

To view a specific payload, select it from the list and double-click within the Request Payload field. This action opens a context-menu. Download the payload data and open it with a JSON Viewer of your choice.