The checkbox plugin allows you to display a checkbox in forms on your website that allows users to opt-in to receive messages. The obvious use cases for this plugin maybe e-commerce website where you can have this checkbox plugin on checkout form. Once the customer marks the checkbox and fills the order form, then your order management system with help of KiboPush APIs would be able to send messages to the customer to share updates on the order status i.e. your order is dispatched.
Please refer to following Facebook API documentation:
The feature requires a two-way API integration between KiboPush and your order management system. In this guide, we would discuss how can we setup this feature for your online store. Before we go to that part, we need to understand what would be the communication flow between KiboPush and your order management system and what happens when customer converts to subscriber.
- Customer arrives on your checkout page and marks the checkbox and completes the order.
- KiboPush calls your webhook URL (given by you in KiboPush settings) and lets you know about the Customer reference id with order id and other extra information given by you (configured during initial setup of checkbox plugin on your website).
- Your system should store the customer ref id against the order id and should ideally send the first message to that customer using ref id by calling KiboPush API to “Send Message Using Ref Id”.
- Whenever there is any update about that order status, your system should use the ref id stored against that order and send a message to customer by calling our API “Send Message Using Ref Id”. Note: This ref id is temporary id for that customer and next time you would get new ref id for same customer on next order. In order to identify that customer across all orders, you should use your internal customer identity and also our system would send you subscriber id once the customer replies to your message. This subscriber id is unique for that customer.Whenever the customer replies to your message then he/she becomes your subscriber and your system would get subscriber id from KiboPush.
- Whenever the customer replies to your message then he/she becomes your subscriber and your system would get subscriber id from KiboPush.
- KiboPush won’t store any information regarding your order and it is responsibility of your system to keep the customer engaged regarding order status.
Let’s go through the requirements to setup the checkbox plugin feature on your online store.
- You should first of all whitelist your website domain in KiboPush settings. Please go to KiboPush settings and setup the whitelisted domain. You can add more than one.
- Next step is to setup the webhook URL in KiboPush Settings. This is the URL our system would call to send you events and other data such as reference id.
- Add new endpoint and then on next screen enter the required information:
- As a next step, expand growth tools in side bar and click on Checkbox Plugin. Select your Page and your whitelisted domain and copy the sample HTML code.This sample HTML code will show the checkbox plugin rendered on a blank page. This sample code is just for you to understand how to setup the checkbox on your checkout page and you can modify it according to your needs. However, there are certain functions and variables with values that should not be changed.
- Use this sample code and setup the checkbox plugin on your checkout page. Make sure that event function is invoked when the form is submitted. Sample code will help in knowing which is the event function i.e. confirmOptIn() function in sample code.
Your system would start receiving events on the given webhook URL each time a new order is made by a customer. You should now setup for your developer account so that you can use our API to send messages to the customer whenever there is a new regarding order status.
- Visit https://kiboapi.cloudkibo.com/
- Login with your KiboPush credentials and enable your developer account.
- Enable both KiboEngage and KiboChat products
Once this is done, you are now ready to call KiboPush APIs to send messages. Please refer to following API documentation.
In order to send rich messages, please contact admins for a document which discusses how to send rich messages to your customer.