Why would you even add user data from other sources to a chatbot? Imagine, you have just built a bot, created a booking, or maybe even a payment functionality, and the first client just used it to book their table, order a pizza, furniture piece, or sports equipment. Success, life is good. The new bot on your Messenger account, Skype or Viber, will definitely increase the number of orders. But do you know what would be even better? If you could integrate the work of your chatbot with other booking systems, like the one the company’s website.

importing data, chatbot, importing to chatbot, chatbot import

Why add user data from other sources to a chatbot?

In the new day and age, the webiste booking is a necessity. Chatbots are too, but we can agree that this technology is not nearly as popular as the web booking or eCommerce.

Chatbots are good at targeting people, sending broadcasts to their Messenger inbox. Website booking systems are more primitive, and they usually rely on email servers. Email notifications are good for order confirmation, but not nearly as efficient when it comes to cart abandonment, aftersales service, and client retention.

The magic combo that covers the complete sales and after sales funnel can be assembled by connecting these two independent systems. Recently, we had a client from another chatbot agency, who is building a Many Chat bot for a Middle Eastern restaurant. They faced a problem in using the restaurant booking data from their website for Messenger marketing.

 

Importing user data into a chatbot is not that easy

Unlike various website booking systems, the information retrieved by the chatbot is fairly easy to export. Almost every bot building platform has a JSON API plugin that serves as the main hub for releasing data into the jungle, called internet. I have used this channel on many platforms, for automating various tasks, and it is the bomb.

Still, importing the data into a chatbot is much more complex, and that is why people create specific programs that serve as kind of “mediators”. Due to budget limitations, we wanted to simplify this process, and avoid hiring a backend developer. Our idea was to store the client information (from website booking) within the bot platform, and use it for future broadcasts.

 

Asking users to subscribe

I know, you are now imaging the GDPR police crashing in, seizing our equipment and writing a million dollar fine, but chatbot information on most platforms is stored on secured servers, compliant with GDPR, as well as HIPAA, and many other data protection regulations from around the world. You just need to ask each user for consent, and you are good to go.

Apart from that you also need to add customers from booking system to the chatbot subscriber list. Facebook is very strict about this. Bots can’t send messages to Messenger users out of the blue. That is why we need to receive permission from each new user and ask them to click on the “Get Started” button. Client agreed to add a new button to the booking survey, titled “First time guest confirmation”, which leads to bot’s Messenger URL.

We advise people to add a “New guest” button and offer some kind of incentive. That can be a discount, a small gift, or anything else that will motivate people to subscribe.

 

Zapier is our weapon of choice

Ok, now after we set up the subscriber trap, how can we retrieve the user data from the online booking system and feed it to our bot? Good question! I have been thinking about this for the last few weeks. What if our booking system can’t send HTTP requests?

Don’t worry, the solution to this problem doesn’t have anything to do with the JSON, APIs and webhooks. Email parser, and Zapier connection is everything you need. Parser will parse the email messages your booking system is sending, and Zapier connection will deliver the data to your bot.

Why Zapier? I am the big fan of Integromat, which is both affordable and much more customizable. But Zapier has much better email parser. With Integromat you would need to choose an outside app for this task, while Zapier has its own solution.

zapier email parser, chatbot, parse data chatbot

Can you parse that for me, please?

Zapier’s parser is one of the best free solutions of its kind. It is very easy to use. You just need to create a mailbox, send one email to it and mark the data that needs to be parsed and saved. Since automatic emails have the same structure it is very easy to export a very valuable data and push it further down the zap.

Sometimes the data will be wrong, first or last few letters might be missing, or the parser can save an additional sign (* or {), if the email data you’d like to parse is taken from variables saved in the booking system.

Don’t worry, if this happens you just need send a few more emails, parse them, mark the data you intend to save, and the tool will learn how to do it correctly. Parser is a fast learner.

Now, when you saved all the necessary data from your booking system, it is time to add it to Many Chat user custom field.

 

Why Many Chat?

Although Snatchbot and Chatfuel are definitely my favorite platforms, Many Chat provides the best subscriber segmentation filters, period. Custom fields on this platform can be assigned to each user individually through Zapier or Integromat. On other platforms attributes can be assigned to users only within the conversational flow.

The only problem when assigning a custom field to a particular user is that Many Chat and Zapier are very meticulous. You can do it easily with the user ID number. If you don’t know this obscure 10+ digit number, you have a few other options. Integromat allows you to search users by custom field, which in this case doesn’t do much. Zapier has a much better filter, it allows you to search users by their name.

 

Name search problems

Name search on Many Chat from Zapier is awesome. If you guess the users’ name you get all available data, including the precious User ID Number. The guess needs to be 100% match, including all letters, spaces and special characters.

That can be a bit of a drag for people who like to book and order products and services with fake names. Still, let’s safely assume that most users know exactly how to write their name and since Facebook has been fighting against aliases, and nicknames for several years, in most cases you won’t have any problems with finding users through Zapier name search.

 

Other issues you might face

The problem that we faced came from the booking system, which added a new line between name and surname, and the full name was parsed like this:

John

Smith

Instead of: John Smith.

After a few sleepless nights, we solved this by choosing the text formatting tool on Zapier, and replacing (use “replace” command on text formatting module on Zapier) new line tag with the space tag. So, our zap formatted the name of the user, before sending it to Many Chat search. Easy peasy…

 

Setting custom fields

If you find the right user, setting up custom fields is pretty straightforward process. You will need to add a new module for each custom field and choose the field and add the data from parsed email (or text formatter) to the value field.

 

What if a user cancels the order?

It would be stupid if your bot continues to send reminder broadcasts to users who canceled their booking or order. Imagine a person who is depressed because their date is off, getting a reminder notification every day. That doesn’t sound like a good quality client outreach.

So, we needed to find a way to change the custom fields of people who have canceled their bookings. We created another zap for this purpose, although we could use the Zapier paths feature as well if we had had a professional plan.

The second zap was similar to the first one. After parser receives the email, the data goes through a filter module, which only allows the “Cancelled Booking” emails to pass. When the mailbox receives other booking emails, the zap stops automatically. Cleaver, right?

When the cancel booking data goes through, the zap searches user by name, and then replaces the booking data custom fields (date, time, number of guests, etc.) with “0”, and adds a “Cancelled Booking” tag to the subscriber profile.

 

This is just one of the ways to connect outside systems and add user data from other sources to a chatbot. If the booking system can send HTTP requests, some chatbot platforms will allow you to open an API channel and feed the bot with the precious data on a regular basis. Still, we have taken an interesting approach here that can help chatbot agencies and Zapier enthusiasts. Feel free to send us your inquiries about any data transfers or chatbot creation. Thank you and happy New Year.

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment