Reminders
Socotra’s product configuration supports the registration of “reminders” to alert of impending events. Configuring a reminder will result in “reminder events” written into the Event Stream at the appropriate points in time.
At this time, Socotra supports reminders for when policies are about to end.
Behavior
Reminders will be created for an object as soon as it meets the criteria for them. If an object is modified so that it once again meets the criteria for a reminder that has already been sent, a new reminder will be sent. For example, if a reminder event is sent for a policy and the insurer responds by renewing the policy for one year, another reminder event will be sent one year later, ahead of the new end time.
The effects of configuring a new reminder, updating an existing reminder, or removing an existing reminder apply immediately to all existing and new objects.
Note
Deleting a reminder from the policy.json
configuration will NOT delete any reminder events that have already been sent.
Configuration
Reminders can be configured in /products/{productName}/policy/policy.json
. Their configuration has four parts:
name
, an identifier unique within the product. This name will appear in the event data.offset
: Determines how far ahead of time the reminder should be sent. Currently, supported values are between 1 and 1000 days.from
: Determines what triggers the reminder. The only option currently supported is “policy.end”enabled
: A reminder will only be sent if this is set totrue
. This field is optional and defaults totrue
. Currently, only one configured reminder can be enabled at any time.
Example policy.json Section
{ // Optional "reminders": [ { "name": "example1", "offset": "-1d", "from": "policy.end" }, { "enabled": false, "name": "example2", "offset": "-7d", "from": "policy.end" } ] }
This will result in reminder events labeled “example1” sent twenty-four hours before every policy’s effective contract end timestamp. If “enabled” is set to “false” for “example1” and “true” for “example2”, then the one day events will stop firing, and reminder events labeled “example2” will start being sent seven days before each policy ends.