Understanding your Leapfin data schema
Table of contents
- 1 Overview
- 2 Data table relationships
- 3 Journal entry data tables
- 4 Accounting record data tables
- 4.1 VW_FT_INVOICE
- 4.2 VW_FT_LINE_ITEM
- 4.3 VW_FT_DISCOUNT
- 4.4 VW_FT_CREDIT
- 4.5 VW_FT_TAX
- 4.6 VW_FT_PAYMENT
- 4.7 VW_FT_REFUND
- 4.8 VW_FT_DISPUTE
- 4.9 VW_FT_SETTLEMENT
- 4.10 VW_FT_FEE
- 4.11 VW_FT_RECOGNITION_EVENT
- 4.12 VW_FT_CREDIT_NOTE
- 4.13 VW_FT_CONTRACT
- 5 Account tables
- 5.1 VW_LK_ACCOUNT
- 5.2 VW_LK_ACCOUNT_GROUP
- 6 Linking tables
- 6.1 VW_RL_LINK
Overview
The data tables within your Leapfin data warehouse provide a reliable and efficient way to store, organize, and retrieve your Leapfin accounting data, supporting accurate and streamlined accounting processes. Data tables organize your accounting data in a structured format, with each table corresponding to a specific data point, such as accounting records, ledger accounts, and journal entries. Snowflake uses a relational database structure, allowing tables to be linked to run queries based on specific relationships. For example, you can link an invoice table with a journal entry table to associate specific invoices with their journal entries.
This guide details each data table contained within your data warehouse and how they relate to one another.
Data table relationships
When querying data, it is important to understand how each table relates to one another to identify specific data in various tables. For example, you may need to identify specific dispute records when querying the journal entry table. As shown in the diagram below, for most tables (not all), the primary identifier is the LEAPFIN_ID column, which is the unique ID Leapfin assigns to each accounting record. Using the previous example, you could identify each specific dispute record based on its LEAPFIN_ID when querying the journal entry table.
The chart below displays how each table relates to one another and identifies the common data columns between each.
Journal entry data tables
Journal entry tables aggregate journal entry data across all accounting records.
VW_AG_JOURNAL_ENTRIES
The VW_AG_JOURNAL_ENTRIES table aggregates all journal entries across all accounting records at the daily level. Each line of this table represents a daily journal line. This table is commonly used as the base for aggregated journal entry reports, such as when loading journal entry data to Netsuite. You can use this table to group journal entries across all accounting records.
Name | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
LEAPFIN_DATA_TYPE | type of accounting record, i.e. "LeapfinLineItem", "LeapfinInvoice", etc. |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in json format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATA_VT | all data fields of this accounting record in json format. |
DATE_DT | the book date of the journal entry. Value format "2022-01-31" |
DOCUMENT_DATE_DT | the date when this accounting record is created in external systems outside Leapfin. Value format "2022-01-31" |
PRODUCT_NAME | the name of the product associated with the accounting record. |
CURRENCY_CODE | 3-digit ISO code of |
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in JSON format |
ACCOUNT | the unique identifier of ledger account impacted by this journal line. To get the account name and other details, this |
ACCOUNTING_SIDE | the booking direction of the journal line. Acceptable values are "dr" and "cr". |
JE_PAIR_VT | the journal entry that contains this journal lines. |
JE_METADATA_VT | Contains rule ID and description |
JE_MEMO_VT | Contains journal entry tags |
AMOUNT | the amount of the journal line. A positive number means that the booking direction of the journal line (e.g. "dr") matches with the increasing side of the ledger account (e.g. "dr"). A negative number means the booking direction (e.g. "cr") differs from the account side (e.g. "dr") |
AMOUNT_DR | the debit amount of the journal line. |
AMOUNT_CR | the credit amount of the journal line. |
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_AG_JOURNAL_ENTRIES_MONTHLY
The VW_AG_JOURNAL_ENTRIES_MONTHLY table consolidates all journal entries across all accounting records and aggregates those journal entries by calendar month. Each line of this table represents a monthly journal entry line. This table provides additional aggregation on top of the VW_AG_JOURNAL_ENTRIES table. When generating monthly or annual journal entry reports, the VW_AG_JOURNAL_ENTRIES_MONTHLY table yields better query performance.
Name | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
LEAPFIN_DATA_TYPE | type of accounting record, i.e. "LeapfinLineItem", "LeapfinInvoice", etc. |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in json format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATA_VT | all data fields of this accounting record in json format. |
MONTH_ID | the year-month of the journal entry. Value format "202201". |
DOCUMENT_DATE_DT | the date when this accounting record is created in external systems outside Leapfin. Value format "2022-01-31" |
PRODUCT_NAME | the name of the product associated with the accounting record. |
CURRENCY_CODE | 3-digit ISO code of |
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in JSON format |
ACCOUNT | the unique identifier of ledger account impacted by this journal line. To get the account name and other details. This |
ACCOUNTING_SIDE | the booking direction of the journal line. Acceptable values are "dr" and "cr". |
JE_PAIR_VT | the journal entry that contains this journal lines. |
JE_METADATA_VT | Contains rule ID and description |
JE_MEMO_VT | Contains journal entry tags |
AMOUNT | the amount of the journal line. A positive number means that the booking direction of the journal line (e.g. "dr") matches with the increasing side of the ledger account (e.g. "dr"). A negative number means the booking direction (e.g. "cr") differs from the account side (e.g. "dr") |
AMOUNT_DR | the debit amount of the journal line. |
AMOUNT_CR | the credit amount of the journal line. |
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
Accounting record data tables
VW_FT_INVOICE
This table aggregates data for all of your invoice accounting records in Leapfin.
Column | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin. |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in json format. It contains following values:
|
ORGANIZATION_ID | unique identifier of the account. This is internal id created by Leapfin. |
DATE_DT | the date of when this Event happened. |
STATUS | current status of this invoice. Acceptable values are:
|
DUE_DATE_DT | the date when the payment for this invoice is due. |
ISSUED_DATE_DT | the date when this invoice is issued. If not issued yet, the value is null. In most cases this will be the same as |
UNCOLLECTIBLE_DATE_DT | the date when the payment for this invoice becomes uncollectible. If invoice has not become uncollectible or has been paid, then the value is null. Typically used for dunning/bad debt rule scenarios. |
CURRENCY_CODE | 3-digit ISO code, e.g. “USD”, "GBP", etc. This is the primary currency of this record. |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains following values:
|
PAID_DATE_DT | the date when this invoice is paid. Typically used for invoice to payment matching. |
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in json format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this accounting record. Each item contains following values:
|
TOTAL | total amount of invoice including tax and discount. This amount is derived by Leapfin based on the Line Item, Tax, and Discount associated with the Invoice. |
SUBTOTAL | total amount of invoice excluding tax and discount. This amount is derived by Leapfin based on the Line Item associated with the Invoice. |
EXTERNAL_TOTAL | total amount of invoice including tax and discount. This amount is received from external source. |
EXTERNAL_SUBTOTAL | total amount of invoice excluding tax and discount. This amount is received from external source. |
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_FT_LINE_ITEM
This table aggregates data for all of your line item accounting records in Leapfin.
Name | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in json format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATE_DT | the date when this line-item is created in billing system. |
START_DATE_DT | for subscription item, this is the start date of the subscription. |
END_DATE_DT | for subscription item, this is the end date of the subscription. |
DESCRIPTION | general description of the line-item |
CURRENCY_CODE | 3-digit ISO code of |
DISCOUNT_AMOUNT | amount of the discount associated with the line-item. The value should be non-negative. |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains the following values:
|
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in JSON format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this accounting record. Each item contains the following values:
|
QUANTITY | the number of units purchased. |
AMOUNT | the amount of the purchased goods or services excluding tax and discount. The value should be non-negative. |
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_FT_DISCOUNT
This table aggregates data for all of your discount accounting records in Leapfin.
Name | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in json format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATE_DT | the date of when this discount is created in billing system. |
CURRENCY_CODE | 3-digit ISO code of |
DESCRIPTION | A description of the Discount record. |
START_DATE_DT | For Discounts that are subscription in nature (i.e. time-series based), this is the start date of the period. |
END_DATE_DT | For Discounts that are subscription in nature (i.e. time-series based), this is the end date of the period. |
AMOUNT | amount of money impacted by this Discount. The value should be non-negative. This is the primary amount of this record. |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains the following values:
|
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in JSON format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this accounting record. Each item contains the following values:
|
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_FT_CREDIT
This table aggregates data for all of your credit accounting records in Leapfin.
Column | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin. |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in JSON format. It contains the following values:
|
ORGANIZATION_ID | Unique identifier for your account |
DATE_DT | the date-time of when this credit was issued or applied. |
DESCRIPTION | description of the Credit |
CURRENCY_CODE | 3-digit ISO code of |
AMOUNT | amount of the credit. The amount should be non-negative. The direction of the credit (i.e. the accounting impact of the credit amount) is derived from the |
TYPE | The type of credit. Acceptable values are:
|
START_DATE_DT | the date when the credit becomes available. |
END_DATE_DT | the date when the credit expires. |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains the following values:
|
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in json format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this accounting record. Each item contains the following values:
|
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_FT_TAX
This table aggregates data for all of your tax accounting records in Leapfin.
Column | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in JSON format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATE_DT | the date of when this tax is created in billing system. |
DESCRIPTION | general description of the tax. |
CURRENCY_CODE | 3-digit ISO code of |
AMOUNT | the amount of the tax. The amount should be non-negative |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains the following values:
|
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in JSON format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this accounting record. Each item contains the following values:
|
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_FT_PAYMENT
This table aggregates data for all of your payment accounting records in Leapfin.
Column | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in JSON format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATE_DT | the date of when this payment is created by payment processor. |
STATUS | current status of the payment. Acceptable values are:
|
DESCRIPTION | general description of the payment . |
CURRENCY_CODE | 3-digit ISO code of |
SUCCEEDED_DATE_DT | the date when the payment is successfully processed / settled. |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains the following values:
|
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the accounting record in JSON format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this accounting record. Each item contains the following values:
|
AMOUNT | the amount of the payment. The amount should be non-negative |
CREATED_AT_DT | the date-time when the accounting record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the accounting record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
VW_FT_REFUND
This table aggregates data for all of your refund accounting records in Leapfin.
Column | Description |
---|---|
LEAPFIN_ID | unique identifier created by Leapfin |
DECODED_LEAPFIN_ID_VT | decoded version of LEAPFIN_ID in JSON format. It contains the following values:
|
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATE_DT | the date of when this refund is created by payment processor. |
CURRENCY_CODE | 3-digit ISO code of |