Algorithm Overview
The change detection process follows a three-phase matching algorithm:- Exact Matches: Objects that are completely identical (with whitespace normalization)
- Partial Matches: Objects that are similar enough to be considered the same but with changes
- Leftovers: Remaining objects classified as either new or removed
Matching Methods
Key Field Matching (Optional)
When key fields are configured in your schema, objects are matched based on these fields. ALL key fields must match for objects to be considered the same:changed
- ID matches, so same object with updates
Key Field Behavior:
- Key fields defined with
isKey: true
in your schema - Common key fields:
id
,url
,link
,sku
- If ANY key field changes, objects treated as
removed
+added
(notchanged
)
Traditional Field Matching (Default)
When no key fields are configured, objects are matched if they share >50% of their fields:changed
- Field match ratio exceeds threshold
Notes:
- Only string fields considered in ratio calculation
- Empty fields and non-string values excluded
Change Types
Changed: Object matched but some fields differ Added: Object exists in current run but no match in previous run Removed: Object existed in previous run but no match in current runMethod Comparison
Key Field Matching- When used: Optional, set
isKeyField: true
in schema - Logic: ALL key fields must match exactly
- Best for: Reliable matching even with major content changes
- When used: No key fields configured
- Logic: >50% of fields must match
- Best for: Simple setup, works without configuration