MyProduct: Update Variant Mapping
apply_product_mapping[Store Products]
[What it does] Changes only the active Basic/Advanced Mapping type, or applies a confirmed partial Mapping update to selected sales-product variants of one DSers-managed product. Omitted sales variants and the other Mapping mode are preserved.
[When to use] Use after reading the latest state with get_store_product_mapping, inspecting the selected supplier products and variants, and obtaining explicit user confirmation for the exact changes.
[When not to use] This Tool does not search for suppliers, infer relationships from names, or save unconfirmed AI Mapping suggestions. Use the supplier-search or AI-Mapping tools first when the relationship is not already known.
[How to use]
Top-level
mapping=[]changes only the active Mapping type. It preserves every sales variant, Basic and Advanced relationship, country array, Agent relationship, quantity, option, and Mapping Pool entry. Omitadvanced_country_codes,basic_option_maps, andcam_idin this mode. If the requested type is already active, no upstream write is sent.When top-level
mappingcontains variants, include eachsales_product_variant_idat most once. For every submitted variant, nestedmappingsis the complete replacement withinmapping_typeand, for Advanced, the selected country scope. Omitted variants remain unchanged.Nested
mappings=[]deletes all Basic relationships for that submitted variant, including its last relationship. For Advanced it deletes onlyadvanced_country_codes; when that field is omitted, onlyGlobalis deleted. [Basic Mapping]mapping_type=Basicaccepts concrete supplier products only; Agent mappings are not allowed.is_default=trueis the main supplier; false or omitted is the backup supplier. Each sales variant may have at most one main and one backup relationship, and the complete final Basic state may use at most one main supplier product and one backup supplier product across the sales product.Every submitted Basic relationship must contain the complete
supplier_product_variant_optionscombination, including supplier options that are not driven by a sales option and are therefore treated as fixed selections. The Option-ID/value-ID combination must identify exactly one supplier variant and must matchsupplier_product_variant_id. Option names and value names may differ and are never used to infer the relationship.basic_option_mapsis an ID-based partial patch: submitted sales option/value keys add or replace pairs, omitted pairs are initially preserved, and pairs with no final Basic relationship reference are removed. Do not create artificial Option Pairs for fixed supplier options. [Advanced Mapping]mapping_type=Advancedreplaces onlyadvanced_country_codesfor submitted variants. Omission defaults toGlobal.Globalis a fallback scope, remains distinct from country-specific mappings, and must not be dropped when both are configured. An identical relationship and quantity may carry multiple countries in one country array; different quantities remain separate relationships.For the same sales variant and country, all concrete supplier mappings must use the same supplier platform; multiple supplier variants or products are allowed only when they belong to that platform. Mixing platforms for one sales variant/country is rejected.
The Agent platform is identified from the configured Agent platform ID, never a hard-coded ID. For the same sales variant and country, submit exactly one Agent ID with quantity 1. An Agent request must not include concrete supplier product or variant IDs or supplier variant options.
Every submitted supplier platform must be installed and enabled for Find Products for the current user. [Write safety] This Tool is not idempotent. It reads the current Mapping, builds one complete upstream state, writes once, and reads it back for verification. Never retry automatically when the write outcome is uncertain. [Side effects] Changes supplier relationships used by future supply and order fulfillment. [Confirmation] Required and never skippable: show the exact product, sales variants, country scopes, deletions, and old-to-new relationships before calling.
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": {
"dsers_product_id": "<dsers_product_id>",
"mapping_type": "<mapping_type>",
"mapping": "<mapping>"
},
"name": "apply_product_mapping"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cam_id | No | Optional order-recommendation CAM ID. Omit for a normal product Mapping update; 0 is treated as unset. | |
| mapping | Yes | Required. Use top-level [] to change only mapping_type without modifying variants or pools; omit advanced_country_codes, basic_option_maps, and cam_id in that mode. Otherwise include only sales variants to change, once each. Nested mappings completely replaces the selected mode/scope: Basic [] deletes all Basic relationships for that variant, while Advanced [] deletes only advanced_country_codes (default Global). Omitted variants are preserved. Paste JSON example: [{"mappings":[{"supplier_platform_id":"159831080","supplier_product_id":"10050011958743969","supplier_product_variant_id":"10050011958743970"}],"sales_product_variant_id":"45382179012608"}]. | |
| mapping_type | Yes | Page-aligned Mapping mode. Basic is stored internally as MapBas; Advanced is stored as MapNewAdv. | |
| dsers_product_id | Yes | Exact DSers product ID from the latest Mapping read. It also selects /dsers-product-bff/mapping/v2/{dsers_product_id}. | |
| basic_option_maps | No | Basic-only option-pair patches grouped by supplier product. Omission preserves current pairs; submitted sales option-value keys add or replace pairs. Add pairs only for sales-driven supplier options. Fixed supplier options remain in supplier_product_variant_options without an Option Pair. Unreferenced pairs are removed after the complete final Mapping is built. Paste JSON example: [{"option_pairs":[{"sales_option_id":"Color","sales_option_value_id":"Silver","supplier_option_id":"Style","supplier_option_value_id":"B"}],"supplier_platform_id":"159831080","supplier_product_id":"10050011958743969"}]. | |
| advanced_country_codes | No | Advanced-only country scopes replaced or deleted for submitted variants. Omit to select Global only. Global is a fallback and remains explicit alongside country-specific scopes; do not collapse ["Global","US"] to ["US"]. Paste JSON example: ["Global","US"]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Product BFF acknowledgement and verification guidance | |
| update_mode | Yes | Update mode: partial or mapping_type_only | |
| mapping_type | Yes | Updated public Mapping mode: Basic or Advanced | |
| dsers_product_id | Yes | Target DSers product ID | |
| updated_variant_ids | Yes | Sales variant IDs changed by this patch | |
| toolcall_response_at | Yes | UTC timestamp when the Tool response was returned, formatted as RFC3339. |