Policy Claim Data API
The Policy Claim Data API is used to log the policy claim data into the system.
Server Automation Script
FTOS_INSPA_AddClaimFilesLog
: This script is called with an object as data and calls the checkObjectFieldsAndInsert
function from the FTOS_INSPA_AddClaimFilesLogLibrary
server automation script library.
An example of calling the function is given below:
let p = {
callDate: '2022-01-14',
callSource: 'https://www.testexample.com/',
callUser: 'TestUser',
policyNo: '80001379',
claimFileNo: '00001',
lossDate: '2022-01-10',
occuredRisk: 'Personal Accident',
affectedCoverage: 'Death by accidents',
currentReserve: '5000',
currentIndemintyPaid: '0',
currency: 'EUR',
claimNotificationDate: '2022-01-12',
claimFileStatus: 'Test lorem ipsum'
};
ebs.callActionByNameAsync("FTOS_INSPA_AddClaimFilesLog", p)
.then(
function(e){
console.log(e.UIResult)
}
);
Endpoint
FTOS_INSPA_AddClaimFilesLog
: This endpoint is used to run the FTOS_INSPA_AddClaimFilesLog
server automation script.
The request data parameters for this endpoint are given below:
Parameter |
Description |
---|---|
callDate |
The date when the call was made. |
callSource |
The source from where the endpoint was called. |
callUser |
The user name of the person who calls the endpoint. |
policyNo |
The policy number. |
claimFileNo |
The claim file number. |
lossDate |
The loss date. |
occuredRisk |
The occurred risk. |
affectedCoverage |
The affected coverage. |
currentReserve |
The current reserve. |
currentIndemintyPaid |
The current indemnity paid. |
currency |
The currency. |
claimNotificationDate |
The claim notification date. |
claimFileStatus |
Message (optional). |
The response is given below:
{
"isSuccess": true,
"errorMessage": null,
"errorCode": null,
"result": "Call sent sucessfully!"
}
Response description:
Key |
Description |
---|---|
isSuccess |
Marks if the request was successful or not |
Error code |
Error code |
Error message |
Error message |
Result |
Null or a confirmation message returned as response for the API call |
The following are the error messages that could be encountered in the policy claim data.
Code |
Text |
Description |
---|---|---|
IP-30107 |
IP-30107 - Empty field!
|
The field ' (dynamic variable) ' cannot be empty!(IP-30107)
|
IP-30108 |
IP-30108 - Invalid policy number! |
There is no policy with the "(dynamic variable for policy number)" number!(IP-30108)! |
IP-30109 |
IP-30109 - Invalid currency! |
The "currency" field is invalid!(IP-30109) |
IP-30110 |
IP-30110 - Invalid "affectedCoverage"! |
'The "affectedCoverage" field is invalid!(IP-30110) |
IP-30111 |
IP-30111 - Invalid "occuredRisk"! |
The "occuredRisk" field is invalid!(IP-30111) |
Server Automation Script Library
This library contains a main global function called (AddClaimFiles)
which uses different functions to insert a new policy claim log details received as an API call. The (AddClaimFiles)
contains the functions presented below and returns them as methods from an object. Beside the functions returned as methods there is another one function(“getRisk”)
which is used to get/check the risk associated with the coverage. The functions can be found on the FTOS_INSPA_AddClaimFilesLogLibrary
. The object construction is:
{
checkObjectFieldsAndInsert: checkObjectFieldsAndInsert,
getClaimFilesUpdate: getClaimFilesUpdate,
getCoverage: getCoverage,
getPolicy: getPolicy,
getCurrencyId: getCurrencyId
}
The (AddClaimFiles) functions are given below:
Function | Input parameters | Output parameters |
---|---|---|
checkObjectFieldsAndInsert(obj);
This function performs all the checks for the object properties and inserts a new log into the |
obj - (object) - The object received from the API call. |
N/A |
This function checks if the “FTOS_INSPA_ClaimFilesUpdate" entity already contains an entry with the “coverageId", “policyId" and “claimNo" attributes from the param object. |
|
Or null. |
This function checks if the |
|
Or null. |
This function checks if the |
|
Or null. |
This function checks if the |
|
Or null. |
This function checks if the |
|
Or null. |