Implementing tariff lifecycle webhooks
Once the customer has completed the Connect flow, FlatPeak systems will kick in to automatically keep their tariff information up to date. If intervention is required, FlatPeak will generate an event. You shall subscribe to these events via webhooks and implement a communication flow that will inform your customers and enable them to take necessary action.
Event types
You will need to subscribe to and implement handling of the following three events:
Event | Description |
---|---|
tariff.expiring | Occurs when a contract term for the tariff will expire soon (i.e. 7 to 10 days). |
tariff.expired | Occurs when a contract term for the tariff has expired. |
tariff.fetch.failed | Occurs when a series of attempts to sync the tariff from an upstream data source have failed. For example, when a customer changes the password for their dashboard account with their energy provider, |
Building customer communication flow in your app
When your backend system receives any of the events described above, you need to inform your customer that they need to update their tariff information.
We recommend that you use the location_id
from the event and send the customer a notification to invite them to open the tariff settings page in your app. From there, they can review which tariff needs updating, launch Connect and fix the issue.