Skip to main content

Syncing Data & Pagination

This article explains the details of how Toolio syncs data with integrated datawarehouses.

Updated over 2 weeks ago

Overview

With Data Warehouse integrations like BigQuery and Redshift, Toolio is syncing its internal database with the integrated datawarehouse.

As is the case with each syncing job, the 2 key questions are sync frequency and pagination approach.

​

Sync Frequency

Sync frequency is typically configured to be once a day, and you can configure at what time this sync is triggered. You can configure this frequency under Settings > Integrations

We recommend that you set the integration to run at the beginning of a day, when all the data from the previous day's transactions have been populated in your data warehouse. Otherwise, you risk seeing incomplete days' data within Toolio.

​

Pagination

Pagination refers to identifying chunks of data to go through as Toolio is syncing the data. The best way to approach pagination, is through adding an updatedAt field in your data warehouse. This way Toolio can go through your data in the order the data was last updatedAt.

If there is no updatedAt field, Toolio would either have to do a full data sync each time it runs (which is not sustainable for larger tables like sales and inventory), or fetch the data for the last N # of days based on timestamp. Below are the default and the recommended approaches within Toolio

Table

Default Pagination

Recommended Pagination Field

Product

Full Sync

updatedAt

Sale

7 days based on timestamp

updatedAt

Inventory

7 days based on timestamp

updatedAt

Purchase Orders

Full Sync (append, no purge)

updatedAt

Transfer Orders

Full Sync (purge and reimport)

updatedAt

Receipts

Full Sync (append, no purge)

updatedAt

Transfer Receipts

Full Sync (append, no purge)

updatedAt

Important: "Full Sync" means Toolio reads the entire table on each run, but the behavior for existing data differs by table type. Transfer Orders purge existing data and reimport with every sync β€” this means you must send a complete file each time. Purchase Orders, Receipts, and Transfer Receipts do not purge existing data by default; new records are appended and existing records are updated, but nothing is deleted. Note: Purchase Orders can be configured to purge and reimport by enabling the FullPOImport flag.

Did this answer your question?