invoice_id
field in the Daily Line Item Revenue resource points to the row in the Invoice Metadata resource with that ID.
This ID also points to the same invoice in Orb’s system (e.g. through querying in the API).
updated_at
column on each row.
This timestamp is used internally by Orb’s system to track when data needs to be exported to data destinations.
This timestamp is not an indicator of when the underlying resource was updated in Orb’s system.
deleted_at
, which will be set to the time of deletion, or null if the resource has not been deleted.
Certain resources, are append-only and will never be deleted, these do not have a deleted_at
field present.
The following resources do not have a deletion marker:
data_exports.transfer_success
webhook.
On the flip side, if you want to be notified when transfers fail, the corresponding data_exports.transfer_error
webhook can be used.
reverted_at
column which indicates when the underlying entry was reverted.
This can happen when changes occur in the past (e.g. a subscription cancellation is backdated) that undo operations that have been recorded.
In general, we recommend filtering out rows that were reverted when trying to understand the current state.
These columns can be used to construct point-in-time queries to understand the state at a given time, by filtering to rows that were active at the time in question.
The Invoice Line Item Billing column contains a similar column for voided data called voided_at
.
This column can be used to help understand data that has been voided.
This can happen when an invoice was originally sent but was later voided. As with reverted data, we recommend filtering out voided data for most queries, but your exact reporting needs may differ.
Field Name | Type | Description |
---|---|---|
timestamp | datetime | The true time that the entry was recognized. |
lock_adjusted_timestamp | datetime | The time that the entry should be recognized with respect to the accounting period lock posture at the original time. |
is_revert | boolean | A flag indicating whether this resource represents the creation or reversion of the underlying entry. |
is_revert = False
will be exported.
If that underlying entry is later voided/reverted, another row with is_revert = True
will be exported.
Consequently, each underlying entry for these resources in Orb can map to up to two exported resource entries.
To recognize revenue with respect to the accounting period lock posture at the time the resource was created or reverted, use the lock_adjusted_timestamp
field.
Based on the accounting period lock posture at timestamp
, the original time of recognition, the lock_adjusted_timestamp
may be shifted to the next open accounting period if the period
that timestamp
falls in was closed.
customer
, subscription
, invoice
, etc.) was first created in Orb’s system, regardless of when it was last modified or when other business events occurred.
How is it different from other timestamps?
created_at
: When the resource was originally created in Orbupdated_at
: When the resource was last modifiedstart_date
/end_date
: Business-specific dates (e.g., when a subscription starts/ends)created_at
timestamp is particularly valuable for:
start_date
= January 1st (business effective date)created_at
= February 15th (when it was actually created in Orb)id
based on the updated_at
timestamp.
Below is a sample snippet of SQL to achieve that: