v_ai_transaction_lines_all¶
Line items within transactions, same as v_ai_transaction_lines but including lines belonging to voided transactions. Use v_ai_transaction_lines for everyday questions; use this view only when the user explicitly asks about voided/cancelled transactions.
- Populated by: QuickBooks Online, QuickBooks Desktop, Xero, NetSuite
Columns¶
| Name | Type | Nullable | Allowed values | Description |
|---|---|---|---|---|
id |
character varying |
No | — | Kipper's internal row id, not the accounting system's id (that is source_id, where the view has one). |
data_source_id |
character varying |
Yes | — | The entity (connected data source) this row belongs to. External IDs (source_id and the *_external_id columns) and company names are unique only within one entity, so join related rows on data_source_id as well as their external IDs. |
source_id |
character varying |
Yes | — | The record's id in the accounting system; the join hints show which *_external_id columns point to it. |
source_created_at |
timestamp with time zone |
Yes | — | Timestamp when this record was originally created in the source system. Preserves the original creation date from the accounting software. |
source_updated_at |
timestamp with time zone |
Yes | — | Timestamp when this record was last modified in the source system. Used to detect changes and determine if re-sync is needed. |
additional_detail_json |
jsonb |
Yes | — | Stores any additional details as JSON that do not fit into standard fields. Used for source-specific data or custom attributes. |
last_synced_at |
timestamp with time zone |
Yes | — | Timestamp of the last sync operation that included this record. Used to detect stale records that may have been deleted in the source system. |
description |
text |
Yes | — | Description of the line item, typically includes product/service details or memo text. |
quantity |
numeric(18, 2) |
Yes | — | Number of units for this line item. Can be whole numbers or decimals for fractional quantities. |
unit_price |
numeric(18, 2) |
Yes | — | Price per unit for this line item before any discounts or taxes. |
line_amount |
numeric(18, 2) |
Yes | — | Total amount for this line (typically quantity × unit_price), may include adjustments. |
line_number |
integer |
Yes | — | Sequential position of this line within the parent transaction, used for ordering. |
type |
character varying |
Yes | SalesItemLineDetail, ItemBasedExpenseLineDetail, AccountBasedExpenseLineDetail, DiscountLineDetail, SubTotalLineDetail |
Current Kipper line type value. This field is only partially normalized across providers and may contain source-specific labels such as 'SalesLineDetail' in addition to QBO-style values like 'SalesItemLineDetail', 'ItemBasedExpenseLineDetail', 'AccountBasedExpenseLineDetail', 'DiscountLineDetail', and 'SubTotalLineDetail'. |
transaction_external_id |
character varying |
Yes | — | ID of the parent transaction in the source system. |
item_external_id |
character varying |
Yes | — | ID of the item referenced by this line in the source system. |
account_external_id |
character varying |
Yes | — | ID of the account associated with this line in the source system (e.g., expense, income, or asset account). |
company_external_id |
character varying |
Yes | — | ID of the customer or vendor associated with this line in the source system. |
class_external_id |
character varying |
Yes | — | ID of the class/department in the source system. |
location_external_id |
character varying |
Yes | — | ID of the location associated with this line in the source system. |
Joins¶
Relationships this view takes part in. External IDs are unique only within one connected entity, so every external-ID join matches on data_source_id as well.
v_ai_transaction_lines_all.transaction_external_id = v_ai_transactions_all.source_id AND v_ai_transaction_lines_all.data_source_id = v_ai_transactions_all.data_source_id
Across entities¶
A workspace can hold several connected companies. A query run across all of them returns rows from each, and external IDs (source_id and the *_external_id columns) and company names are unique only within one entity — so match on data_source_id too whenever you join or group.