Rated events

What are rated events?

The rated document produced within the context of a single event is a rated event. The amount is calculated by pulling the pricing from the related contract and multiplying it by the quantity pulled from the event properties. Within bframe, they are used by line items to calculate usage based products.

Why are rated events important?

In isolation, rated events are most useful in regards to internal and external visibility. Due to the nature of each event being rated, numerous cuts of the data can be generated to aid in analysis or comprehension. Looking to understand how much revenue was generated in a single hour? It is impossible to gather just by looking at an aggregated line item. Instead, a viable method would be to query rated events with a fitler based on this time range.

How are rated events modeled?

A single event can have multiple rated events associated with it. This is possible due to the potential for a customer to have multiple contracts or multiple products on a single contract that overlap in usage metrics. Within the context of customers, service periods, and products; rated events can be summed up directly to create line items or potentially an invoice.

For a product like the creation feature on the Wikipedia platform, rated events will have a quantity, price and amount. Each of these will be added up to generate a line item for the same time period. This is demonstrated in the example below for the customer “Papergirl”.

Rated events

rated_events.customer_id

rated_events.transaction_id

rated_events.properties

rated_events.metered_at

rated_events.received_at

rated_events.product_uid

rated_events.quantity

rated_events.price

rated_events.amount

products.name

Papergirl

1716009824.0Hotel_Roter_Hahn,_Vienna_(postcard).jpg

{“name”:”create”,”agg_value”:312.0,”category”:”Cultural_heritage_monuments_in_Austria_with_known_IDs”}

2024-05-18 06:00:00

2024-05-18 06:00:00

2

312.000

0.05

15.600000

Creates

Papergirl

1716189469.0Grave_of_Ernst_and_Anna_Plischke,_Vienna,_2024_(4).jpg

{“name”:”create”,”agg_value”:1728.0,”category”:”Modern_art”}

2024-05-20 08:00:00

2024-05-20 08:00:00

2

1728.000

0.05

86.400000

Creates

Line items

products.id

products.name

line_items.quantity

line_items.amount

line_items.status

line_items.contract_id

line_items.started_at

line_items.ended_at

2

Creates

2040.0

102.0

DRAFT

Papergirl_contract

2024-05-01 00:00:00

2024-06-01 00:00:00