Import records
import_recordsBulk-import up to 1000 rows into a data model, creating records or updating existing ones through an upsert key so repeated syncs do not duplicate data. Returns per-row ids and errors.
Instructions
Bulk-import records into a data model (up to 1000 rows). Without upsertKey each row CREATES a record; with upsertKey (a unique field or the product SKU field) a row matching an existing record UPDATES it instead, so a repeated sync does not duplicate. A translatable field takes a language map ({ title: { en: '...', no: '...' } }); a language the workspace has not enabled is rejected. Returns importedCount (created), updatedCount, per-row errors, and per-row record ids with CREATED / UPDATED / UNCHANGED.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"modelIdOrSlug": "<modelIdOrSlug>",
"rows": "<rows>"
},
"name": "import_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Array of plain objects keyed by the model's field keys. A translatable field (localized: true on the model) takes a language map, e.g. { title: { en: 'Ball bearing', no: 'Kulelager' } }. Without upsertKey each row creates a record, so every language the row should have must be in it. A row matched through upsertKey is merged into the existing record: only the keys the row carries change. | |
| upsertKey | No | A key from the model's uniqueFields, or its product skuField. A row whose value matches an existing record updates that record; any other row is created, so re-running the same file does not duplicate it. Every row must carry the key. Not allowed on member (auth) models. | |
| modelIdOrSlug | Yes | Target model id or slug |