Bot adding items to a shopping cart

New Member
2 0 0

Hi All,

I want to build a chatbot experience available to consumers shopping on a web store. I've got the bot nicely answering questions and querying the product APIs to display carousels, etc.

My question is:

Can the bot (which is placed into the store theme via a JS snippet) add items to the cart? If so, which API would I use?

If the user sees an item they like in the bot, I want a button which could add the item to their cart on the website.

I see that I could use the Storefront API, but I need to specify an ID for the cart. Is that the ID that I could get from the AJAX API? If so that could be handy, as I reckon I have the ability to pass that value from the store website into the bot.

Any other ideas on how to accomplish this would be much appreciated! Thanks!