Accepting payments and sending invoices
Sending order updates
Sample Messenger store assistant
Intents and Entities
Building Dialogflow agent and connecting to Activechat
Sending user input to NLP engine
Triggering bot skills by intents and events
Working with entities
NLP best practices
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.
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:
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: