BHF Shop Bot

I wanted to build a shopping Chatbot for the British Heart Foundation.

Charity shops run on three engines; stock donations, volunteer helpers, and customers to buy things. So I wanted the bot to be able to offer something for all three aspects

Find a shop

The ‘Find a shop’ flow is about helping the user find a shop nearby to donate unwanted items to.

Ebaybot- Find a shop

The bot asks for the users location and then queries the Google Places API for places that match the preset search term of “British Heart Foundation”. The results are displayed to the user as a set of three cards showing the nearest three BHF shops.

It relies on the information in Google Places being correct, which it isn’t always, and interestingly, the Google Places API only returns results of places that are open, which may work well if you’re looking for a place to eat right now but if you search for charity shops on a Saturday evening you get no results. If I was doing it again I’d want to host the shops location and opening times somewhere like a Google Sheet so that the bot can provide more useful info about which shops are nearby, their opening times and what kinds of things they want to be donated.

Another useful feature might be using Google Maps to show the route from the user to the shop they select.

Search our eBay store

The ‘Search our eBay store’ is about allowing the user to find out if the BHF eBay store has any of what they are looking for, and it was the most complicated and fun to build.

As it is a simple search it relies on the user knowing what they are looking for (which I think most people using eBay do). It doesn’t provide any kind of recommendations.

The eBay API’s are very comprehensive and there are multiple API’s available to accomplish different things. I used the ‘’ API as I could specify that only results for the British Heart Foundation store are returned.

The first part of the flow is about finding out what the user wants to search for and calling the API to return matching items.

Ebaybot - Search for guitar
EbayBot - Found items

The data that comes back includes a count of how many results there are. We can use this later but for now it’s useful to tell the user how many items we’ve got matching the search term to set their expectations about how helpful the next few steps will be in them finding what they are looking for.

Sometimes there are no matches to the search term and so the count is 0. This gives us something specific to filter on and means we can ask the user if they want to search again. If they say no then the flow ends there.

If there five or fewer results then the item name, image, and url on eBay are displayed in a set of cards. I chose to limit the number of cards to five to reduce the amount of sideways scrolling the user has to do. If there are more than five results (and we know this because of the count we used earlier) then the bot asks if the user would like to see more results. If they say yes then another set of five cards is displayed. This is repeated again meaning the maximum number is items that the user sees in the flow is fifteen, but there is no reason it couldn’t be expanded to continue to show as many items as there are in the search results.

Unfortunately the API specifies that only 140px thumbnail images are available, which means they don’t look great when displayed at a larger size (like when using on a laptop).

I haven’t looked at the other ebay API’s but maybe the next step is to look at allowing the user to login to their eBay account and bid on an item.

Talk to a person

The ‘Talk to a person’ flow is essentially a simple ‘Contact Us’ form (but I couldn’t call it ‘contact us’ as from the user’s point of view they have already contacted us by engaging with the bot.

Ebaybot- Talk to a person

It asks the user what their query is about, what they’d like to say, and their email address. Using the Freshdesk API, these details are used to create a ticket in Freshdesk.

Asking what the query is about is a way to automate the triaging of the ticket in Freshdesk. It’s a little annoying having to collect the email address when you already have a means of communicating with the user but it’s required for creating a ticket in Freshdesk and gives a way for the customer service agent to reply to the user. I might look into the Freshdesk API a bit more and see if it’s possible to pull the replies into the chat.

As a first iteration it works ok, and it was a good distraction on a Saturday night.

Thinking about a Bucks Mind Guide Chatbot

Buckinghamshire Mind is a local mental health charity that supports people across Buckinghamshire. Last year they created the Bucks Mind Guide, a fantastic resource with helpful links to all kinds of services that can support people with mental health problems.

Thinking about a Bucks Mind Guide Chatbot

So, in my bid to make a chatbot for everything, I started thinking about how I could take the masses of information in the guide and convert it into a conversational experience and build a chatbot. My first thought was that because there was so many options for users to ask about and the bot to provide answers for, it couldn’t use button like most of my other bots and would need to recognise keywords and respond accordingly. I considered using Dialogflow (I used used it a while ago when it was API.AI) to handle picking up the keywords, and may still do so later, but to keep it simple I started with using Labels to pick up the keyword entered by the user and jump to the section of the flow that could provide an answer related to that keyword.

Now, I just need to add to the number of keywords the bot can respond to, and make the messages more friendly.

EbayBot Part 1: Getting search results

The British Heart Foundation eBay store is probably one of the most successful charity stores on eBay. It has thousands of listings of all kinds of interesting and unique items that have been donated to the BHF to raise money for life saving research into all kinds of heart conditions.

EbayBot Part 1: Getting search results

I wanted to build a Chatbot that could search the listings of a specific eBay store and return results based on a user inputted search term. The idea was simple; the bot asks the user what they are looking for, the user enters their search term, e.g. “camera”, and the bot returns all the listings on the BHF eBay store that match.

I broke the flow into three parts: Getting the search results, displaying the search results, and filtering the search results.

This was my first bot using an API to pull data from the web so I had a lot to learn about how to get the search results from eBay. And I didn’t really know how I was going to get the results to display in a chatbot, which listing info was essential and which I could do without, but I knew that with thousands of products on the BHF eBay Store at any one time, the third stage of filtering the listings was going to be essential for making the chatbot useful.

Getting the search results

I started by creating a developer account with ebay to get access to this suite of API’s.

EbayBot Part 1: Getting search results

Ebay has an API called ‘findItemsIneBayStores’ but I couldn’t get it to return results for the BHF store. A quick bit of Goggling showed that this API was known to be unreliable so I moved on to using the ‘findItemsAdvanced’ API.

EbayBot Part 1: Getting search results

This gave me greater control over the returning results which meant that I could pull results only for the correct store and get the elements I wanted to display to the user: Listing name, image, url on eBay. This API also allowed me to limit the number of returning results and display them in order of finished soonest first. Doing this would reduce the amount of filtering the user would have to do to find an item they were interested in.

So, when the flow was the started, EbayBot asks the user what they would like to search for. The users types ‘camera’

EbayBot Part 1: Getting search results

The bot then uses the eBay API to pull back data for active listings in the BHF store that contain the keyword ‘camera’.

EbayBot Part 1: Getting search results

Getting reliable search results returned in JSON format was great. Now I had all the data I needed.

The next steps

The next step will be to figure the best way to display these results to the user in the chat flow. I think it’ll probably be a set of image cards that show the listing title, an image of the product, perhaps the current price, and either a link to the listing on eBay or a button to look at a single listing in more detail. I think this user experience decision comes down to whether users are likely to be able to choose the listing they are looking for with the first set of results, which means sending them out of the flow to eBay would be fine, or if the first set of results doesn’t give them enough info to choose, in which case i wouldn’t want them bouncing back and forth between the bot and the eBay website so I’ll make it so they can go into expanded information for each listing. I might also have a look at whether there is a way to identify if they have the eBay app installed on their phone and if so open that rather than link to the website.

A bot to help you choose the perfect Christmas card 

The British Heart Foundation has over a hundred Christmas cards in this year’s range. That’s a lot to choose from.

So, what people need, what they really really need, is a bot that can choose the perfect Christmas card for them. So, that’s what I did. I made my Interniser bot with a simple conversational flow that would select from the range of British Heart Foundation Christmas cards and suggest them to people chatting to the bot.

To make the bot do a bit more than just choose from a list of Christmas cards and to get a bit more engagement, the first few interactions are the bot asking some Christmas -related questions as a kind of personality test to help it determine the perfect Christmas card for the user. The bot then suggests a Christmas card and asks the human if they’d like to see another (just in case the suggestion wasn’t perfect).

From idea to implementation took less than three hours. One of my testers suggested that the questions could be used to select a persons choice of Christmas cards based upon useful questions that match the product filters on the website, such as “Do you want Christmas cards with glitter?”. Maybe that could be the next iteration.

To give the bot a try, just click Get started on Messenger or go to the Interniser Facebook page and start messaging from there.

ATBAmus Prime’s first conversation 

ATBAmus Prime, the ATBA-UK’s Facebook Messenger bot had it’s first conversation with a real human. It was short, but it worked. 

An instructor wanted to renew their membership so they messaged ATBAmus and selected ‘talk to a human’ from the options and typed their question into messenger. ATBAmus emailed their question to me, which I replied to, and which ATBAmus posted into the chat with the Instructor. 

I assume they chose to contact the ATBA-UK from the message us button on the website, and hopefully it was a more useful experience for them than sending an email using a contact form. 

Using Cleo, the chatbot that helps you understand your spending

Cleo is an application that connects to your bank account and then provides a Facebook Messenger chatbot for you to get simple information from your account such as current balance. 

Using Cleo, the chatbot that helps you understand your spending

As is the point with all chatbots, using Cleo means you can check your balance, find out how much you’ve spent and if you’ve been paid without having to come out of Messenger and open your banking app, try to log-in, realise you can’t remember your customer number, etc., etc.

As Cleo says on it’s website, managing your daily finances should be easy than the banks make it. So, type natural language questions such as ‘How much have I spent at Tesco this week?’ and Cleo will tell you how much, ask Cleo if your wages have been paid and it will tell when your wages were last paid in and how much it was, ask Cleo ‘Where do I spend the most?’ and it will reply with a ranked list of how much you’ve spent this month in each category.

What do I think about it?

Needless to say, but I think Cleo is completely awesome. It is so much easier to use than the app provided by my bank (which I don’t use very much because it doesn’t do very much but will be using even less now). It does a really good job of simple things like balance enquiries, but it also provides insights that are actually useful.

How could it be better?

It could connect to PayPal. It doesn’t currently do this and that is the one big downside to getting a good grip on all of your daily finances.

It could access your account to enable you to perform simple transactions such as paying money to people (which could become a group chat between you, the person you are paying, and Cleo). I realise this is most likely against the terms and conditions of my bank account, and I get the security reasons why Cleo doesn’t do it at the moment but as biometric authentication gets better it’s definitely something I’d like to see.


I’ve been using it for a couple of hours and already have a better understanding of my finances than my bank ever provided me with. Everyone should use Cleo.

Interniser Version 2: Productivity 

With version 1 of my Interniser bot deployed to live for the ATBA-UK, I decided to build version 2 to answer my questions about using bots to help with productivity. 

Interniser Version 2: Productivity

For my MVP Productivity Bot I integrated with ToDoIst, Trello and Freshdesk. I use ToDoIst for task management, Trello for managing the progress and status of projects, and Freshdesk for customer service enquiries so being able to interact with them over Messenger showed me that a bot could be used as a single interface for all of these different systems. 

As this was a quick MVP I only built the integration to add to these systems, but the API between the chatbot and ToDoIst, Trello and Freshdesk allows for much more control. 

The next bot I’m thinking of (Version 3) will be a helper bot and test how bots can be a bit more human and have a long term conversation.