Line items

What are line items?

The rated document that is produced at the product scope is a line item. The amount is calculated depending on the pricing mechanism associated with the product. For flat rate products a line item is rated by multiplying the quantity by the price. For event based products rated events are summed up to compute the total. Within bframe, line items are then used to calculate invoice totals.

Why are line items important?

Line items are the preferred method to provide billing transparency. Showing how invoice totals were calculated per product often is enough for a customer to understand the bill. From a reporting perspective line items are helpful for product specific analysis. Each line item is for a timeframe, contract and product combination. This is useful because usage is aggregated making the reports easy to query.

How are line items modeled?

Fixed pricing must occur at the line item scope. It can not be divided any further and can only be calculated in reference to an individual product. Usage based pricing can be calculated at the line item or event scope. Summing all related rated events or calculating usage directly and multiplying the price are both possible and accurate.

bframe makes use of rated events to create event based line items. This offers full granularity and auditability to operators. The tradeoff associated with this design is the additional computation and storage overhead. In the case of a business model not requiring event based products, rated events can be ignored.

The platform fee in the Wikipedia pricing scheme is a specific example of a fixed charge line item. This is exhibited below for the customer “Papergirl”.

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

3

Platform fee

1.0

1000.0

FINALIZED

Papergirl_contract

2023-11-06 07:23:49

2024-11-01 00:00:00

Invoices

invoices.total

invoices.status

invoices.contract_id

invoices.started_at

invoices.ended_at

1000.0

FINALIZED

Papergirl_contract

2023-11-06 07:23:49

2024-11-01 00:00:00