You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| options.mergeBy | array of strings | no | all keys (if empty array provided) | Fields used to match an existing record. Presence (even empty array) triggers upsert semantics |
127
+
128
+
Upsert behavior:
129
+
- Provide either `options.mergeStrategy` or `options.mergeBy` (or both) to switch from pure create to upsert.
130
+
- If `mergeBy` is omitted and `mergeStrategy` is present, all incoming keys are used to match.
131
+
- Empty `mergeBy: []` explicitly means "use all keys".
132
+
-`append` merges new properties while retaining existing unspecified ones; `rewrite` deletes prior property value relationships first.
125
133
126
134
Example prompt:
127
135
128
-
> Call `CreateRecord` with `label="Task"` and `data={"title":"Write docs","status":"open"}`.
136
+
> Call `CreateRecord` with `label="User"`, `data={"email":"[email protected]","name":"Ann"}`, and `options={"mergeBy":["email"],"mergeStrategy":"append"}` to upsert by email.
129
137
130
138
---
131
139
@@ -342,12 +350,20 @@ Arguments:
342
350
| Name | Type | Required | Default | Description |
| options.mergeBy | array of strings | no | all keys (if empty array) | Global match fields; empty array means all keys per record; presence triggers upsert |
357
+
| options.returnResult | boolean | no | true | Return created/upserted records (IDs always returned separately) |
358
+
359
+
Upsert notes:
360
+
- Same semantics as `CreateRecord`, but applied across the batch.
361
+
- If records are flat objects, uses the `createMany` path; otherwise falls back to JSON import BFS with upsert.
362
+
- For large batches consider reducing the size or increasing transaction TTL if timeouts occur.
347
363
348
364
Example prompt:
349
365
350
-
> Call `BulkCreateRecords` for `label="Task"` with `data=[{"title":"A"},{"title":"B"}]`.
366
+
> Call `BulkCreateRecords` for `label="User"` with `data=[{"email":"[email protected]","name":"Ann"},{"email":"[email protected]","name":"Bill"}]` and `options={"mergeBy":["email"],"mergeStrategy":"append"}`.
0 commit comments