LedgerLink Sync API
Purpose of LedgerLinkSync API
The folder contains all the scripts that handle the sync process from LedgerLink to QBO.
Structure of LedgerLink Sync API
The API, like all APIs, is divided into Public and Private scripts. If there was a need for the user to customize the module, then there would also be a Config folder. Scripts that receive calls from outside the module are placed in the Public folder. Scripts that are called from within the module are placed in the Private folder. We've adopted a script naming convention to prefix private scripts with an underscore. You do not call a script in the private folder from outside the module! Only Public "wrapper" scripts call Private scripts.
The LedgerLink Sync API Public Scripts
These are the master scripts for Sync and each has slightly different behavior:
- Sync on Server - uses Perform Script on Server to sync.
- Sync QBO with FM, Show Progress Card - displays a card window for feedback to a user during sync
- Sync QBO with FM, No Dialog - syncs without the card window and so a good script to use as a scheduled server script
- Sync with Log - displays the results of a sync to help a developer troubleshoot
- Reset all Last Time Stamps - clears the last sync timestamps for each entity. All QBO records will be received rather than those greater than the last sync timestamp.
The LedgerLink Sync API Private Scripts
In here are all the heavy-lifting sync scripts. The basic idea is that LedgerLink:
- Loops through all the Entities shown on the Configuration and Log layout.
- If that Entity is checked to Send, gathers any records where qbo_send =1
- Sends the gathered records one at a time, each with its own transaction, to QBO. If any single send within the same entity fails, no further records are sent for that entity. See this article.