What is a SyncToken

From ConsoliBYTE Wiki
Jump to: navigation, search
You'll often see a
tag in Intuit's IDS XML requests:
<?xml version="1.0" encoding="UTF-16"?>
<Mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   <Object xsi:type="Customer">
   <!-- what the heck is this? -->

The SyncToken is an incrementing value that changes *every time a record changes, regardless of if the record changes in QuickBooks itself, or as the result of some external integrated application changing it*.

Whenever you do a mod/update operation, you MUST provide the latest SyncToken value. Thus, to do a mod/update operation, you'll have to query for the record first, set the SyncToken in your mod/update request, and then send your request.

It's meant by Intuit to be a way to avoid two people working on the same record at the same time, and unknowingly overwriting each other's changes.

This is the equivalent to the EditSequence value in the QuickBooks SDK.