Sync NetSuite customers to SQL Server with pagination
Recipe ToolsAccountingERPCRMEcommerceFinancial ManagementHR managementDatabase
What it does
When the scheduled time arrives, this automation runs a NetSuite saved search for customers. It pages through all results and upserts each batch into SQL Server so the full customer list stays current.
Who it's for
Data and analytics teams who need to sync large NetSuite customer datasets to SQL Server on a schedule.
Apps used
- Scheduler by Workato
- NetSuite SOAP
- Workato List
- SQL Server
How teams use this
Sync all customers on a daily schedule
Run the NetSuite saved search every morning to page through all customers and upsert them to SQL Server. The full dataset stays in sync without manual work.
Expand to other NetSuite record types
Change the saved search to pull contacts or vendors instead of customers, and upsert to a different SQL Server table. The pagination logic stays the same for any saved search.
Filter customers by a custom field
Add a condition to the NetSuite saved search so only customers matching specific criteria are synced to SQL Server. This requires updating the saved search filter in NetSuite.
Sync on demand from a webhook
Replace the Clock trigger with a webhook so teams can initiate the NetSuite to SQL Server sync from an external system. The pagination and upsert steps remain unchanged.
How it works
- Run on a specified interval. The automation starts at the scheduled time you set, such as daily or weekly, and begins the NetSuite sync process.
- Execute the saved search. Run the Customer saved search in NetSuite to get the total number of pages needed for pagination across all results.
- Page through each result set. Loop through each page of the saved search using the page number and search ID so all customers are retrieved in batches from NetSuite.
- Upsert customers to SQL Server. Insert or update each batch of customer rows in the dbo.SS_Demo_Contacts table so the SQL Server database reflects the latest NetSuite data.