Policy Cancellation Journeys
Here are the journeys, entities, libraries and endpoints related to the Policy Cancellation functionality:
FTOS_INSP_PolicySurrender
This is an user journey aimed at implementing the Search Policy functionality. This journey is connected to the FTOS_INSP_PolicySurrender entity.
This journey is marked as Default for insert on FTOS_INSP_PolicySurrender entity.
The journey uses the following methods from FintechOS Client Side SDK:
After identifying the policy, when pressing Choose option, the record is saved using ebs.saveEditForm
method. The flow is redirected to the Default for Edit form driven flow of FTOS_INSP_PolicySurrender
entity, using ebs.goToUrl
method. The results grid is generated using ebs.generateGrid
method from FintechOS Client Side SDK.
From the FTOS_INS_Utils
library, the following function is used:
Function isNullOrEmpty()
- The function checks if a value is null or empty.
Input parameters: value
– The parameter that the user needs to check.
Output parameters: Bool
- The parameter returned as a Boolean value (true or false) to describe whether the input value is null or not.
The following endpoints are used for gaining access to policy data:
This endpoint searches for Policies that are eligible for the Cancellation process.
Function getFetch()
searches for Policies with the following statuses: InForce or Issued and also for the attributes that are filled in by the user on the Search Policy view - for example Policy No, First Name, Last Name, Pin, Email etc.
Input parameters: N/A.
Output parameters: N/A.
This endpoint fetches all necessary Policy related information in order to display it on the Cancellation entity.
Function getFetch(policyId)
checks whether the Policy is already subject to a cancellation flow - in its final steps, possibly initiated by some other user.
-
Input parameters:
policyId
- This is the unique identifier of a record from FTOS_INSPA_Policy entity. -
Output parameters: returns an array of the Cancellations that are in status Rejected or Cancelled on the specified Policy.
Function getLastPaymentDate(policyId)
returns the list of Installments on the specified Policy, ordered by dueDate ascendant.
-
Input parameters:
policyId
- This is the unique identifier of a record from FTOS_INSPA_Policy entity. -
Output parameters: N/A.
This endpoint retrieves the necessary information, from the chosen Policy, that corresponds with the business conditions mandatory for executing the Cancellation process.
This is an user journey aimed at implementing the updates occurring during the Policy Cancellation flow. This journey is connected to the FTOS_INSP_PolicySurrender
entity.
This journey is marked as Default for insert on FTOS_INSP_PolicySurrender
entity. The journey uses the following functions:
Function | Input parameters | Output parameters |
---|---|---|
initializedValues() Sets all the attributes on required level. |
N/A. | N/A. |
setPaymentBeneficiaryData() Fills the Payment Beneficiary section with information based on the payment beneficiary Type selected by user. |
N/A. | N/A. |
makeFieldsReadonly() Makes all the fields Read Only. |
N/A. | N/A. |
updateSurrenderData() Updates specific data of the Cancellation process. |
changedFieldName - The name of the field that is changed. |
N/A. |
showHideByStatus() Shows/ hides tabs based on the Cancellation status. |
N/A. | N/A. |
setPremiumReturnedTabData() Fills the Premium Returned tab with data. |
N/A. | N/A. |
From the FTOS_INS_Utils
library, the following function is used:
Function: isNullOrEmpty()
- The function checks if a value is null or empty.
Input parameters: value
– The parameter that the user needs to check.
Output parameters: Bool
- The parameter returned as a Boolean value (true or false) to describe whether the input value is null or not.
The following endpoints are used for gaining access to Policy data.
This endpoint matches an IBAN account to a certain Bank. It calls an on demand server side script named FTOS_INSP_PolicySurrender_BankIdentification
.
Input parameters: iban
- IBAN value, filled in by the user.
Output parameters: FTOS_PYMT_Bank record id
- The unique identifier of a record from FTOS_PYMT_Bank entity.
This endpoint checks whether the Policy is subject to a Claim flow or not. If true, the endpoint flags the Policy to inform that a Claim flow is used on the environment. The endpoint calls an on demand server side script named FTOS_INSP_PolicySurrenderClaimUsed
.
This endpoint extracts data from FTOS_DFP_FlowSettings
entity. It calls an on demand server side script named FTOS_DFP_FlowProcessorSettingsByType
.
Input parameters:
-
flowSettingsName
- The name of the flow setting. -
processorSettingsType
- The type of the processor setting. -
processorSettingsName
- The name of the processor setting.
Output parameters: N/A.
This endpoint changes the status of the policy record, after applying validation. It calls an on demand server side script named FTOS_INSP_PolicySurrenderStatusChange
.
Input parameters:
-
surrenderId
– Id of the cancellation record, fromFTOS_INSP_PolicySurrender
entity. -
newStatus
– Displays name of the new business status. -
returnedMoney
– Amount to be paid back to the policy holder. -
reasonType
-The reason type for the policy cancellation. -
policyId
- Id of the policy that is subject to cancellation. -
finalEndDate
– Final date for policy termination. -
premiumAmount
– The Premium for that Policy. -
areClaimsOnPolicy
– checks whether the cancellation is pending due to claims opened on the Policy. -
resolutionReason
- the resolution regarding the Policy cancellation.
Output parameters: N/A.
This endpoint makes inserts into the FTOS_PYMT_Payment
and FTOS_INSP_Payment
entities, based on certain conditions. Also, this endpoint changes the FTOS_INSPA_Policy
status in accordance with the reasonType picked by the user during the Cancellation process. The endpoint calls an on demand server side script named FTOS_INSP_PolicySurrenderInsertInPayment
.
Input parameters:
-
surrenderId
– Id of the cancellation record, from FTOS_INSP_PolicySurrender entity. -
newStatus
– Displays the name of the new business status.
Output parameters: N/A.
This endpoint makes the necessary updates on a FTOS_INSP_PolicySurrender
record, when Surrender Notification Date, Reason Type, Requested End Date or Final End Date fields values are changed. It calls an on demand server side script named FTOS_INSP_PolicySurrenderUpdateUserJourney
.
Input parameters:
-
reasonType
– Id of the selected reason type. -
changedFieldName
– Name of the attribute that changed its status.
Output parameters: N/A.
This endpoint retrieves data from the Account entity, about the beneficiary of the payment in order to populate the following virtual attributes Payment Beneficiary Last Name, Payment Beneficiary First Name, Payment Beneficiary PIN. The endpoint calls an on demand server side script named FTOS_INSP_GetAccountData
.
Input parameter: accountId
– The Payment Beneficiary id attribute values.
Output parameters: data object from the Account table, with the following keys Email, FirstName, FullName, LastName, MobilePhone, UniqueID, a_Accountid, clientCode.
This endpoint deletes Cancellation processes after X days if their status is still In Progress. It changes the business status to Cancelled.
Input parameters: N/A.
Output parameters: N/A.
This endpoint updates the Resolution Reason attribute according to the values introduced for the custom virtual attributes. It uses the FTOS_INSP_PolicySurrender
library.
Input parameters:
-
id
- The unique identifier of the record. -
resolutionReasonV1
- The resolution reason selected by the user on the Change Request step (by using the FTOS_INSP_PolicySurrenderUpdate form). -
resolutionReasonV2
- The resolution reason selected by the user on the Premium Returned step (by using the FTOS_INSP_PolicySurrenderUpdate form). -
resolutionReasonV3
- The resolution reason selected by the user on the Request Approval step (by using the FTOS_INSP_PolicySurrenderUpdate form).
Output parameters: N/A.
Before: from Draft to In Progress – this script verifies that the reasonType
attribute is filled in.
After: from In Approval to Approved – this script verifies that the finalEndDate
and premiumAmount
attributes are updated on the FTOS_INSPA_Policy
entity, based on the reason type selected on the FTOS_INSP_PolicySurrender
entity.
Here are the libraries for the functions performed on the server:
From this library, the following function is used: getFlowProcessorSettingsByType
.
From this library, the following functions are used:
Function | Input parameters | Output parameters |
---|---|---|
findObjectByKey() Finds an object by keys and values. |
array - An array with the object .key - The key used for search (string).value - The value used for search. |
array - An array with all the resulting elements. |
getIntegrationByCode()
Gets the FTOS_IntegrationProcessid by the |
code - The code attribute from FTOS_IntegrationProcess. |
rez - The result of the query made in the function. |
getPolicyAccounts()
Gets information about all the Accounts from the Policy entity. |
policyId - The uniqueidentifier of a record from the Policy entity. |
policyData - An array with all the information detected. |
getAccountDataById()
Gets the id information for the Accounts. |
accountId - The unique identifier from the Account entity. |
rez - The result of the query made in the function. |
getAccountDataByCode()
Performs similar action as above but the subject key for the search is the code. |
clientCode - The unique identifier from clientCode attribute in Account entity. |
rez - The result of the query made in the function. |
insertUpdateClient()
Checks if the account id exists already, if not a new registration is made. |
accountId - The unique identifier from the Account entity.
|
accountId and newAccountId |
From this library, the following functions are used:
Function | Input parameters | Output parameters |
---|---|---|
treatAsUTC() Formats a date to UTC time zone. |
date - The date that needs to be formatted. |
result - The date in UTC time zone. |
dateDiffInDays()
Calculates the difference (in days) between 2 dates. |
d1 - Date 1.d2 - Date 2. |
dateDiffInDays - The result of the difference. |
monthDiff()
Calculates the difference (in months) between 2 dates. |
d1 - Date 1.d2 - Date 2. |
months - The result of the difference. |
getSurrenderDetails()
Gets all the infromation from a cancellation based on the entity id. |
entityId - The cancellation entityId, unique identifier of the FTOS_INSP_PolicySurrender entity. |
queryResult - The result of the query made in the function. |
getUPRContractual()
Gets the UPR (unearned premium) and contractual values. |
N/A. | uprDays - Parameter from FTOS_DFP_ProcessorSettings entity.contractualdays - Parameter from FTOS_DFP_ProcessorSettings entity. |
setChangeDateValue()
Updates the FTOS_INSP_PolicyChange entity with information about the changed values. |
dateValue - The changeDate value.surrenderDetails - An array with details from the Cancellation entity. |
N/A. |
changeDateRules()
Calls also the setChangeDateValue(dateValue, surrenderDetails) function and makes updates. |
surrenderDetails - An array with details from Cancellation entity.contractualDays - Parameter from FTOS_DFP_ProcessorSettings entity. |
N/A. |
withdrawBehavior()
Sets the withdrawal reason type to Withdrawal. |
surrenderDetails - An array with details from Cancellation entity.updateObj - An object with updates.contractualDays - Parameter from FTOS_DFP_ProcessorSettings entity. |
updateObj - An object with updates. |
otherReasonBehavior()
Sets the withdrawal reason type to Other Reason. |
surrenderDetails - An array with details from Cancellation entity.updateObj - An object with updates.contractualDays - Parameter from FTOS_DFP_ProcessorSettings entity. |
updateObj - An object with updates. |
companySurrenderBehavior()
Sets the withdrawal reason type to Company Surrender. |
surrenderDetails - An array with details from Cancellation entity.updateObj - An object with updates.contractualDays - Parameter from FTOS_DFP_ProcessorSettings entity. |
updateObj - An object with updates. |
changeDateRulesRequestedEndDateChanged()
During the Cancellation flow, when the reason type attribute is changed other attributes may be affected, for example the change date. This function sets the rules for change date attribute due to reason type changes. |
surrenderDetails - An array with details from Cancellation entity. |
N/A. |
onChangeLogic()
Sets the logic from changes made in Cancellation flow. |
changedFieldName - The name of the attribute that is changed. |
N/A. |
updateSurrender()
Updates the cancellation flow. |
entityId - The unique identifier from FTOS_INSP_PolicySurrender entity.reasonType - The selected the reason type. |
N/A. |
updateResolutionReason()
Updates the resolution reason attribute with the values from the custom virtual attributes used on different steps of the Cancellation flow. |
id - The unique identifier of the record.resolutionReasonV1 - The resolution reason selected by the user on the Change Request step.resolutionReasonV2 - The resolution reason selected by the user on the Premium Returned step.resolutionReasonV3 - The resolution reason selected by the user on the Request Approval step. |
N/A. |
FTOS_INSP_PolicySurrender runs daily at 12:00 PM and uses the FTOS_INSP_PolicySurrenderDeleteSurrenders
endpoint.
FTOS_CLAIM_MainStyle
FTOS_INSP_Payment
This is an user journey aimed at storing the data about payments made through the Policy Cancellation process. This journey is marked as Default (for insert) on FTOS_INSP_Payment
entity. The journey uses the following functions:
Function | Input parameters | Output parameters |
---|---|---|
approvedHide() Makes the selected attributes hidden. |
N/A | N/A |
showPaymentData()
Shows the payment data area. |
N/A | N/A |
fillPolicyDetails() Gets data from the Policy entity based on policyId. |
policyId - The unique identifier of a record from FTOS_INSPA_Policy entity. |
N/A |
setPaymentBeneficiaryData()
Fills the Payment Beneficiary section with payment information based on the payment beneficiary Type selected by user. |
N/A | N/A |
formScope.setPaymentBeneficiaryReadOnly()
Makes the selected attributes Read Only. |
N/A | N/A |
formScope.showDefaultValuesPaymentBeneficiary()
Populates the Payment Beneficiary section with default details, based on the payment beneficiary Type. |
paymentBeneficiary - The beneficiary of the payment.
policyId - The unique identifier of a record from FTOS_INSPA_Policy entity. |
N/A |
-
From the FTOS_GLUsed library, the following function is used:
Function
showGL()
- The function shows the GL (General Ledger) tab.Input parameters:
step
- The step where the GL tab is available.Output parameters: N/A.
-
From the FTOS_INS_Utils library, the following function is used:
Function
setAttributesReadonly()
- The function sets the input attributes to Read Only.Input parameters:
attribute list
- The list of attributes.Output parameters: N/A.
The following endpoints are used for gaining access to Policy data:
FTOS_INSP_validatePaymentReturn
- Validates if a Payment is ready to be returned.
FTOS_PYMT_Payment_ReturnUnallocatedAmount
- This endpoint uses the FTOS_PYMT_PaymentReturn
library to return an Unallocated Amount on a Policy.
From the FTOS_PYMT_PaymentReturn
library, the following functions are used, in the return flow:
Function | Input parameters | Output parameters |
---|---|---|
generateReturn()
|
policyId - The unique identifier of a record from FTOS_INSPA_Policy entity.type - The type of the payment.paymentTypename - The name of the payment type. |
newPaymentId - The unique identifier of the new payment insertion. |
getPaymentsToReturnByPolicy()
Retrieves data about all unsettled payments, with status different than Paid or Closed. |
policyId - The unique identifier of a record from FTOS_INSPA_Policy entity. |
result - An array with the results. |
getPaymentDetails()
Gets all the details from a specified payment. |
paymentId - The unique identifier of a record from FTOS_INSP_Payment entity. |
payment - An array with the payment details. |
getPaymentTypeIdByName()
Gets the payment type id by searching for the payment type name. |
paymentTypeName - The name of the payment type. |
paymentTypeId - The unique identifier of a record from the Payment Type optionset. |
insertPaymentReturn()
Inserts the payment return. |
policyId - The unique identifier of a record from FTOS_INSPA_Policy entity.paymentDetails - The details of the payment.returnPaymentAmount - The amount of the payment.returnCurrencyId - The id of the currency.type - The type of the payment.sourcePaymentId - The id of the payment source.paymentTypeName - The name of the payment type. |
result - An array that contains the insertPaymentPymt and insertInPayment IDs. |
getBankId()
Gets the FTOS_PYMT_Bank id. |
bankCode - The code of the bank. |
bankId - The unique identifier of a record from FTOS_PYMT_Bank entity. |
getAllPaymentsDetails()
Gets specific details about the payment. |
returnDate - The date of the return.paymentId - The unique identifier of a record from FTOS_INSP_Payment entity. |
payments - An array with the details about the payment. |
returnUnallocatedAmount()
Returns the unallocated amount. |
paymentId - The unique identifier of a record from FTOS_INSP_Payment entity.paymentTypeName - The name of the payment type |
insertPaymentReturnResult - An object with keys from FTOS_INSP_Payment. |
The FTOS_PYMT_Payment_ReturnUnallocatedAmount
job uses FTOS_PYMT_Payment_ReturnUnallocatedAmount
endpoint.
FTOS_CLAIM_MainStyle