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:

EventDescription
tariff.expiringOccurs when a contract term for the tariff will expire soon (i.e. 7 to 10 days).
tariff.expiredOccurs when a contract term for the tariff has expired.
tariff.fetch.failedOccurs 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,
{
  "id": "evt_66167787c1652b3fbeba5f01",
  "object": "event",
  "data": {
    "live_mode": false,
    "tariff_id": "trf_6597ef46529ab4467502af0b",
    "location_id": "loc_661677cdc31d91695fd8f33d",
    "account_id": "acc_661677911f2197045e6cf1b1"
  },
  "time_created": "2024-02-01T11:25:39Z",
  "type": "tariff.expiring"
}

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.