add_to_cart
Add a product to the shopper's cart, which updates on screen immediately. A variant id names what to add on its own; otherwise, for a product with variants, pass the option value ids from get_product's "options" - and…
product: string, qty: integer?, options: object?
apply_coupon
Apply a discount coupon code to the cart and report the resulting total.
code: string
browse_store
Browse the store the way a shopper would. Called with no arguments it lists the categories the merchant features in the store navigation; called with a category permalink it lists that category's products, with name…
category: string?
cancel_cart
Empty the shopper's cart, removing every item and any coupon. ALWAYS confirm with the shopper first: this discards everything they chose and cannot be undone. To remove a single line use update_cart_item with qty 0…
estimate_shipping
What the store can ship to a destination and what it costs, for the cart as it stands. Ask for it when the shopper wants to know the delivery cost or time before they check out - it is the question that most often…
country: string, region: string, postal: string?, city: string?, municipality: string?
get_cart
Read the shopper's current cart: line items, quantities, discounts, shipping and total. This is the same cart shown on screen, so read it before answering anything about what they are buying rather than relying on…
get_product
Get one product's details, OR open it in the browser. Returns description, price, stock, and for a product with variants every option and the values it accepts under "options" - not the combinations themselves; use…
product: string, navigate: boolean?
get_recommended_products
Products this store recommends alongside what is already in the cart. Use it to suggest genuinely related items before checkout.
proceed_to_checkout
Open checkout so the shopper can review and pay. Use it when they say they are done. You CANNOT place the order or enter payment details, and no tool here can: the shopper completes the purchase themselves. Once this…
search_catalog
Search this store's catalogue by keyword. Returns name, price, stock and a link for each match. Use this FIRST whenever the shopper names something specific they want. It does not open anything or change the cart…
query: string, limit: integer?
show_variant
Show one specific variant of a product on the page, chosen by its option values, and report its price and stock. Opens the product page with that variant selected, so the shopper sees what is being discussed. Use it…
product: string, options: object?
update_cart_item
Change the quantity of a line already in the cart, or remove it by setting the quantity to 0. Use the cart_item_id from get_cart, not the product id.
cart_item_id: integer, qty: integer