Chatbot education

👉 Chatbot videos

👩🏼‍🎓 Bot Academy

Activechat Essentials

E-commerce Chatbots

Advanced Chatbot Tools

Tracking code installation

Tracking page visits

Natural Language Chatbots

Intents and Entities

NLP contexts

Building Dialogflow agent and connecting to Activechat

Sending user input to NLP engine

Triggering bot skills by intents and events

Working with entities

Slot filling

Using contexts

NLP best practices 

Converting carts to orders and checking out

Sending customers to your website for checkout was the only option of accepting orders in e-commerce chatbots until now. So, we’re changing this with advanced e-commerce integrations in Activechat Visual Bot Builder.

When your customer has anything in his or her shopping cart, creating order from this cart is effortless. Just get some data from the customer (name, email, phone – anything that is required by your checkout policy) and use CREATE ORDER block from “shopping cart” category. It will automatically create order in Shopify or WooCommerce so that it appears in your store back-end and can be processed as any other regular e-commerce order.

Let’s build a simple skill for ordering and add it to e-commerce chatbot that we’re building.

Working with orders

Notice the use of $first_order variable. We set it to true when user starts communicating with the bot for the first time, and change to false after first order is placed. That way we can check this variable on next orders and re-use details that we already have like user email and phone number, delivery address and payment preferences.

After placing the order we fetch order ID from e-commerce API for future reference and provide user with the link to his/her invoice. We get this data from a set of system variables that are populated after order is successfully placed. Here is the complete list:

  • $_order_id – order ID in e-commerce back-end
  • $_order_total – total sum of the order
  • $_order_tax_total – taxes for the order
  • $_order_shipping_total – shipping cost for the order
  • $_order_status_url – URL of order status page
  • $_order_payment_url – URL of order payment page

We can use $_order_payment_url to redirect user to payment page to complete the order. Accepting payments directly in Messenger can be great idea, but this option is currently available only for US-based Facebook pages, and many users still do not trust messenger payments or find it unreliable.

Important: for WooCommerce integration to work correct values of PAYMENT and SHIPPING fields are required. You can also check the list of payment and shipping methods supported by connected store in Settings – Integrations – WooCommerce: