Payables and Receivables in NetSuite
Payables and Receivables in NetSuite with the Routable API
Oracle NetSuite is a very powerful platform, and consequently, it has a great amount of data it needs to perform its tasks, particularly as it applies to Payables and Receivables in the Routable API. In this article, we'll go through the extra data that Routable needs to link Payables and Receivables to NetSuite.
The Payable's ledger
object
ledger
objectAs with Xero and QuickBooks Online, there is a ledger
object on a NetSuite Payable or Receivable that carries extra data related to the integration.
In addition to the standard memo
field, the NetSuite metadata object contains several fields to tie the payment to various categories within NetSuite. For each of these objects, you can obtain the ID by querying NetSuite's own API, or by just looking in the URL query parameters when you open the object in NetSuite (see the screenshot below). The NetSuite fields on a Payable include:
account
is an object containing the ID of an account in the NetSuite Chart of Accounts.class
is an object containing the ID of a class for the Payable or Receivable in NetSuite, such as "Furniture" or "Hardware"location
is an object containing the ID of a NetSuite location - perhaps a store number or a warehouse.posting_period
is an object containing the ID of a NetSuite posting period, such as "Fiscal Year 2022".
To obtain these IDs, you can make a call to our accounting software object list endpoint. We strongly recommend caching these results in your system.
If you have added additional custom fields in NetSuite that are configured for Payables and/or Receivables, they will appear in this object as well.
Payable / Receivable Line Items
In addition to the Payable or Receivable itself, the Line Items contained within a Payable or Receivable also have specialized fields for NetSuite integration. They are stored in the ledger
object on each LineItem. They include:
amortiz_start_date
andamortiz_end_date
are for tracking the amortization progress for a line item.amortization_residual
stores the estimated value of the line item at the end of the lease term or useful life.amortization_sched
is an object containing the ID of the Amortization Schedule in NetSuite that determines the timing of depreciation of this line item.class
is an object containing the ID of a class for the individual line item in NetSuite, such as "Furniture" or "Hardware".customer_ref
allows you to enter a reference to a customer to track this line item against.department
is an object containing the ID of a department in NetSuite, such as "Engineering" or "Sales".location
is an object containing the ID of a NetSuite location - perhaps a store number or a warehouse.
Additional fields, such as custom fields you have configured for a line item in NetSuite, may also appear here.
Custom Fields
To add custom fields to your payloads, you'll need to use the internal ID
of the custom field from NetSuite. So, if the Payable or Receivable has an internal ID of foo
, and we want to give it a value of bar
, we'll add it to the Create a Payable or Create a Receivable payload like this:
{
"acting_team_member": "...",
"line_items": [ { "...": "..." } ],
"ledger": {
"account": "...",
"foo": "bar"
}
...
}
Custom fields can be added this way both on the Payable or Receivable itself, or on an individual line_item
, depending on how the custom field is structured in NetSuite. A custom field on a line item goes inside the ledger
field of an individual line item
object:
{
"acting_team_member": "...",
"line_items": [
{
"...": "...",
"ledger": {
"foo": "bar"
}
}
],
"ledger": {
"account": "..."
}
...
}
To obtain the internal IDs
for your custom fields, you'll need to turn on the ability to see them in NetSuite itself. Here's an article from the Oracle NetSuite documentation explaining how to do this.
Updated 3 months ago