Rating¶
What is rating?¶
Rating is the process of assigning monetary amounts to usage. The rating formula is:
Price x Quantity = Amount
Price originates from configuration and provisioning. Quantity, also known as usage, originates from metering. The rating process involves multiplying these two inputs to obtain an amount, also known as the total. Generating the amount can be considered the end output of the business model.
The amount can have different context or granularity associated with it. A rated event, is within the context of an event and only represents a single point in time. A line item, is within the context of a product and represents the time period associated with the provisioned product. An invoice, is within the context of a contract and represents the time period associated with the contract itself. Each of these documents can be used for different purposes and make up the output of the business model.
Why is rating important?¶
Rating is important because it creates the documents which track how much revenue the business has generated. These documents are used as a standardized output that can be compared internally and externally. How is a business, product or function doing? Revenue and sales are often the starting point for comparisons.
Normalization is one of the central goals of a business model. Divergent usage metrics, customers and contracts all come together under rating. Invoices and line items are consistently used for automating business administration. Accounting ledgers, customer billing and quoting are just a few examples that can use the outputs of rating.
How is rating modeled?¶
Rating is modeled using three different revenue documents: rated events, line items and invoices. Depending on the pricing method, each document can depend on the on the one before it. For example, an invoice total will be the sum of several line items.
This isn’t always true, since pricing can occur at any document level. For example, a fixed price doesn’t depend on any events. To get a better idea of what these documents look like the following is a sample of each type for the customer “Lupe”.
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 |
---|---|---|---|---|---|---|---|---|---|
Lupe |
1714725666.0Women_and_men_in_northern_Rwanda_work_on_a_public_works_site,_building_terraces_to_prevent_soil_erosion_(8379227773).jpg |
{“name”:”update”,”agg_value”:3.0,”category”:”Images_from_Wiki_Loves_Africa_2021”} |
2024-05-03 09:00:00 |
2024-05-03 09:00:00 |
1 |
3.000 |
0.10 |
0.300000 |
Updates |
Lupe |
1714728510.0Hemiphyllodactylus_hongkongensis_177298767.jpg |
{“name”:”create”,”agg_value”:1448.0,”category”:”INaturalist”} |
2024-05-03 10:00:00 |
2024-05-03 10:00:00 |
2 |
1448.000 |
0.05 |
72.400000 |
Creates |
Lupe |
1714728521.0Kinigi,_Ruanda_(45593732034).jpg |
{“name”:”update”,”agg_value”:8.0,”category”:”UNESCO”} |
2024-05-03 10:00:00 |
2024-05-03 10:00:00 |
1 |
8.000 |
0.10 |
0.800000 |
Updates |
Lupe |
1714760904.0Hemiphyllodactylus_cattien_325514626.jpg |
{“name”:”create”,”agg_value”:1280.0,”category”:”INaturalist”} |
2024-05-03 19:00:00 |
2024-05-03 19:00:00 |
2 |
1280.000 |
0.05 |
64.000000 |
Creates |
Lupe |
1714761065.0Hemiphyllodactylus_cattien_325514626.jpg |
{“name”:”update”,”agg_value”:12.0,”category”:”INaturalist”} |
2024-05-03 19:00:00 |
2024-05-03 19:00:00 |
1 |
12.000 |
0.10 |
1.200000 |
Updates |
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 |
---|---|---|---|---|---|---|---|
1 |
Updates |
1442.0 |
144.2 |
DRAFT |
Lupe_contract |
2024-05-01 00:00:00 |
2024-06-01 00:00:00 |
2 |
Creates |
13288.0 |
664.4 |
DRAFT |
Lupe_contract |
2024-05-01 00:00:00 |
2024-06-01 00:00:00 |
invoices.total |
invoices.status |
invoices.contract_id |
invoices.started_at |
invoices.ended_at |
---|---|---|---|---|
808.5999999999999 |
DRAFT |
Lupe_contract |
2024-05-01 00:00:00 |
2024-06-01 00:00:00 |