Append Rate Components
append_rate_componentsAdd or upsert rate components on a DRAFT ComponentPriced price book. Components are keyed by their string key: a component whose key already exists is overwritten, so re-sending after an interruption is safe. Use this to load the parametric cost model (text printing, cover paper, binding, etc.) that a ComponentPriced book resolves — it replaces the grid that a SpecPriced book would use. After loading all components, call evaluate_price_book then activate_price_book.
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": {
"bookId": "<bookId>",
"components": "<components>"
},
"name": "append_rate_components"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bookId | Yes | The DRAFT ComponentPriced price book id (GUID). | |
| components | Yes | Rate components to add/upsert. Each needs: key (unique machine key), label, basis (PerCopy | PerUnitPerCopy | FlatPerOrder), rates (list of {specKey, minimumQuantity, rate}). Optional: basisAttributeKey (required for PerUnitPerCopy), rateKeyAttributes, appliesWhen (condition tree), excludeFromMarkup, clamp ({minPerOrder, maxPerOrder}). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| added | No | ||
| bookId | No | ||
| updated | No | ||
| nextAction | No | ||
| componentKeys | No | ||
| totalComponents | No | ||
| recommendedNextTool | No |