How to never forget to pay an invoice in NetSuite, using Merge - Part 1
We'll explore how Merge works, how to set it up with NetSuite, and finish with a Python script that emails you past due invoices
Objectives
This is a multi-part series where we:
Understand what Merge is [you are here]
Set up Merge to talk to our NetSuite instance, and pull invoices
Write a Python script that checks for past due invoices, and send an email about it
What is Merge
Merge (merge.dev) provides a unified API layer over common HRIS, ATS, and CRM tools. It’s ran by some awesome people (what up, Gil!) and their mission is to (1) make it easier to read/write data to tools with antiquated/obtuse limitations and (2) provide a consistent interface across tools in the same category.
Antiquated limitations
Many of these tools (NetSuite, Sage, Xero) were built in a different era when practices around consumption of APIs were different. For example, to use NetSuite’s native SuiteTalk REST endpoints, you need to create a proper signature for each request, which includes:
Creating a signing key
Generating a SHA256 signature using the signing key
Generating a nonce
Merge on the other hand? After some setup, a call is simply:
curl -X GET "https://api.merge.dev/accounting/v1/bills" \
-H "Authorization: Bearer {merge_api_key}" \
-H "Content-Type: application/json"
Varying nomenclature
NetSuite is an ERP. Quickbooks is an accounting system. Sage is an ERP. Xero is an accounting system.
Each tool varies in scope, but mostly deal with the same kind of data (customers, transactions, invoices, bills, etc). However, each shape their data differently, with their own opinions and legacy decisions around schema in the mix. You end up with NetSuite calling a customer, well, a customer
and Sage calling it a contact
.
Enter Merge. They sat down and realized the same thing: these tools are all referring to the same thing using different words. So they introduced some consistency, and wrote their own (opinionated) universal schema to describe accounting systems, CRMs, and others.
In the case of customers, Merge calls them contacts
. So whether we’re querying Quickbooks or NetSuite or Xero using Merge, all customers are referred to as contacts
, and come in a consistent data envelope like so:
{
"id": "c640b80b-fac9-409f-aa19-1f9221aec445",
"remote_id": "11167",
"created_at": "2021-09-15T00:00:00Z",
"modified_at": "2021-10-16T00:00:00Z",
"name": "Gil Feig's pickleball store",
"is_supplier": true,
...
}
Next
We’re ready to use Merge. Head over to part 2 where we connect Merge to our NetSuite instance.
If you’re interested in my NetSuite services (technical or functional), I currently have availability for 2025. Please message me on LinkedIn.