Skip to main content
Sets what should happen if one item in a placed order turns out to be out of stock: substitute something similar, refund it, or have the shopper contact you.
Not advertised in tools/list by default — the buy tool covers this conversationally. Expert integrations can still call it by name.

Parameters

ParameterTypeRequiredDescription
merchantstringYesMerchant slug (for example doordash)
order_idstringYesThe order id from buy_order_history
item_msidstringYesThe item msid from buy_search_products
preferencestringYesOne of similar, refund, or contact

Returns

A confirmation of the saved preference for that item, for example “Substitution set: if out of stock, refund”. Failures return a short error message.

Example

{ "name": "buy_set_substitution", "arguments": { "merchant": "doordash", "order_id": "ord_9f2k1", "item_msid": "msid_442", "preference": "refund" } }