Contract
Overview
Contract is a type of financial records representing a sales agreement between two parties that creates an obligation to perform a particular transaction.
Contract is similar to invoice in that they both represent a right to payment. They are different in that the payment for the contract amount is conditional on something other that the passage of time, while the payment for invoice amount is unconditional. Commonly speaking, one or more invoices will be issued to bill customers when the conditions of the contracts are met.
Create a Contract
The following fields are required :
objectType
: type of financial record. For Contract, the value is "contract".id
: unique identifier of this record. This is external id received by Leapfin.amount
: total amount of the contract.currencyCode
: 3-digit ISO code oftotalAmount
andsubtotalAmount
fields, e.g. “USD”, "GBP", etc. This is the primary currency of this recordstatus
: current status of the contract. Acceptable values are:- "Draft" - the contract is either being created or waiting to be signed by the customer.
- "Signed" - the contract is approved/signed by all parties.
- "Terminated" - the contract is cancelled either before or after the customer has signed it.
date
: the date-time of when this contract is created in order system.
The following fields are optional, but are commonly needed for creating journal entries:
description
: a general description about the contract.startDate
: the start date-time of the effective period of the contract. Start date is inclusive.endDate
: the end date-time of the effective period of the contract. End date is inclusive.signedDate
: the date-time when this contract is signed / approved by all parties.terminatedDate
: the date-time when the contract is terminated or cancelledexchangeRates
: a list of exchange rates used to calculate currency conversionscurrencyCode
: 3-digit ISO code, e.g. “USD”, "GBP", etc. This is the target currency of this recordrate
: conversion rate from primary currency to target currency. i.e.amount
in primary currency *rate
= converted amount in target currency.
links
: directional relationships pointing from this record to other financial records. Contact often expects one or more Invoice records linking to it.objectType
: type of the target financial recordid
: unique identifier of the target financial record
customFields
: additional fields (i.e. key-value pairs) related to this record
Sample Data
{
"objectType": "contract",
"id": "contract_001",
"amount": 14930.99,
"currencyCode": "USD",
"status": "Signed",
"description": "a sample contract",
"date": "2021-01-16T11:28:31",
"startDate": "2021-01-10T00:00:00",
"endDate": "2025-01-19T00:00:00",
"signedDate": "2021-01-17T00:00:00",
"terminatedDate": null,
"exchangeRates": [
{
"currencyCode": "EUR",
"rate": 0.84
}
],
"links": [],
"customFields": {
"field1": "value1"
}
}
Query a Contract
Contract records are stored in VW_FT_CONTRACT
table. It can be accessed via Snowflake Data Sharing and Access.
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: - external_code : the unique identifier of this record. This is external id received by Leapfin.- integration_id : the unique identifier of the data source. This is an internal id created by Leapfin.- leapfin_data_type : type of financial record, i.e. "LeapfinContract"- leapfin_suffix : additional string to distinguish different financial records when the same external_code is received from the data source.- raw_data_type : type of raw data record received from the data source. |
ORGANIZATION_ID | unique identifier of the account. This is an internal id created by Leapfin. |
DATE_DT | the date-time of when this contract is created in order system. |
AMOUNT | total amount of the contract.. The value should be non-negative. |
CURRENCY_CODE | 3-digit ISO code of AMOUNT field, e.g. “USD”, "GBP", etc. This is the primary currency of this record. |
STATUS | current status of the contract. Acceptable values are: - "Draft" - the contract is either being created or waiting to be signed by the customer. - "Signed" - the contract is approved/signed by all parties. - "Terminated" - the contract is cancelled either before or after the customer has signed it. |
DESCRIPTION | a general description about the contract |
START_DATE_DT | the start date-time of the effective period of the contract. Start date is inclusive. |
END_DATE_DT | the end date-time of the effective period of the contract. Start date is inclusive. |
SIGNED_DATE_DT | the date-time when this contract is signed / approved by all parties. |
TERMINATED_DATE_DT | the date-time when this contract is terminated or cancelled |
EXCHANGE_RATES_VT | a list of exchange rates used to calculate currency conversions. Each rate contains the following values: - currencyCode : 3-digit ISO code, e.g. “USD”, "GBP", etc. This is the target currency of this record.- rate : conversion rate from primary currency to target currency. i.e. amount in primary currency * rate = converted amount in target currency. |
CUSTOM_FIELDS_VT | additional fields (i.e. key-value pairs) about the financial record in JSON format |
ACCOUNTING_TRANSACTIONS_VT | a list of journal entries associated with this financial record. Each item contains the following values: - date : the date of the journal entry- entries : a list of journal lines within the journal entry. Each line contains the following values:--- account : unique identifier of the financial account. This is an internal id created by Leapfin (refer to VW_LK_ACCOUNT).--- amount : amount of money booked towards the account .--- accountingSide : an indicator of whether the amount is a debt ("dr") or credit ("cr") to the acount .- comments : additional fields (i.e. key-value pairs) on the journal entry in JSON format. |
CREATED_AT_DT | the date-time when the financial record is created by Leapfin. Value format: "2022-07-14 23:01:26.400" |
UPDATED_AT_DT | the date-time when the financial record is last updated by Leapfin. Value format: "2022-09-01 06:09:57.379" |
Updated 6 months ago