v_ai_metadata¶
Reference/lookup data: accounts, classes, departments, locations, tax codes, terms, payment methods
- 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 | — | Source-specific details as JSON. For QuickBooks Online it is the only place an account's type and classification live: the keys AccountType and Classification, read as additional_detail_json->>'AccountType'. |
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. |
name |
character varying |
No | — | Name of the metadata record |
full_name |
text |
Yes | — | Fully qualified name for hierarchical records |
parent_external_id |
character varying |
Yes | — | ID of the parent record in the source system. |
metadata_type |
character varying |
Yes | — | Type: account, class, department, term, paymentmethod, taxcode |
is_active |
boolean |
No | — | Indicates whether the metadata record is active |
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.account_external_id = v_ai_metadata.source_id AND v_ai_transaction_lines.data_source_id = v_ai_metadata.data_source_idv_ai_ledger_lines.account_external_id = v_ai_metadata.source_id AND v_ai_ledger_lines.data_source_id = v_ai_metadata.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.