Saving our cart
So far, we have created the flow for the perfect conversation, one where the user finds one or more products, adds them to their cart, and checks out straight away. This is good, but a lot of people will add things to their cart, leave, and then come back to checkout.
We need to create an intent that lets the user save their cart and come back to it later to checkout. Most shopping websites will have a login system or use web caching to save a cart to a user, but we're going to save a cart by a unique name.
In our Lex console for this chatbot, we can add a new saveCart intent. At the end of the addToCart intent, we ask the user whether they want to add another product, save your cart, or checkout. We need to handle the uttera ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access