A Celigo integration that reads an on-premise Microsoft SQL Server database and creates bills, vendors and journal entries in NetSuite.
Cloud ERPs are where finance teams want to work, but plenty of important data still lives on servers in the office: older line-of-business applications, custom databases built years ago, systems that are too embedded to replace. This project bridged that gap — reading a Microsoft SQL Server database inside the company network and turning its rows into NetSuite bills, vendors and journal entries, with no CSV exports in between.
The challenge
Some business data still lives in on-premise databases. Getting it into a cloud ERP means reaching inside the network, reshaping relational data into ERP records, and doing it without manual exports.
Three things make on-premise database integrations harder than cloud-to-cloud ones. First, network access: a cloud integration platform can’t simply reach a server behind the firewall. Second, shape: relational data is spread across tables and rows, while NetSuite wants complete records — a bill with its lines, a journal entry whose debits and credits balance. Third, habit: when exports have always been done by hand, nobody has written down the rules for which rows matter and how they should be grouped.
How it works
- Reach the on-premise database. Created a connection from Celigo to the on-premise MS SQL database.
- Extract with SQL. SQL queries select exactly the data needed.
- Reshape with JavaScript. JavaScript restructures the rows into the shape NetSuite expects.
- Create NetSuite records. The integration creates NetSuite Bills, Vendors and Journal Entries.
Design decisions
Reach inside the network securely
Celigo reaches on-premise systems through an agent installed inside the network, so the database doesn’t need to be opened up to the internet. The integration gets the access it needs, and the database stays where it is.
Let SQL do the selecting
SQL queries select exactly the rows and columns needed, with filtering and joins done by the database — which is far more efficient than pulling whole tables and filtering in the integration. Queries are also easy to read and review: anyone who knows the database can see precisely what the integration takes.
Reshape in code where the mapper can’t
Turning rows into NetSuite records often means grouping lines under a header, calculating totals or splitting one row into several entries. Here, JavaScript restructures the rows into the shape NetSuite expects before the records are created. Keeping that logic in one small, well-commented script is clearer than stretching a field mapper beyond what it was designed for — the same judgement I describe for Groovy in Working with JSON in Groovy.
Several record types from one source
Vendors, bills and journal entries all come from the same database. Creating vendors before the bills that reference them avoids failures caused by missing dependencies — the order of creation matters, as it did in the Truck Accessory Bill Payment project.
Highlights
- Cloud iPaaS connected to an on-premise database.
- SQL for extraction, JavaScript for transformation.
Things that matter in an integration like this
- Track what has been sent. A “last processed” marker or status column prevents rows from being sent twice.
- Use a read-only database account with access to only the tables the integration needs.
- Make journal entries balance before sending. Validating debits and credits in the integration gives clearer errors than NetSuite’s rejection.
- Plan for the server’s maintenance windows. If the database is offline, the integration should wait and retry, not lose data.
The result
Legacy on-premise data flows into NetSuite automatically, without CSV exports or re-keying.
At a glance
| Built with | Celigo, SQL, JavaScript |
|---|---|
| Systems | MS SQL (on-premise) → NetSuite |
| NetSuite records | Bills, Vendors, Journal Entries |
Related reading
- Celigo integration consultant — Celigo integrator.io projects
- NetSuite ERP consultant — bills, vendors and journal entries in NetSuite
- Integration consultant — choosing the right platform for on-premise data
Still exporting data from an on-premise system by hand? Get in touch.


