Proposal Configurator Endpoints
The list of endpoints used by the demo Quote Property flow, developed to demonstrate how to interact with the server side libraries included in the Proposal Configurator digital asset.
FTOS_INSQB_GetDNTAvailableQuestions
: This endpoint is used to get the DNT questions based on the insuranceTypeId
, quoteConfigId
, quoteId
. It calls the getAvailableQuestions
function from the DNTManagementUtils_New
server side library to identify the questions and then uses the getQuestionInformation
, getQuestionAnswers
and getDefaultOrSelectedQuestionAnswers
functions from the same library to prepare the final result.
It returns an array of objects containing the following keys (for each question):
-
questionInfo - Object return by
getQuestionInformation
; -
quoteConfigId - ID of the quote config;
-
answers - Array returned by
getQuestionAnswers
; -
initialResponse - Object returned by
getDefaultOrSelectedQuestionAnswers
.
FTOS_INSQB_SaveDNTAnswers
: This endpoint is used to save the answers provided to the DNT question. If it receives the quoteId
as an input parameter and uses the saveDNTAnswears
function from the DNTManagementUtils_New
server side library.
FTOS_INSQB_GetConfiguredCards
: This endpoint is used to get the cards identified by the provided answers. It receives the ID of a quote property and calls the getCardsInformationForDisplay
and getCardItemsByCardId
functions from FTOS_IP_PersonaManagement
.
FTOS_INSQB_SelectFinalCard
: This endpoint is used to mark the quote version related to the selected card as the final quote (isFinalQuote
= true).
FTOS_IP_CardItem_GetDetails
: This endpoint is used to get the details of the formula attached on product level, if the tariff type is per product, or on product item level, if the tariff type is per coverage.
FTOS_IP_CardItem_CheckTariffType
: This endpoint is used to get the tariff type, per coverage or per product, for a product.
FTOS_IP_UpdateDetailsJSONOnQuoteConfigs
: This endpoint is used to update the configJSON
object for all quote config records.
FTOS_IP_Card_CheckIsEditableStatus
: This endpoint verifies if the card business status is editable or not.
FTOS_IP_Card_GetDetails
: Thie endpoint gets the card details: Card Name, BusinessStatusId, Card Type, ProductId.
FTOS_IP_CardItem_GetInfo
: This endpoint gets the card item details.
FTOS_IP_ApprovePendingCards
: This endpoint approves all the pending cards having the effective date less or equal than the current date.
The following server side script libraries are used in Proposal Configurator.
This library contains functions used to check the configuration added is correct. The following functions are available.
checkExistingCardInsurancePersonaCard(insurancePersonaCardId, insurancePersonaId, cardId)
: This function checks if a card is already linked to an insurance persona, when adding or updating a card on an insurance persona (insures uniqueness on the combination insurancePersonaId
and cardId
).
Input parameters:
-
insurancePersonaCardId - ID of the current record being added/updated;
-
insurancePersonaId - ID of the insurance persona for which we are searching the allocations;
-
cardId - ID of the card we are searching for.
Output parameters:
-
N/A
setNewHighlightedInsurancePersonaCard(insurancePersonaCardId, insurancePersonaId)
: This function marks all the cards assigned on an insurance persona and not being highlighted, with the exception of the current insurancePersonaCardId
, sent as a parameter.
Input parameters:
-
insurancePersonaCardId - ID of an insurance persona card record that is the new highlighted one; this record will not be updated;
-
insurancePersonaId - ID of the insurance persona for which we are searching cards allocations.
Output parameters:
-
N/A
checkExistingVersionCardItemConfigXVersion(cardItemConfigXVersionid, cardItemConfigId, versionId)
: This function checks if a card version is already linked to a card item config, when adding or updating a version. It insures uniqueness on the cardItemConfigId
and versionId
combination.
Input parameters:
-
cardItemConfigXVersionid - ID of the current record being added/updated;
-
cardItemConfigId - ID of the card item config for which we are searching the allocations;
-
versionId - ID of the version of the card we are searching for.
Output parameters:
-
N/A
setNewDefaultCardItemConfigVersion(cardItemConfigXVersionid, cardItemConfigId)
: This function marks all card versions allocated on a certain card item config as not being default, with the exception of the current cardItemConfigXVersionid
, sent as a parameter.
Input parameters:
-
cardItemConfigXVersionid - ID of a card item configuration x version record that is the new default one; this record is not updated;
-
cardItemConfigId - ID of the card item config for which we are searching allocations.
Output parameters:
-
N/A
checkStatusIsEditable(businessStatusId)
: This function checks if a businessStatusId
given as an input is editable.
Input parameters:
-
businessStatusId - ID of the business status.
Output parameters:
-
N/A
getCardDetails(cardId)
: This function returns the card details (Card Name, BusinessStatusId, Card Type, ProductId).
Input parameters:
-
cardId - ID of the card.
Output parameters:
-
Query results.
getCardLastApprovedVersion(masterAttributeId)
: This function returns the last approved version.
Input parameters:
-
masterAttributeId - ID of the master attribute
Output parameters:
-
Query result.
approvePendingCards(cardId)
: This function changes the business status to Approved for the pending cards having the effective date less or equal to the current date.
Input parameters:
-
cardId - ID of the card.
Output parameters:
-
N/A
getProductDetails(productId)
: This function returns the product details.
Input parameters:
-
productId - ID of the product.
Output parameters:
-
Query results.
effectiveDateCurrentDateValidation(effectiveDate): This function throws an error if the effective date is less than the current date.
Input parameters:
-
effectiveDate - the date when the new version created can be active (available in the system).
Output parameters:
-
N/A
effectiveDateIpEndDateValidation(effectiveDate, insuranceProductEndDate)
: This function throws an error if the effective date is grater than the insurance product end date.
Input parameters:
-
effectiveDate - the date when the new version created can be active (available in the system);
-
insuranceProductEndDate - insurance product end date.
Output parameters:
-
N/A
getInsuranceProductFormulaDetailsByCardId(cardId)
: This function returns the Insurance Product Formula details.
Input parameters:
-
cardId - ID of the card.
Output parameters:
-
Query results.
getProductTariffTypeByCardItem(cardItemId)
: This function returns a list with only one tariff type that was found for a product with a specific ID associated to a card item ID.
Input parameters:
-
cardItemId - ID of the card item.
Output parameters:
-
List with the product tariff type.
getProductTariffType(productId)
: This function returns a list with only one tariff type that was found for a product with a specific ID.
Input parameters:
-
productId - ID of the insurance product.
Output parameters:
-
List with the product tariff type.
validateProductTariffTypeByCardItem(cardItemId)
: This function returns an object that will contain the tariff type set on a specific insurance product associated to a card item ID.
Input parameters:
-
cardItemId - ID of the card item.
Output parameters:
-
validationObj - object containing the tariff type.
validateProductTariffType(productId)
: This function returns an object that contains the tariff type set on a specific insurance product.
Input parameters:
-
productId - ID of the insurance product for which the tariff type will be returned.
Output parameters:
-
validationObj - object containing the tariff type.
getInsuranceProductItemFormulaDetails(cardItemId)
: This function returns the information about the formula attached on the product item level.
Input parameters:
-
cardItemId - ID of the card item.
Output parameters:
-
Query results.
getInsuranceProductFormulaDetails()
: This function returns the information set on the card item input params processor from the Proposal Configurator flow settings.
Input parameters:
-
N/A
Output parameters:
-
Array with objects defined on the card item input params processor.
getCardItemDetails(cardItemId)
: This function returns the card item details.
Input parameters:
-
cardItemId - ID of the card item.
Output parameters:
-
Query results.
Library containing functions used to read data from the Proposal Configurator entities. These functions are listed below.
getMatchedInsurancePersona(mainEntityName, mainEntityId)
: This function is used to identify the insurance persona based on the provided answers. It identifies all the insurance persoanas included in the quote config selected in the quote. For each insurance persona, the function checks if the mainEntityId
record is in the audience or in the segment attached to the insurance persona.
Input parameters:
-
mainEntityName - name of the entity extending the Quote entity.
-
mainEntityId- id of a record from mainEntityName.
Output parameters:
-
matchedInsurancePersonaId - unique identifier, ID of the insurance persona idenfied or null.
getCardsByInsurancePersonaId(insurancePersonaId)
: This function is used to get all the cards configured for a specific insurance persona.
Input parameters:
-
insurancePersonaId - ID of the insurance persona to search for.
Output parameters:
-
cardArray - array of objects containing details about the cards, with the following keys:
cardId
,displayname
,code
,isHighlighted
,personaCardOrder
.
insertVersionRelatedRecords(mainEntityName, mainEntityId)
: This function calls the previously mentioned functions in order to calculate the premium amount for each card:
-
evaluates the responses provided to the DNT questions and determines the insurance persona
-
reads all the cards defined for an insurance persona and saves the details for each in the FTOS_INSQB_QuoteVersion entity, without having the premium amount calculated yet
-
gets the card items for each card and calculates the premium for each card item, saving the results in FTOS_INSQB_QuoteVersionItem entity
-
updates the total premium on each quote version record , previously inserted
Input parameters:
-
mainEntityName - name of the entity extending the Quote entity.
-
mainEntityId - ID of a record from mainEntityName.
Output parameters:
-
N/A
getCardsInformationForDisplay(mainEntityName, mainEntityId, customConditionList)
: This function returns details about the cards, including premium details saved in the Quote Version entity and information about all the premiums calculated for each card version.
Input parameters:
-
mainEntityName - name of the entity extending the Quote entity;
-
mainEntityId - ID of a record from mainEntityName;
-
customConditionList - additional conditions used to filter the details.
Output parameters:
-
cardDisplayInformation - array of objects containing the following keys:
Copy[{
"quoteVersionId": "18363122-4670-44a8-a04b-3a4f5e9d77f1",
"code": "D",
"displayName": "COMPLETE",
"premiumAmount": 134.66,
"currencyName": null,
"isHighlighted": false,
"orderIndex": 3.0,
"cardId": "0955c095-eeac-447a-a7c8-5151280dc5f6",
"isFinalQuote": true,
"cardItemDisplayInformation": [CardItemVersion1, CardItemVersion2]
}]where CardItemVersion =
Copy{
"quoteVersionItemId": "00564575-64c9-4ebc-aefd-3a81b9f32f37",
"insuranceOptionList": [
{
"insuranceOptionName": "option1",
"sumInsured": null,
"premiumAmount": 115.2,
"isSelected": true,
"orderIndex": 1.0
},
{
"insuranceOptionName": "option3",
"sumInsured": null,
"premiumAmount": 384.0,
"isSelected": false,
"orderIndex": 3.0
},
{
"insuranceOptionName": "option2",
"sumInsured": null,
"premiumAmount": 288.0,
"isSelected": false,
"orderIndex": 2.0
}
],
"displayName": "Content",
"isActive": true,
"icon": null,
"descriptionHTML": null,
"description": null,
"orderIndex": 2.0
}
getCardItemsByCardId(cardId)
: This function is used to get all the card items (all the coverages) from a card.
Input parameters:
-
cardId - if of the card for which we are searching for items.
Output parameters:
-
cardItemArray - array of objects describing a card item, with the following keys:
cardItemId
,code
,displayName
,icon
,descriptionHTML
,description
,isActive
,cardItemOrder
,insuranceProductId
,insuranceItemId
.
This library contains a set of functions used by the quote flow to interact with the Proposal Configurator settings. The functions are described below.
getAvailableQuestions(insuranceTypeId, quoteConfigId, quoteId)
: This function returns all the DNT questions included in a quote config.
Input parameters:
-
insuranceTypeId – ID of an insurance type used when searching for questions;
-
quoteConfigId – ID of a quote config used when searching for questions;
-
quoteId – ID of a Quote record from where the search started.
Output parameters:
-
questions - array of elements containing the following keys:
questionId
,configCode
,quoteConfigId
.
getQuestionInformation(questionId)
: This function used to get details about a DNT question.
Input parameters:
-
questionId – ID of a DNT question.
Output parameters:
-
questionInfo - object containing the following keys:
questionId
,name
,description
,tooltip
.
getQuestionAnswers(questionId)
: This function is used to get the available answers for a DNT question.
Input parameters:
-
questionId - ID of a DNT question.
Output parameters:
-
questionInfo - array of object containing the following keys:
answerId
,name
,code
,description
,isDefault
.
getDefaultOrSelectedQuestionAnswers(questionId, quoteId, answerList)
: This function is used to identify is a certain answer is default of if an answer was already provided for a question.
Input parameters:
-
questionId - id of a DNT question
-
quoteId - if of the quote from where the search started;
-
answerList - list of available answers for a DNT question, as returned by
getQuestionAnswers
; if this parameter is not provided, the function callsgetQuestionAnswers
to identify the list of answers.
Output parameters:
-
questionInfo- array of object containing the following keys:
answerId
,name
,code
,description
,isDefault
; -
choosedAnswer - object containing the following keys :
answerId
- the answer that will be automatically displayed,isDefault
- if the answer is the default one, than it cannot be changed.
saveDNTAnswears(quoteId, dntResponses)
: This function is used to save the answers to the DNT question in the Question Provided Answer entity. Before saving the answers, it also deletes any other previously provided answers.
Input parameters:
-
quoteId - if of the quote for which we are saving the responses;
-
dntResponses - array of object containing the
questionId
andanswerValue
keys; answer value can be either true or false.
Output parameters:
-
N/A
This library contains general functions used to check if the values are null, to validate a certain format of a date, and to validate different option set item names. The functions are described below.
FTOS_IP_ProposalConfigPremiumCalculationAPI
getQuoteConfigByCard(cardId)
: This function returns data from the Quote Config entity using the ID of the card.
Input parameters:
-
cardId - the ID of the card.
Output parameters:
-
query - Array that contains an object with the following results:
-
FTOSIPQuoteConfigId.
-
updateConfigJSON(quote)
: This function updates the JSON object from the Quote Config entity, using the ID of the quote config.
Input parameters:
-
quote - the ID of the quote config.
Output parameters:
-
N/A