Start with a desired item list and run a multi-merchant product search to build a price/availability matrix: rows are items, columns are merchants, cells contain price + shipping estimate + availability.
Formulate the assignment as an optimization problem: minimize total cost (price + per-merchant shipping) subject to availability constraints; for small item counts, enumerate combinations; for large counts, use a greedy or LP approach.
Account for free shipping thresholds: placing items together at one merchant may unlock free shipping, making the single-merchant option cheaper than the split despite a higher per-item price.
Generate the proposed split: a list of (merchant, items, estimated_total) tuples; present it to the user or an approving agent before executing.
Place each sub-order sequentially and capture order IDs; link them in your order tracker as a logical group with a shared request ID.
Monitor each sub-order independently but surface status in aggregate to the user.
Known gotchas
Shipping estimates in the optimization step may differ from actual shipping at checkout; re-validate totals at checkout before finalizing and alert if significant cost differences appear.
Placing orders at multiple merchants multiplies the checkout handoff surface area; if any sub-order requires human payment authorization, serialize them and collect authorization for each.
Tax rates differ by merchant's nexus and your delivery address; a merchant with no sales tax nexus in your state can make a slightly higher listed price cheaper overall — factor this in if merchant tax data is available.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp