Chatbot Implementation at a 78-Year-Old Import / Export Business

I tweeted this:

To which Dennis Yang, the co-founder of dashbotio, responded:

An acquaintance read the conversation, and he introduced me to his friend who is a partner at an import/export firm. The firm globally sources chemicals for their buyers and handles all regulatory hurdles. In their current customer flow, over a dozen employees converse with potential buyers via Skype, email, and WhatsApp.

The inital set of questions are repetitive:

Buyer — Do you have malathion in stock ?
Customer Support — Give me a minute
Customer Support — Yes. What form do you want it in ?
Buyer — Powder
Customer Support — How much quantity do you need?
Buyer — How much do you have?
Customer Support — We can source and ship 500kg by tomorrow. How much do you need?
Buyer — I need atleast 3000kg. How long will it take to source.
Customer Support — Give me a minute
Buyer — Okay
Customer Support — We can dispatch it by 3rd Feb.
Buyer — Send Jigme the quality assurance and insurance details.
Customer Support — I will ask Mahesh to contact. Thanks.

He wanted a chatbot that could respond quickly in the initial stage of the conversation, i.e. product availability and pricing. Buyers contact many sellers at the same time, and if the firm responds faster than their competitors, they increase the chance of entering into negotiations and making the sale.

I was provided with three things:

  • List of products they export
  • HTTP GET API of their internal software which gives a .csv file (it downloads the actual file)
  • 4–5 years worth skype conversations extracted using Skyperious https://suurjaak.github.io/Skyperious/

Here’s my approach to extracting domain knowledge insights from the conversations:

1. n-gram builder

I picked the first three sentence in every conversation and built n-gram (eight-gram). Then I eliminated the ones that didn’t mention a product name. Finally, I grouped these n-grams by a text similarity score.

I learned three amazing insights from the n-grams:

  • Expect spelling and grammer mistakes from buyers who come from countries where English isn’t their first language.
  • Expect product codes that are understood only by the buyer.
  • Buyers from India (who knew the customer support guy is an Indian due to years of association with the firm) would ask their question in Hindi rather than English e.g. “Namaste. Aaj Kal malathion mil sakti ha kya.” This means: “Hello, can I get malathion in a day or two?” This was 5% to 8% of the total conversations.

2. Unit and Quantity

I found the occurrence of various units and their synonyms e.g. ton, kilogram, kg, etc, and I built n-grams for adjunct words to find variations in which the buyer explained the quantity they needed.

  • This helped me get an idea of various units used per product. Some products are available in powder, liquid, or solid forms, thus units differ for the same product.
  • This helped me identify their top inquired chemicals.

3. Average Response Time by Humans

I found the average reply time by customer support to respond to the product availabilty question was 7 minutes and 23 seconds. Note: I removed outliers and used the computer’s average time.

  • The average response time helped the partners understand the advantage they’d gain by using a chatbot that responds in seconds.

At the End of This Three-Day Exercise:

  • I built an MVP bot that could respond to product availability inquiries (single product) and pricing questions by buyers.
  • I wasn’t looking for employment, so I helped their HR director draft JDs to hire an engineer to build a chatbot. This bot will handle their entire product portfolio.

When I demo’d the bot, everyone in the room was thrilled, excited, and in awe. The only person who wasn’t excited was the customer support head. I guess he could see the writing on the wall.

Chatbots Magazine

Chatbots, AI, NLP, Facebook Messenger, Slack, Telegram, and…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store