How to handle erroneous or incorrect meters sent to Amberflo
Amberflo provides an easy to use API that you can invoke to cancel a single usage event or a large set of events. The system will also take care of propagating the changes to the usage aggregations as well as to the invoicing or rewards payment systems if those are affected by the cancellation. You have the option to manually filter and remove meter events based on different properties (such as the ingestion time, or more granular like specific dimension values). See our docs for more information: https://docs.amberflo.io/docs/meter-events-cancellation .
There are two categories of issues causing incorrect meter data to be sent to Amberflo.
- System-wide issues. These are caused by data problems or bugs in the account system responsible for sending events to Amberflo. For example, a misconfiguration at the event source on 1/1 may cause all events to be ingested in an incorrect format. This error is noticed on 1/8, so the customer wants to delete all erroneous meters sent between 1/1 and 1/8, and resend the correct meters after resolving the bug.
- Incorrect single events, usually caused by unintentional or unsuccessful usage of some resource. In this case, you don't want to bill the customer for something they did not intend to use (or were unable to access), so you want to cancel any events that correspond to this unsuccessful usage.
To delete erroneous meters in bulk (in the case of a system error), Amberflo exposes a 'filering-rules' API. This API allows you to define rules for filtering out and removing sets of previously ingested meter events: https://app.amberflo.io/ingest-snapshot/custom-filtering-rules.
To cancel individual events, such as from unsuccessful usage, you can use the filtering mechanism described above to remove events by their 'unique-id'. If you do not know the 'unique-id' or have reused it for another record, you can provide certain 'resource related properties' as an alternative method. These properties allow the system to identify the resource which was erroneously accessed.
To cancel an individual event for a given resource, just send an ingest event that includes the relevent 'resource related properties' and the following dimension: "aflo.cancel_previous_resource_event" with "true" set as its value.
See related from Metering and Event Ingestion: