Line items

A line item represents the revenue and accounts receivable at the product level. Since there are numerous types of products, how it is calculated can vary. Line items are typically stored in the destination for record keeping and business administration requirements (billing, accounting, etc).

Diagram

../_images/line_items_erd.svg

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.

created_at

TIMESTAMP

A timestamp for when this row was first created.

list_price_uid

INTEGER

An identifier referencing a unique list price row. Refers to list_prices.id.

contract_price_uid

INTEGER

An identifier referencing a unique contract price row. Refers to contract_prices.id.

product_uid

INTEGER

An identifier referencing a unique product row. Refers to product.id.

contract_id

VARCHAR

An identifier referencing a contract. Refers to contracts.durable_id.

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”

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.

status

VARCHAR

A string that represents the current state of the rated document ("FINALIZED", "DRAFT", "VOID").

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.