InvoiceSyncModel

The InvoiceSyncModel represents information coming into Lockstep from an external financial system or other
enterprise resource planning system. To import data from an external system, convert your original data into
the InvoiceSyncModel format and call the Upload Sync File API.
This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep
platform.

Once imported, this record will be available in the Lockstep API as an InvoiceModel.

For more information on writing your own connector, see Connector Data.

Required Fields

erpKey

string

This is the primary key of the Invoice record. For this field, you should use whatever the invoice's unique
identifying number is in the originating system. Search for a unique, non-changing number within the
originating financial system for this record.

Example: If you store your invoice records in a database, whatever the primary key for the invoice table is
in the database should be the "ErpKey".

For more information, see Identity Columns.

companyErpKey

string

The original primary key or unique ID of the company to which this invoice belongs. This value should
match the Company ErpKey field on the
CompanySyncModel.

An Invoice has two relationships: The Company and the Customer. The field CompanyErpKey identifies the
company that created the invoice, and the field CustomerErpKey is the customer to whom the invoice
was sent.

customerErpKey

string

The original primary key or unique ID of the company to which this invoice was sent. This value should
match the Company ErpKey field on the
CompanySyncModel.

An Invoice has two relationships: The Company and the Customer. The field CompanyErpKey identifies the
company that created the invoice, and the field CustomerErpKey is the customer to whom the invoice
was sent.

Optional Fields

salespersonName

string, nullable

The name of the salesperson that wrote this invoice. This is just text, it is not a reference to the
"Contacts" table. You will not receive an error if this field does not match a known contact person.

purchaseOrderCode

string, nullable

The "Purchase Order Code" is a code that is sometimes used by companies to refer to the original PO
that was sent that caused this invoice to be written. If a customer sends a purchase order to a vendor,
the vendor can then create an invoice and refer back to the originating purchase order using this field.

referenceCode

string, nullable

An additional reference code that is sometimes used to identify this invoice. The meaning of this field
is specific to the ERP or accounting system used by the user.

salespersonCode

string, nullable

A code identifying the salesperson responsible for writing this quote, invoice, or order. This is just
text, it is not a reference to the "Contacts" table. You will not receive an error if this field does
not match a known contact person.

invoiceTypeCode

string, nullable

A code identifying the type of this invoice.

Recognized Invoice types are:

  • AR Invoice - Represents an invoice sent by Company to the Customer
  • AP Invoice - Represents an invoice sent by Vendor to the Company
  • AR Credit Memo - Represents a credit memo generated by Company given to Customer
  • AP Credit Memo - Represents a credit memo generated by Vendor given to Company

invoiceStatusCode

string, nullable

A code identifying the status of this invoice.

Recognized Invoice status codes are:

  • Open - Represents an invoice that is considered open and needs more work to complete
  • Closed - Represents an invoice that is considered closed and resolved

termsCode

string, nullable

A code identifying the terms given to the purchaser. This field is imported directly from the originating
financial system and does not follow a specified format.

specialTerms

string, nullable

If the customer negotiated any special terms different from the standard terms above, describe them here.

currencyCode

string, nullable

The three-character ISO 4217 currency code used for this invoice.

totalAmount

double, nullable

The total value of this invoice, inclusive of all taxes and line items.

salesTaxAmount

double, nullable

The total sales (or transactional) tax calculated for this invoice.

discountAmount

double, nullable

The total discounts given by the seller to the buyer on this invoice.

outstandingBalanceAmount

double, nullable

The remaining balance value of this invoice.

invoiceDate

date-time, nullable

The reporting date for this invoice.

discountDate

date-time, nullable

The date when discounts were adjusted for this invoice.

postedDate

date-time, nullable

The date when this invoice posted to the company's general ledger.

invoiceClosedDate

date-time, nullable

The date when the invoice was closed and finalized after completion of all payments and delivery of all products and
services.

paymentDueDate

date-time, nullable

The date when the remaining outstanding balance is due.

importedDate

date-time, nullable

The date and time when this record was imported from the user's ERP or accounting system.

originAddressLine1

string, nullable

The origination address for this invoice

originAddressLine2

string, nullable

The origination address for this invoice

originAddressLine3

string, nullable

The origination address for this invoice

originAddressCity

string, nullable

The origination address for this invoice

originAddressRegion

string, nullable

The origination address for this invoice

originAddressPostalCode

string, nullable

The origination address for this invoice

originAddressCountry

string, nullable

The origination address for this invoice

originAddressLatitude

float, nullable

The origination address for this invoice

originAddressLongitude

float, nullable

The origination address for this invoice

billToAddressLine1

string, nullable

The billing address for this invoice

billToAddressLine2

string, nullable

The billing address for this invoice

billToAddressLine3

string, nullable

The billing address for this invoice

billToAddressCity

string, nullable

The billing address for this invoice

billToAddressRegion

string, nullable

The billing address for this invoice

billToAddressPostalCode

string, nullable

The billing address for this invoice

billToAddressCountry

string, nullable

The billing address for this invoice

billToAddressLatitude

float, nullable

The billing address for this invoice

billToAddressLongitude

float, nullable

The billing address for this invoice

shipToAddressLine1

string, nullable

The shipping address for this invoice

shipToAddressLine2

string, nullable

The shipping address for this invoice

shipToAddressLine3

string, nullable

The shipping address for this invoice

shipToAddressCity

string, nullable

The shipping address for this invoice

shipToAddressRegion

string, nullable

The shipping address for this invoice

shipToAddressPostalCode

string, nullable

The shipping address for this invoice

shipToAddressCountry

string, nullable

The shipping address for this invoice

shipToAddressLatitude

float, nullable

The shipping address for this invoice

shipToAddressLongitude

float, nullable

The shipping address for this invoice

created

date-time, nullable

If known, the date when this record was created according to the originating financial system
in which this record is maintained. If the originating financial system does not maintain a
created-date, leave this field null.

modified

date-time, nullable

If known, the date when this record was most recently modified according to the originating
financial system in which this record is maintained. If the originating financial system does
not maintain a most-recently-modified-date, leave this field null.

isVoided

boolean, nullable

Is the invoice voided? If not specified, we assume the invoice is not voided.

inDispute

boolean, nullable

Is the invoice in dispute? If not specified, we assume the invoice is not in dispute.

preferredDeliveryMethod

string, nullable

Indicates the preferred delivery method for this invoice. Examples include Print, Email, Fax


Did this page help you?