Standard Reporting: Technical Specification

function (Object filters, String[] reportProperties, boolean debug)

filters: Example object -> { "Inception": { "From": "2024-03-06T05:51:53.000Z", "To": "2024-03-09T05:51:53.000Z" }, "Expiry": { "From": "2024-03-06T05:51:53.000Z", "To": "2024-03-09T05:51:53.000Z" }, "Bound": { "From": "2024-03-06T05:51:53.000Z", "To": "2024-03-09T05:51:53.000Z" }, "Modified": { "From": "2024-03-06T05:51:53.000Z", "To": "2024-03-09T05:51:53.000Z" }, "Opened": { "From": "2024-03-06T05:51:53.000Z", "To": "2024-03-09T05:51:53.000Z" } }

These filters compare dates at different points of the risk. It is recommended that at least one filter is applied. The script converts the inputted child strings to ISODate and checks their associated fields in the risk.

reportProperties: This is a string array that should contain any of the following properties, it is used to determine the content of the report. If this is not defined then a default collection will run. This can be modified per-client.

  • RiskId

  • ProductCode

  • ProductName

  • PolicyholderName

  • PolicyholderAddress

  • AgentDetails

  • BrokerName

  • BrokerCompanyName

  • InceptionDate

  • ExpiryDate

  • TotalAnnualPremium

  • TotalAnnualCommission

  • TotalAdminFee

  • QuestionCode - THIS CAN BE ANY QUESTION CODE WITHIN THE PRODUCT. It will grab the answer (only for basic questions). I suggest we have a toggle field per-question in umbraco config which can define whether a question should be an option for the reporting field (defaulting to false).

debug: When true this limits the risk filter to 10 objects. It will also add a "debug" object to the output.

OUTPUT: The "Model" array is what contains all the data the excel export needs. Each entry within the "Model" array is a new row. Each child object within an object inside of the model array (Model[x]) represents a column (key) and the value associated to the risk (value).

result: { "Status": This string represents the status of the script, currently hard coded to "OK". "Model": [ { "Column": "Value" } ] }

Last updated