v_ai_transactions¶
Financial documents: invoices, bills, payments, credit memos, journal entries, checks, purchase orders, prepayments and overpayments (customer or vendor money held in advance)
- 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. |
txn_number |
character varying |
Yes | — | The transaction number or document number (e.g., Invoice #1001, Bill #2001) |
type |
character varying |
Yes | invoice, bill, payment, vendorpayment, salesreceipt, deposit, customerdeposit, prepayment, vendorprepayment, overpayment, vendoroverpayment, transfer, refundreceipt, creditmemo, vendorcredit, check, expense, creditcardexpense, creditcardcredit, journalentry, purchaseorder, salesorder |
Kipper normalized transaction type. salesorder is NetSuite-only. |
status |
character varying |
Yes | open, overdue, paid, partially_paid, draft, closed, applied, partially_applied, unapplied, deleted |
Kipper normalized transaction status. |
txn_date |
date |
Yes | — | The date the transaction occurred or was created |
due_date |
date |
Yes | — | The date by which payment is due for this transaction |
memo |
text |
Yes | — | Internal notes or memo attached to the transaction |
email |
character varying |
Yes | — | Email address associated with this transaction, typically the customer or vendor email |
total |
numeric(18, 2) |
Yes | — | The total amount of the transaction including all line items and taxes |
amount_due |
numeric(18, 2) |
Yes | — | The remaining amount due on the transaction (total minus payments applied) |
amount_paid |
numeric(18, 2) |
Yes | — | The total amount that has been paid against this transaction |
sub_total |
numeric(18, 2) |
Yes | — | The subtotal before taxes and discounts are applied |
amount_applied |
numeric(18, 2) |
Yes | — | Amount of the payment that has been applied to a transaction. |
amount_unapplied |
numeric(18, 2) |
Yes | — | Remaining amount of the payment that is not yet applied to any transaction. |
amount_credited |
numeric(18, 2) |
Yes | — | Amount of this transaction settled by credit rather than cash — credit notes, prepayments, or overpayments applied to it. Separate from amount_paid, which stays actual payments only, so "fully settled" is amount_paid + amount_credited. |
billing_addr1 |
character varying |
Yes | — | Primary billing address line (street address) |
billing_addr2 |
character varying |
Yes | — | Secondary billing address line (suite, apartment, etc.) |
billing_city |
character varying |
Yes | — | City for the billing address |
billing_country |
character varying |
Yes | — | Country for the billing address |
billing_state |
character varying |
Yes | — | State or province for the billing address |
billing_zip |
character varying |
Yes | — | Postal/ZIP code for the billing address |
shipping_addr1 |
character varying |
Yes | — | Primary shipping address line (street address) |
shipping_addr2 |
character varying |
Yes | — | Secondary shipping address line (suite, apartment, etc.) |
shipping_city |
character varying |
Yes | — | City for the shipping address |
shipping_country |
character varying |
Yes | — | Country for the shipping address |
shipping_state |
character varying |
Yes | — | State or province for the shipping address |
shipping_zip |
character varying |
Yes | — | Postal/ZIP code for the shipping address |
currency_external_code |
character varying |
Yes | — | Currency code from the source system (e.g., USD, EUR, GBP) |
company_external_id |
character varying |
Yes | — | ID of the customer or vendor (company) in the source system. |
terms_external_id |
character varying |
Yes | — | ID of the payment terms in the source system (e.g., Net 30, Due on Receipt). |
account_external_id |
character varying |
Yes | — | ID of the account in the source system (e.g., bank account, AR/AP account). |
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 in the source system (e.g., store, warehouse). |
payment_method_external_id |
character varying |
Yes | — | ID of the payment method in the source system (e.g., Check, Credit Card, ACH). |
parent_external_id |
character varying |
Yes | — | source_id of this row's parent Transaction in the same table (e.g. a bomrevision points to its parent bom). |
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.transaction_external_id = v_ai_transactions.source_id AND v_ai_transaction_lines.data_source_id = v_ai_transactions.data_source_idv_ai_transactions.company_external_id = v_ai_companies.source_id AND v_ai_transactions.data_source_id = v_ai_companies.data_source_idv_ai_payment_transactions.transaction_external_id = v_ai_transactions.source_id AND v_ai_payment_transactions.data_source_id = v_ai_transactions.data_source_idv_ai_payment_transactions.payment_external_id = v_ai_transactions.source_id AND v_ai_payment_transactions.data_source_id = v_ai_transactions.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.