We're software that helps growing brands & retailers grow and scale. Sync, sell and ship your products and inventory on online marketplaces and storefronts faster, easier and more accurately.

Learn more now

Diff Updates: Only Sync What Changed

When you import a vendor feed with 50,000 products but only 200 have actually changed since the last run, processing all 50,000 wastes time and resources. Diff updates solve this by comparing incoming data against what is already in SureDone and only processing items that have actually changed.

Note: Diff updates apply to imports only. They are not used for export automations.

How It Works

When diff_update is enabled, the engine compares each incoming item's values against the corresponding values stored in SureDone. If none of the monitored fields have changed, the item is skipped entirely -- it never makes it into the bulk update file.

The comparison is field-by-field:

  1. The engine reads the current SureDone value for each diff field.
  2. It trims whitespace from string values for a clean comparison.
  3. It compares the incoming vendor value against the stored SureDone value.
  4. If any monitored field differs, the item is processed. If all monitored fields match, the item is skipped.

Enabling Diff Updates

"diff_update": true

That is all you need for basic diff checking. When diff_fields is not specified, the engine checks all mapped fields for changes. If any field in the item differs from what is in SureDone, the item is processed.

Specifying Diff Fields

In most cases, you do not care if every field changed -- you only want to update when specific fields like stock or price change. Use diff_fields to narrow the comparison:

"diff_update": true,
"diff_fields": ["stock", "price"]

Now the engine only checks stock and price. Even if other mapped fields like title or description changed in the vendor feed, the item is skipped unless stock or price is different.

Tip: Limiting diff_fields to just the fields you care about (typically stock and price) provides the biggest performance benefit. It also prevents unnecessary updates from triggering channel syncs when only irrelevant fields changed.

Diff Tolerance

For numeric fields like price, you may not want tiny rounding differences to trigger an update. Use diff_tolerance to set an acceptable range:

"diff_update": true,
"diff_fields": ["price"],
"diff_tolerance": 0.01

With a tolerance of 0.01, a price of 29.99 in SureDone and 29.989 from the vendor are considered equal. The item would not be processed because the difference (0.001) falls within the tolerance range.

This is particularly useful when:

  • Vendor prices come with extra decimal precision
  • Currency conversion introduces minor rounding differences
  • You want to avoid churning channel listings over sub-penny price changes

When to Disable Diff Updates

There are scenarios where you want to send all data every time, regardless of changes:

  • Full catalog syncs where the destination system expects a complete feed
  • Channel relisting where you need to push all products to re-list them
  • Debugging when you want to verify all items are processing correctly

In these cases, explicitly set:

"diff_update": false
Important: The diff_update setting defaults to true in the config schema, meaning change detection is on by default. If you want a full sync every run, you must explicitly disable it.

Performance Impact

Diff updates can dramatically reduce processing time and bulk file size. Consider this example:

Scenario Items in Feed Items Changed Items Processed Approx. Time
Without diff 50,000 200 50,000 45 minutes
With diff (all fields) 50,000 500 500 2 minutes
With diff (stock + price only) 50,000 200 200 1 minute

The savings come from:

  1. Smaller bulk files -- Only changed items are written to the update file.
  2. Fewer database writes -- SureDone does not process unchanged items.
  3. Fewer channel syncs -- Channels only receive updates for items that actually changed.

Complete Example

{
  "name": "Vendor Price & Stock Sync",
  "vendor": "Parts Warehouse",
  "active": true,
  "schedule": "0 */2 * * *",
  "type": "products",
  "action": "import",
  "connection": {
    "type": "sftp",
    "address": "sftp.partswarehouse.com",
    "username": "{{sftp_user}}",
    "password": "{{sftp_pass}}",
    "path": "/feeds/",
    "port": 22
  },
  "file_configs": [
    {
      "name": "inventory_update.csv",
      "update": "edit",
      "field_map": {
        "guid": "PartNumber",
        "price": "DealerCost",
        "stock": "QtyAvailable",
        "title": "Description",
        "weight": "ShipWeight"
      },
      "diff_update": true,
      "diff_fields": ["price", "stock"],
      "diff_tolerance": 0.01
    }
  ]
}

This automation:

  • Imports every 2 hours from an SFTP server
  • Maps 5 fields from the vendor CSV
  • Only processes items where price or stock has changed
  • Ignores price differences smaller than one cent
  • Title and weight changes alone will not trigger an update