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". .. csv-table:: Rated events :file: /_static/ex_tables/ex_10_2_a.csv :class: bmodel-table :header-rows: 1 .. csv-table:: Line items :file: /_static/ex_tables/ex_10_2_b.csv :class: bmodel-table :header-rows: 1