Fees

Fees are additional non-premium charges that can be added to the cost of the policy. They are calculated at policy finalization and renewal only; fees are not recalculated for endorsements (though they can be rescaled when the policy term is reduced; see note below).

Fees are stored at the policy level, and so (unlike premiums, taxes, and commissions) are not broken down at the peril level. The fees on an invoice can be referenced via that invoice’s Financial Transactions. Any data on the policy or associated policyholder may be used to calculate fees.

In the configuration files, The policy directory contains a file called fees.json that enumerates all fees applicable to a policy, as well as their display names. Fee calculations occur in policy.calculations.liquid. For each fee you want to add to the policy, use the filter add_fee.

Note

Upon policy cancellation, or term reduction due to endorsement, fees will be reduced prorata on a linear basis. Fees will not be increased if the term length is increased via an endorsement.

Data available in fee calculations

policy.calculations.liquid, like other liquid calculations in Socotra, has access to an object called data, which includes information about the policy and the policyholder, and for renewals, information about the renewal.

{
    "policyholder": {...},
    "policy": {...},
    "renewal": {
        "start_timestamp": long,
        "end_timestamp": long,
        "policy_modification_locator": string
    }
}

Note

Gross premium and similar numbers on the data.policy object are the totals across all coverage terms, not just the renewal term.

Example fees.json

{
  "fees": [
    {
      "name": "underwriting",
      "displayName": "Underwriting Fee"
    },
    {
      "name": "transaction",
      "displayName": "Transaction Fee"
    }
  ]
}

Example policy.calculations.liquid

{% assign policy_char = data.policy.characteristics[0] %}

{% unless data.renewal %}
  {{ policy_char.gross_premium | times: 0.03 | add_fee: "transaction", "3% Transaction fee" }}
  {{ 10 | add_fee: "underwriting", "Underwriting fee" }}
{% else %}
  {{ 100 | add_fee: "transaction", "$100 Renewal fee" }}
{% endunless %}

The description parameter is optional, so the following would also work:

{{ 10 | add_fee: "underwriting" }}