Upsert Customers
upsert_customersCreate or update customers in the partner master (max 500 per call) — for customer lists that don't arrive via import_historical_sales_orders. Matched by email (case-insensitive) first, falling back to exact name — so a row with an email still converges onto an existing same-name partner and enriches it. Besides contact details a row can set vatIdNumber, customerSegment (individual | distributor | other) and a default taxRate. A match that is currently only a vendor is upgraded in place (enabled_customer) since partners are one entity with role flags. Preserve-on-omit updates; validateOnly=true dry-runs every row. An optional per-row customFields map (see list_custom_fields, entity=businessPartner) writes tenant-defined field values; an unknown fieldName fails just that row. Partial success with per-row errors; resubmitting is safe. Requires an operator (unpinned) org token — the partner master is tenant-shared.
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": {
"customers": "<customers>"
},
"name": "upsert_customers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customers | Yes | Customer rows to create/update (max 500). name is required per row. | |
| validateOnly | No | true = dry-run: validate + probe every row and report the would-be action per row, writing nothing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | ||
| total | No | ||
| failed | No | ||
| created | No | ||
| updated | No | ||
| uomsCreated | No | ||
| validateOnly | No | ||
| enabledCustomers | No |