v_ai_companies¶
Customers, vendors, employees, and contacts from the source accounting system
- 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. |
company_name |
character varying |
Yes | — | The display name of the company. For businesses, this is the official company name. For individuals (is_person=True), this may be empty. |
type |
character varying |
Yes | customer, vendor, employee, contact |
Kipper normalized entity type. |
is_active |
boolean |
No | — | Indicates whether the company is currently active in the source system. Inactive companies may be archived or no longer in use. |
phone |
character varying |
Yes | — | Primary phone number for the company. This is the main contact number for business communications. |
email |
character varying |
Yes | — | Primary email address for the company. Used for main business communications and notifications. |
taxable |
boolean |
No | — | Indicates whether transactions with this company are subject to tax. When True, applicable tax codes will be applied to transactions. |
print_on_check_as |
character varying |
Yes | — | The name to print on checks when issuing payments to this company. May differ from the official company name. |
is_person |
boolean |
No | — | Indicates whether this company record represents an individual person rather than a business entity. When True, use first_name, middle_name, last_name instead of company_name. |
first_name |
character varying |
Yes | — | First name of the individual. Only applicable when is_person=True. |
middle_name |
character varying |
Yes | — | Middle name of the individual. Only applicable when is_person=True. |
last_name |
character varying |
Yes | — | Last name/surname of the individual. Only applicable when is_person=True. |
suffix |
character varying |
Yes | — | Name suffix (e.g., Jr., Sr., III) |
salutation |
character varying |
Yes | — | Honorific or title prefix such as Mr., Mrs., Ms., Dr., etc. Used for formal addressing. |
title |
character varying |
Yes | — | Job title or position of the person at the company, e.g. CEO, Manager, Director. |
mobile_phone |
character varying |
Yes | — | Mobile/cell phone number for direct contact with the individual. |
alt_phone |
character varying |
Yes | — | Alternative phone number. Can be a secondary office line or home phone. |
fax |
character varying |
Yes | — | Fax number for document transmission. |
website_url |
character varying |
Yes | — | Public website URL for the company. Should be a fully qualified URL including http:// or https://. |
billing_addr1 |
character varying |
Yes | — | Primary billing address line 1. Usually contains street number and name. |
billing_addr2 |
character varying |
Yes | — | Secondary billing address line 2. Usually contains suite, apartment, or building number. |
billing_city |
character varying |
Yes | — | City name for the billing address. |
billing_country |
character varying |
Yes | — | Country name or code for the billing address. |
billing_state |
character varying |
Yes | — | State, province, or region 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 1. Usually contains street number and name. |
shipping_addr2 |
character varying |
Yes | — | Secondary shipping address line 2. Usually contains suite, apartment, or building number. |
shipping_city |
character varying |
Yes | — | City name for the shipping address. |
shipping_country |
character varying |
Yes | — | Country name or code for the shipping address. |
shipping_state |
character varying |
Yes | — | State, province, or region for the shipping address. |
shipping_zip |
character varying |
Yes | — | Postal/ZIP code for the shipping address. |
parent_external_id |
character varying |
Yes | — | ID of the parent 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). |
category_external_id |
character varying |
Yes | — | ID of the category in the source system. |
tax_code_external_id |
character varying |
Yes | — | ID of the default tax code 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_transactions.company_external_id = v_ai_companies.source_id AND v_ai_transactions.data_source_id = v_ai_companies.data_source_idv_ai_ledger_lines.company_external_id = v_ai_companies.source_id AND v_ai_ledger_lines.data_source_id = v_ai_companies.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.