Attaching Formulas
Business Formulas can be attached to specific targets (product, or coverage) in order to process the inputs and generate different types of outputs - such as premium calculation or underwriting scoring.
The Insurance Product Factory allows the user to attach the following types of formulas:
-
formulas for the premium calculation per product;
-
formulas for the premium calculation per coverage;
-
formulas for underwriting per product;
-
formulas for underwriting per coverage.
Only one formula can be attached on a specified product, or coverage, at a time. This condition applies to both tariff and underwriting formulas.
Read below about the flows, libraries, scripts and endpoints used by this functionality. (Scroll down or click for attaching underwriting formulas.)
Attach Premium Calculation Formulas
This functionality allows the user to attach a premium calculation formula to a specified insurance product, or coverage, based on a previously indicated Tariff Type.
The FTOS_IP_CalcType option set is available for configuring the tariff type; the option set values being: Per Product and Per coverage:
-
For products with Per Product tariff type, a premium calculation formula can be attached on the product.
When choosing this option set value, the FTOS_IP_InsuranceProductFormula default data form becomes available (in the Premium Amount tab) for inserting a premium calculation formula, or updating the existing configuration (namely, delete a previously attached formula and inserting a new one). -
For products with Per coverage tariff type, a premium calculation formula can be attached on the product item (coverage).
When choosing this option set value, the FTOS_IP_InsuranceProductItemFormula default data form becomes available (in the Premium Amount tab) for inserting a premium calculation formula, or updating the existing configuration (namely, delete previously attached formulas and inserting new ones).
When changing the Tariff Type value, the user is warned about the automatic removal of any tariff formulas attached previously.
User Journeys
General description: This default form driven flow is based on the FTOS_IP_InsuranceProductFormula entity. The flow is used for inserting or updating premium formulas attached on the product level. Only one formula can be attached per product. For this condition, a validation is in place - with the following error message: “There is another Insurance Product Formula record with the same Insurance Product”. The product name is pre-filled and read only and the formula is mandatory to be completed.
On edit mode, the Map Data button is visible. When pressing the Map Data button, the data mapping standard screen appears.
View Default This view lists all the premium formulas attached on the product level - showing the name, the insurance product and the formula, sorted Ascending by Name.
General description: This default form driven flow is based on the FTOS_IP_InsuranceProductItemFormula entity. The flow is used for inserting or updating premium formulas attached on coverage level. For products with tariff type set to Per Coverage, a user can add a single formula for each coverage of the product. When inserting a new formula, the product name is pre-filled and read-only and the insurance coverage and formula fields are mandatory to be completed.
On edit mode, the Map Data button is visible. When pressing the Map Data button, the data mapping standard screen appears.
View Default This view lists all the premium formulas attached per coverage - showing the name, the insurance coverage, the formula and order, sorted Ascending by Order.
On Demand Scripts
This script inserts a new record in the FTOS_CALC_DataMapping with some data received for the premium formula. More than that, the script also updates the formula (FTOS_IP_InsuranceProductFormula) with the Id of the newly inserted data mapping calculation.
This script inserts a new record in the FTOS_CALC_DataMapping with some data received for the premium formula. More than that, the script also updates the formula (FTOS_IP_InsuranceProductItemFormula) with the Id of the newly inserted data mapping calculation.
Endpoints
It calls the FTOS_IP_InsuranceProductFormula_CreateDataMapping on demand script. (See above.)
It calls the FTOS_IP_InsuranceProductItemFormula_CreateDataMapping on demand script. (See above.)
Attach Insurance Underwriting Formulas
Based on the Underwriting Type selected in the Main Info step on an insurance product, the user can attach underwriting formulas, either on product or coverages level. Depending on that selection, a grid of records showing the formulas attached is displayed on the Underwriting tab.
When changing the underwriting type value, the user is warned about the automatic removal of any underwriting formulas attached previously.
User Journeys
General description: This default form driven flow is based on the FTOS_IP_InsuranceProductCoverFormulaUnd entity. The flow is used for inserting or updating underwriting formulas attached on insurance coverage level. The fields Insurance Product Item, Context Type and Formula are mandatory to be completed. When clicking the Map Data button, another screen appears and the user can select an entity whose attributes can be used as inputs for the calculation of the appended formula.
View Default This view lists all the underwriting formulas attached on the coverage level. The user can either select an existing record - for editing, insert a new record or export the entire list.
General description: This default form driven flow is based on the FTOS_IP_InsuranceProductItemFormulaUnd entity. The flow is used for inserting or updating underwriting formulas attached on the product level. The fields Context Type and Formula are mandatory to be completed. When clicking the Map Data button, another screen appears and the user can select an entity whose attributes can be used as inputs for the calculation of the appended formula.
View Default This view lists all the underwriting formulas attached on the product level. The user can either select an existing record - for editing, insert a new record or export the entire list.
On Demand Scripts
This script inserts a new record in the FTOS_CALC_DataMapping with the data received in the underwriting formula - for the coverage. More than that, the script also updates the formula with the Id of the newly inserted data mapping calculation.
This script inserts a new record in the FTOS_CALC_DataMapping with the data received in the underwriting formula - for the product. More than that, the script also updates the formula with the Id of the newly inserted data mapping calculation.
Endpoints
It calls the FTOS_IP_InsuranceProductCoverFormulaUnd_CreateDataMapping on demand script. (See above.)
It calls the FTOS_IP_InsuranceProductItemFormulaUnd_CreateDataMapping on demand script. (See above.)
Server Side Library
FTOS_IP_InsuranceProduct_Operations
This server side script library stores methods for various actions that a user can perform on an insurance product, or coverage. These methods were divided in two main classes, in order to keep the functionalities on the product separate from the ones on the product items (coverages).
This class holds methods only used for operations performed at the product level.
This function returns a list with only one product Id that was found based on the existing lookup on a specific insurance product item (coverage) Id.
Input parameters: productItemId
- The Id of the insurance product item (coverage).
Output parameters: List with the product Id.
This function returns a list with only one underwriting type that was found for a product with a specific Id.
Input parameters: productId
- The Id of the insurance product.
Output parameters: List with the product underwriting type.
This function returns an object that will contain the underwriting type set on a specific insurance product
Input parameters: productId
- The Id of the insurance product for which the underwriting type will be returned.
Output parameters: validationObj
- The object containing the underwriting type.
This function returns a list with only one tariff type that was found for a product with a specific Id.
Input parameters: productId
- The Id of the insurance product.
Output parameters: List with the product tariff type.
This function returns an object that contains the tariff type set on a specific insurance product.
Input parameters: productId
- The Id of the insurance product for which the tariff type is returned.
Output parameters: validationObj
- The object containing the tariff type.
This function deletes the formulas attached on a specific insurance product.
Input parameters:
-
entityNamesList
- The list of entities. -
insuranceProductId
- The Id of the insurance product.
Output parameters: N/A.
This class holds methods only used for operations performed at the coverage level.
This function returns a list with underwriting formulas attached on coverage level - for a specific product Id, insurance item Id and context type Id.
Input parameters:
-
insuranceProductId
- The Id of the specific insurance product item (coverage). -
insuranceProductItemId
- The Id of the specific insurance product. -
contextTypeId
- The Id of the specific context type.
Output parameters: List with underwriting formulas.
This function validates if the newly added formula contains a unique combination of insurance product, insurance product item (coverage) and context type. If the data is duplicated or the formula name already exists, this function throws an error.
Input parameters:
-
coverageFormulaName
- The name of the formula which is about to be inserted or updated. -
insuranceProductId
- The Id of the selected insurance product. -
insuranceProductItemId
- The Id of the selected insurance product item (coverage). -
contextTypeId
- The Id of the selected context type. -
maxNumber
- The maximum number of records necessary for validation.
Output parameters: N/A.
This function checks the attached underwriting formula for updates. Next, if it finds any change, the function updates the specific record from the FTOS_CALC_DataMapping entity.
Input parameters:
-
formulaId
- The Id of the selected formula. -
insuranceProductItemId
- The Id of the selected insurance product item (coverage). -
contextTypeId
- The Id of the selected context type. -
dataMappingId
- The Id of the related data mapping record.
Output parameters: N/A.
This function is called when the user clicks the Map Data button for inserting a new record in the FTOS_CALC_DataMapping entity, with some data from the underwriting formula. It also updates the related formula with the new data mapping Id.
Input parameters:
-
formulaId
- The Id of the selected formula. -
contextTypeId
- The Id of the selected context type.
Output parameters: N/A.
This function inserts a new record in the FTOS_CALC_DataMapping entity, with some data from the underwriting formula.
Input parameters:
-
ipFormulaData
- The data object for the selected formula. -
formulaId
- The Id of the selected formula.
Output parameters: N/A.
This function runs some validations before calling the insertNewDataMapping() function.
Input parameters:
-
insuranceProductData
(ipFormulaData) - The data object (containing details of the insurance product) for the selected formula. -
insuranceProductItemId
- The Id of the selected insurance product item (coverage). -
contextTypeId
- The Id of the selected context type. -
formulaId
- The Id of the selected formula.
Output parameters: N/A.
This function returns a list with some data objects for the insurance coverages found.
Input parameters: productId
- The Id of the selected insurance product.
Output parameters: List with insurance coverages.
This function returns different attributes from the FTOS_IP_InsuranceProductItem entity, based on the product id.
Input parameters: productId
- The Id of the selected insurance product.
Output parameters: query
- An array that contains an object with the following results: FTOSIPInsuranceProductItemId
, and Name
.
This function returns different attributes from a versioned record of the FTOS_IP_InsuranceProductItem entity, based on the versioned product id;
Input parameters: productId
- The Id of the selected insurance product.
Output parameters: query
- An array that contains an object with the following results: Percentage
.
This function returns different attributes from a record of the FTOS_IP_InsuranceProduct entity, based on the product id.
Input parameters: productId
- The Id of the selected insurance product.
Output parameters: query
- An array that contains an object with the following results: attributeVersion
, Name
, TariffType
, ReferencedAttributeId
, and ClonedProductId
.
This function returns different attributes from a record of the FTOS_IP_PremiumCoverageSplit entity, based on the product coverage id and product formula id.
Input parameters:
-
productItemId
- The Id of the product coverage. -
productFormulaId
- The Id of the product formula.
Output parameters: query
- An array that contains an object with the following results: Name
.
This function returns different attributes from a record of the FTOS_IP_PremiumCoverageSplit entity, based on the product coverage id.
Input parameters: coverageId
- The Id of the product coverage.
Output parameters: query
- An array that contains an object with the following results: Name
, and Percentage
.
This function returns different attributes from a record of the FTOS_IP_InsuranceProductFormula entity, based on the product id.
Input parameters: productId
- The Id of the insurance product.
Output parameters:
query
- An array that contains an object with the following results: Name
.
For more details about configuring formulas, see the Business Formulas documentation and this Risk Scoring tutorial.