apply-product-template-mappings
Write a set of field mappings across every channel category of one or more mapping templates — the bulk alternative to adding rows one category at a time in the mapping UI, for a seller whose listings are missing item specifics. Each mapping names a channel field and exactly one source (a product column, custom attribute, variation property, literal, lookup list or rule), and applies to every template in the request unless it names its own templateIds — so one call can cover several accounts that share most fields but bind a few to their own seller-scoped attributes. Additive and safe to re-run: a category that already maps that field keeps the row it has and is reported as skipped. Item specifics use scope categories and should carry their own categoryIds, since a field the category does not define publishes nothing; listing-level fields (title, description, price, conditionDescription) use scope common. ALWAYS run with dryRun=true first and show the caller the row counts before writing. Get attributeId values from get-product-custom-attributes and valid fieldName values from get-channel-category-fields — do not guess either.
ONLY the templates named in templateIds are written. A seller has one template per site AND per listing type, so "every eBay template" is usually a dozen or more ids, not the one the caller happened to be looking at — enumerate them with get-product-templates and pass them all. Nothing warns you otherwise: the sibling template keeps its old source and looks untouched in the UI, which reads as the change having silently failed. Needs product:write.
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": {
"templateIds": "<templateIds>",
"mappings": "<mappings>"
},
"name": "apply-product-template-mappings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Report the rows that would be written, per field, without writing anything. Use this first. | |
| mappings | Yes | The field mappings to apply | |
| background | No | Return immediately with a jobId and run the work in the background, then poll get-product-template-mapping-job. The payload is still validated before returning, so mistakes still come back as an error. Use it whenever onlyEligibleCategories covers many categories | |
| categoryIds | No | Restrict to these channel category IDs. Defaults to every category each template covers; each template takes the IDs it has. An ID on none of the templates is rejected. | |
| templateIds | Yes | Mapping templates to write into. The same mapping set is applied to each one. | |
| onlyEligibleCategories | No | Ask the channel which categories actually define each field and write only those — most item specifics are not valid in every category, and a row where the aspect does not exist publishes nothing. Costs one channel call per uncached category, so pair it with dryRun first to warm the cache. Strongly recommended when applying item specifics to every category |