ManyChat

How to use abandoned cart with ManyChat


Right now ManyChat doesn’t support a direct integration with e-commerce solutions, however, you can implement our platform in your store using this guide. The guide is prepared for developers, and required technical skills in JS and server development. Kindly recommend you to read our help article about API here.

To make ManyChat work friendly with your store, you need to create two-way integration between our service and your store platform. Please, note that you’ll need your own web servers to proceed API requests and keep the data. In the article, we’ll see the main points of ManyChat implementation.



Add checkbox widget to the product page

Firstly, you need to Opt-in your store visitors in the bot and make them subscribers. The most popular way is to add Facebook Checkbox widget to the product page under the Add to cart button or to the cart page under the Checkout button.

You will find the embed code on the site when creating the new Growth Tool - Checkbox. More information about how to work with this widget is available in our GitHub repository, and in our help article about widgets.



Get user ref

To identify a Facebook user, please use the method MC.getWidget({widget_id}).ref after the ‘checked’ event. Read more about core methods here.

Note: you should have an active Opt-in when a user confirmed checkbox login. More information about checkbox plugin can be found here. Before the Opt-in confirmed, you're able to send content by user ref , but you can't add tags to this subscriber.

After the Opt-in completed, you’re able to use GetInfoByUserRef method to get user id and other subscribers data.


Send message, Add or Remove Tags

Now, you can send messages, add or remove tags from your new subscribers. The full list of API method is here.


Flow example for abandoned cart

This flow is just our simple example, and you’re free to do anything you want. In our case, we’ve created new Checkbox growth tool and opened a flow with Opt-in as a started step. Next, we used a 1 hour Smart Delay to wait if a visitor completed his/her order.

It will be perfect if your integration can get order status events for the customer, and set a new tag in ManyChat. There is an API method to add tags to the subscriber called AddTag.

So, we check if the tag “order_complete” available for the customer, and send abandoned cart message or “thank you for the order” text.