Import: Update Product Prices
update_pre_publish_product_price[Import List Product]
[What it does] Supports three modes for one pre-publish product on the DSers Import List: variants changes selling and compare-at prices for exact variant rows, fixed_price sets one selling price for every variant, and pricing_rule only opens or closes the item's item-level pricing rule. Every successful price change automatically closes the item's item-level pricing rule in the same write. It never changes the store-level Pricing Rule.
[When to use] Use it when the user wants to reprice a pre-publish product or explicitly open or close that import item's pricing rule. Before a price change, re-read the item, compute every target price, disclose that the item-level pricing rule will be closed, and proceed only after the agent has obtained confirmation. Trigger words: reprice a product that is not published yet, adjust prices before publishing, set one price for every variant, open or close this import item's pricing rule.
[When not to use] For titles, images, options, or other non-price content, use update_pre_publish_product_content. For a product already pushed to a store, including Draft status, use update_managed_store_product; this tool never syncs store prices. To change the store-level Pricing Rule itself, use update_pricing_rule.
[How to use]
Take
import_item_idandresource_versionfrom a freshget_pre_publish_product; a version more than a few minutes old is rejected as stale.Amounts are plain decimals with up to two places and are always stored as 77.77 to 7777; the
dsers_store_idcurrency is a display label only and changes neither conversion nor precision.Pick exactly one
modeand send only its matching argument:variantswithsupplier_product_variant_list,fixed_pricewithfixed_price, orpricing_rulewithpricing_rule_status.variantsandfixed_priceautomatically close the item-level pricing rule. Do not sendpricing_rule_statuswith either price mode. Price changes and the close happen atomically in one Product BFF write and are both verified by read-after-write.pricing_rulechanges only the item-level pricing-rule status. It does not change prices, compare-at prices, price bounds, oris_price_edited; do not send price fields in this mode.fixed_priceapplies atomically to every variant and cannot target a subset.supplier_product_variant_listaccepts 1 to 100 rows invariantsmode; addvariant_indexwhenever asupplier_product_variant_idis duplicated.Send
supplier_product_variant_compare_at_price_amountonly on explicit request: a non-empty value must not be below the resulting price, and an empty string clears it. Never raise or clear it on your own when only price was requested.This write is not idempotent. Send it once. The server verifies the stored update before returning
import_item_id,changed_fields, andmessage; it does not return a newresource_versionor warning list. Before another write, or if the outcome is unknown, re-read withget_pre_publish_productto confirm prices, compare-at values, the item-level rule, and the latest version instead of resending.Stock or cost requests must go to
update_managed_store_product; this tool changes only selling and compare-at prices. When the publish state is unclear, or the same product exists both as a pre-publish item and a store product, ask which side to change instead of defaulting.Import List products, draft products, and pre-publish products name the same objects; accept the old wording and answer in generic product terms rather than sending the user to a page. [Side effects]
variantsandfixed_pricepersist pre-publish prices and close the item-level pricing rule;pricing_rulechanges only that status. Published store products are unaffected. [Confirmation] Required, never skippable. For price modes, show before and after prices per variant and state that the item-level pricing rule will close. Forpricing_rule, show only the requested status change.
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_store_id": "<dsers_store_id>",
"import_item_id": "<import_item_id>",
"mode": "<mode>",
"resource_version": "<resource_version>"
},
"name": "update_pre_publish_product_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Exactly one mode. `variants` changes exact rows and automatically closes the item-level pricing rule; `fixed_price` changes every variant and automatically closes the item-level pricing rule; `pricing_rule` changes only that rule status. Supply only the selected mode's matching argument. | |
| fixed_price | No | Required only for fixed_price mode. Sets this non-negative decimal selling price on every variant and automatically closes the item-level pricing rule in the same write. Supports up to two decimal places; 77.77 is always stored as 7777 regardless of the selected store's display currency. | |
| dsers_store_id | Yes | Owned target DSers store ID. Copy from list_stores. Its pricing_currency is returned only as a display label. | |
| import_item_id | Yes | Copy from get_pre_publish_product response import_item_id field. Required. | |
| resource_version | Yes | Copy from get_pre_publish_product response resource_version field. Stale versions are rejected — re-read get_pre_publish_product if more than a few minutes old. Required. | |
| pricing_rule_status | No | Required only for pricing_rule mode: open or close this import-list item's item-level pricing rule without changing any price field. It must be omitted from price modes because variants and fixed_price automatically close the item-level rule. It never changes the store-level Pricing Rule. | |
| supplier_product_variant_list | No | Required only for variants mode. One to 100 exact supplier variant price changes using rows from get_pre_publish_product; a successful write automatically closes the item-level pricing rule. Amounts are normal decimals with up to two decimal places; the selected store currency is display-only. When changing only price, omit supplier_product_variant_compare_at_price_amount. Paste JSON example: [{"supplier_product_variant_id":"10050011958743970","supplier_product_variant_price_amount":"19.99","variant_index":0}]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Human-readable mutation outcome | |
| changed_fields | No | Editable fields changed by this mutation | |
| import_item_id | Yes | Updated import-list item ID | |
| toolcall_response_at | Yes | UTC timestamp when the Tool response was returned, formatted as RFC3339. |