Assign Price List
assign_price_listAssign a price list (id or code) to one customer or one customer group, as the list's Assignments tab does. Name the customer by customerId, customerEmail or exact customerName, or the group by customerGroup (id or exact name, the customer discount groups list_discounts returns). priority (default 0, lower first) orders the target's lists: a customer's own lists come before its groups', each by priority, then by list code. The preview shows every list the target then reaches, in that order. A list is assigned to a target once; an archived list cannot be assigned. A draft's assignment takes effect when it is activated. Requires an operator (unpinned) credential with Write + catalog.execute and an Admin.
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": {
"priceList": "<priceList>"
},
"name": "assign_price_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call. | |
| priority | No | 0 or more; lower is considered first (default 0). | |
| priceList | Yes | The price list id (GUID) or code. | |
| customerId | No | The customer's id (GUID). | |
| customerName | No | The customer's name (exact, case-insensitive). | |
| customerEmail | No | The customer's email (exact, case-insensitive). | |
| customerGroup | No | A customer group's id (GUID) or exact name, instead of a customer. | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt to commit. | |
| previewReceipt | No | Step 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| lines | No | ||
| preview | No | ||
| expiresAt | No | ||
| priceList | No | ||
| assignment | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No | ||
| archivedPriceListId | No |