@syncmatters/connector-sdk 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,9 +111,18 @@ upsertFields.unshift({
111
111
  ### Match rules
112
112
 
113
113
  `matchRules` values: `"id"`, `"name[ci]"`, `"email[ci]"`, `"domain[ci]"`,
114
- `"first_and_last_name[ci]"`, `"field_value_equals[ci]"` (`[ci]` = case-insensitive). Declare
114
+ `"first_and_last_name[ci]"`, `"field_value_equals[ci]"`, `"field_values_equal[ci]"`. Declare
115
115
  only rules `query()` actually implements via `matchFilter` — see [05-query.md](./05-query.md).
116
116
 
117
+ `[ci]` = case-insensitive: text values compare ignoring case; enumeration/picklist, number, date
118
+ and boolean values compare on the destination system's canonical stored value (for picklists, the
119
+ option's internal id). Where the API allows, canonicalize the incoming value (e.g. resolve a
120
+ picklist label or differently-cased id to the option id) before filtering.
121
+
122
+ `"field_values_equal[ci]"` is the multi-field variant: 1-5 user-selected (source, destination)
123
+ field pairs that must ALL be equal (`destA = a AND destB = b ...`). Declare it only when the API
124
+ can apply several equality filters in one query (search filter groups, SOQL/OData `and`, ...).
125
+
117
126
  **Commonly forgotten:** an object that supports `idsFilter` can ALWAYS offer
118
127
  `"field_value_equals[ci]"` — with `canMatch: true` on its id field, the match is just a
119
128
  lookup of the supplied value by id. There is no reason for such an object to declare no
package/docs/05-query.md CHANGED
@@ -227,7 +227,7 @@ cover yours with a direct query in another prepare hook
227
227
 
228
228
  ### matchFilter
229
229
 
230
- `{ rule, selectOrder?, destFieldPath?, srcData: [{ srcRowId, match: { id?, name?, email?, domain?, firstname?, lastname?, custom? } }], canUse }`.
230
+ `{ rule, selectOrder?, destFieldPath?, destFieldPaths?, srcData: [{ srcRowId, match: { id?, name?, email?, domain?, firstname?, lastname?, custom?, customs? } }], canUse }`.
231
231
 
232
232
  For each `srcData` entry, search rows matching per the `rule` (e.g. `"email[ci]"` — compare
233
233
  case-insensitively). Collect candidates, then call `await options.matchFilter.canUse([{ srcRowId,
@@ -240,6 +240,7 @@ candidates }])` — the platform reserves un-mapped matches and returns the sele
240
240
  - **first_and_last_name[ci]** - inspect the `match.firstname` and values and `match.lastname` and search for rows with the same name.
241
241
  - **id** - inspect the `match.id` value and search in the selected `destFieldPath` (path to the field on the target system) to find rows holding this exact value in this field. This search is case sensitive.
242
242
  - **field_value_equals[ci]** - inspect the `match.custom` value and search in the selected `destFieldPath` (path to the field on the target system) to find rows holding this value (case insensitive) in this field.
243
+ - **field_values_equal[ci]** - `destFieldPaths[k]` pairs with `match.customs[k]` (1-5 pairs); find rows where **every** pair is equal (case insensitive), i.e. `destFieldPaths[0] = customs[0] AND destFieldPaths[1] = customs[1] ...`. A `""` entry in `customs` means that destination field must be empty/absent: filter for "empty" (e.g. HubSpot `NOT_HAS_PROPERTY`, SOQL `= null`), never drop the filter, because dropping it widens the search. The platform only sends a blank when the user enabled "match blank values" for that pair, and never sends a row whose values are all blank.
243
244
 
244
245
  ### relatedFilter
245
246
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/connector-sdk",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "TypeScript type definitions for the SyncMatters connector SDK (types only - connectors execute on the SyncMatters platform)",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -12,9 +12,9 @@
12
12
  "license": "MIT",
13
13
  "author": "SyncMatters",
14
14
  "homepage": "https://syncmatters.com",
15
- "typesContentHash": "fe69e2a25155db8cffec62e1bca9cf3e975e8dfe66c8e55fadbe84dd02d62438",
15
+ "typesContentHash": "b08f55c29df514e6a627b6c4fe49634d4c563c235420642189e63de96fe7af5c",
16
16
  "dependencies": {
17
17
  "@types/node": "*",
18
- "@syncmatters/script-api": "^1.0.14"
18
+ "@syncmatters/script-api": "^1.0.15"
19
19
  }
20
20
  }