diff_rows
Compares two versions of the same list of JSON rows (a before and an after snapshot, such as yesterday's and today's price list, product feed or CRM export) and returns one row per difference: status added, removed or changed, the key, the old and new values, and changedFields naming exactly which fields moved. Set keyFields to the field(s) that identify a row (sku, id, email); without it rows match on full content and an edited row shows as removed plus added. Comparison is exact: "19.99" (text) and 19.99 (a number) differ, as do "Blue" and "blue " and null and a missing field; nested objects compare by value. Put always-changing fields such as timestamps in ignoreFields. The summary counts added, removed, changed and unchanged rows and warns about duplicate keys, rows missing a key, and field names found in no row. oldRows and newRows together are limited per call (list_capabilities gives the number); larger calls are refused with a message saying how to split them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newRows | Yes | The after snapshot: a JSON array of row objects, the same kind of rows as oldRows. At least one row. | |
| oldRows | Yes | The before snapshot: a JSON array of row objects. At least one row. Keys may differ between rows. | |
| keyFields | No | Field name(s) that uniquely identify a row on both sides, for example ["sku"] or ["country","sku"]. Strongly recommended: without it a changed row is reported as one removed row plus one added row. | |
| ignoreFields | No | Optional. Fields never compared, for example ["scrapedAt","lastChecked"], so a timestamp alone does not mark a row changed. | |
| compareFields | No | Optional. Only these fields decide whether a matched row changed. Default: every field on either row. | |
| includeUnchanged | No | Optional, default false. Set true to also return matched rows with no difference (status "unchanged"). They are always counted in the summary. |