Rated events¶
A rated event represents the revenue and accounts receivable for a specific event. From a modeling perspective, matched events right joined with price spans equate to rated events. This is the smallest unit of an invoice and is used for calculating the amount owed for an event based line item. Rated events can be stored in the destination but they are often just used as a staging view for calculating line items.
Diagram¶
Table description¶
Column name |
Data type |
Description |
---|---|---|
id |
VARCHAR |
An identifier for looking up or referencing this specific object. |
org_id |
INTEGER |
An identifier referencing the organization related to this object. |
env_id |
INTEGER |
An identifier referencing the environment related to this object. |
branch_id |
INTEGER |
An identifier referencing the branch related to this object. |
transaction_id |
VARCHAR |
An identifier for looking up or referencing a specific event that occurred. |
customer_id |
VARCHAR |
An identifier referencing a customer. Refers to |
customer_alias |
VARCHAR |
An alternative identifier for the customer object to be used within metering. |
properties |
JSON |
A JSON object that contains data about the event it is tied to. |
metered_at |
TIMESTAMP |
A timestamp for when an event should be metered by the business system. |
received_at |
TIMESTAMP |
A timestamp for when an event was logged by the system. |
list_price_uid |
INTEGER |
An identifier referencing a unique list price row. Refers to |
contract_price_uid |
INTEGER |
An identifier referencing a unique contract price row. Refers to |
product_uid |
INTEGER |
An identifier referencing a unique product row. Refers to |
product_type |
VARCHAR |
A string that refers to the type of product ( |
status |
VARCHAR |
A string that represents the current state of the rated document ( |
price |
VARCHAR |
A string that determines the rate of this object. |
quantity |
DECIMAL(18,3) |
A decimal that refers to the number of products consumed or purchased. |
amount |
DECIMAL(18,3) |
A decimal that is the result of price * quantity. |
contract_id |
VARCHAR |
An identifier referencing a contract. Refers to |
started_at |
TIMESTAMP |
A timestamp that represents the beginning of the objects billing period. This timestamp is inclusive. |
ended_at |
TIMESTAMP |
A timestamp that represents the completion of the objects billing period. This timestamp is exclusive. |
effective_at |
TIMESTAMP |
A timestamp that represents the beginning of the objects active period. This timestamp is inclusive. |
ineffective_at |
TIMESTAMP |
A timestamp that represents the completion of the objects active period. This timestamp is exclusive. |
invoice_delivery |
VARCHAR |
A string that represents if the invoice will be delivered at the beginning of the month, “ADVANCED”, or at the end of the month, “ARREARS” |