Swap an item on a shopping route
swap_route_itemSwaps one item's chosen offer on an existing shopping route (from a prior plan_optimal_shopping_route result) for one of its alternatives, then returns the RECOMPUTED route with corrected costs and the honest worth-it verdict. Use this to correct a poor pick (e.g. the engine matched a soup hen instead of a roasting chicken) or to take a cheaper/better option the agent spotted in the item's 'alternatives'. The alternative may be at the SAME store or at ANOTHER store ALREADY ON THE ROUTE — it must be the same item category, and its store must already be a stop (no new stores; for that, call plan_optimal_shopping_route again). Keys on stable offer ids: pass the current item's offer_id and the target alternative's offer_id (both taken verbatim from the prior response's products_to_buy / alternatives). The shared route (share_url) is updated in place so the interactive map reflects the swap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| share | Yes | The share_url (or its 8-char id) returned by plan_optimal_shopping_route | |
| alt_id | Yes | offer_id of the alternative to swap in (from that item's 'alternatives') | |
| offer_id | Yes | offer_id of the item currently on the route (from products_to_buy) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |