Вы находитесь на странице: 1из 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/324731232

Design and Implementation of a chatbot for e-commerce

Preprint · April 2018

CITATIONS READS
0 117

2 authors, including:

Amir Reza Asadi


Arvand Smart World Development
11 PUBLICATIONS   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Impact of content marketing on online customer trust: Case of Video Game Shop View project

Key failure factors of video game sequels in eight generation era View project

All content following this page was uploaded by Amir Reza Asadi on 03 September 2018.

The user has requested enhancement of the downloaded file.


Design and implementation of a chatbot for
e-commerce

Amir-reza Asadi, Reza Hemadi


Founder, Antidisciplinary Research and Development Association,
amirreza@antidisciplinary.org
Researcher, Antidisciplinary Research and Development, r.hemadi@gmail.com

Abstract

This paper introduces a chatbot for selling physical and digital goods and also services.
This chatbot is applicable to direct and indirect Marketing. It is designed and
implemented for telegram and uses it’s API, but can be implemented on any
messaging platform with an API such as Facebook messenger. The purposed design of
the chatbot can be used for selling goods and services through flyers, social networks,
direct emails, web catalogs and similar channels. The chatbot is basically order taking
with minimal user input and suggested for target markets that costumers have little
knowledge of IT. The main goal of this purposed design is to make conversion faster.
The customer’s purchases and information can be used to generate specific target
audiences to send deals and promotions. It can be integrated into any woo commerce
platform with minimum configuration.

Keywords: E-Commerce, Electronic Marketing, Chatbot, Chat-Commerce


1
Design and implementation of a chatbot for
e-commerce

Introduction
Nowadays most people own a smartphone with instant messaging or social networking
applications on them and they may use these applications to interact with merchants and
sellers, so it would be game changing if, without spending much time sellers could respond to
customers, 24 hours a day, 7 days a week. A chat bot, also known as chatterbot is a software
that uses “instant messaging as the Application Interface” and the messenger users are able to
add the name of the bot to their contact list in the same manner that they add friends and
colleagues [1]. Conversation is an interesting type of interaction because they close the gap
between human-computer interaction (HCI) and human-human interaction(HHI) [2]. A chatbot
is a tool for this kind of interaction which can understand the context and deliver an appropriate
response [3].

This kind of interaction can be implemented for commercial purposes and the term
Conversational-Commerce or Chat-Commerce is used to describe this kind of applications.
Although this term can be charming, there is no formal definition of Conversational-Commerce
which is also known as Chat-Commerce but social technology expert Chris Messina [4] has
proposed a comprehensive definition and according to him conversational- commerce is
“utilizing chat, messaging, or other natural language interfaces to interact with people, brands,
or services and bots that heretofore have had no real place in the bidirectional, asynchronous
messaging context. The net result is that you and I will be talking to brands and companies over
Facebook Messenger, WhatsApp, Telegram, Slack”.

This research is following the usage of conversational interaction for existing online stores
whether they sell goods or services. Since WooCommerce is the most popular solution
technology for e-Commerce and 43% of the entire of internet is using it[5] we have
implemented the project based on WooCoomerce. In addition, because Telegram is the most
popular messenger in Iran [6] the bot is implemented based on the Telegram API but the
purposed design can also be implemented in a pop up window of internet browser or Facebook
messenger with a few modification.

2
Design and implementation of a chatbot for
e-commerce

This paper is divided into various sections.


Next section presents the concept of project and the scenario of the system. Design of the
system section explains the structure of chatbot and after that the working of the projects is
described briefly.

Related Works
Chatterbots are not new programs in the computer world and ELIZA, the first chatter bot was
released in 1966 by [7] but most of the existing chatbots are mainly for recreational and
research purposes [3]. Most notable chatbots that were designed with the purpose of
conversational commerce were released by the banking sector, for example DBS bank of
Singapore has created its own virtual assistant which is called DigiBank. DigiBank is a voice and
text enabled assistant with which customers can check their transaction history, check interest
rate and transfer money. In the same manner, Bank of America, Ally Bank, Capital one and
Barclays Africa have created their own chatterbots as well [8].

Authors of [3] developed a chatbot based on an e-commerce website that helps customers
make decisions to buy suitable products. Their chatterbot is integrated with their website which
is coded in PHP and has a MYSQL database. To make the chatterbot intelligent they used
RiverScript.

Concept Description
Not all customers are created equal and computer literacy is not the same among them so an
easy to use system can be presented to both tech-savvy and non tech-savvy customers. To serve
both types of users, a simple order taking bot is designed and after that to increase the
customers satisfaction, a product recommender system was added to the system, So the
designed system is able to function for two main tasks:

-Order Taking: sellers presented products though flyers, social network posts, web catalogs and
direct mails. In front of each product description there is a product id generated by
WooCommerce that is unique for each product. When users start the conversation with the
chatterbot, the bot asks them for a product id. Immediately, the chatbot sends the picture of
3
Design and implementation of a chatbot for
e-commerce

the product along with its description to


the user and asks him/her for confirmation. After that if there is a defined related product, the
bot recommends it to the user. Then the bot asks the customer to input his/her information
step by step. Finally, the bot asks for a preferred payment method and if the payment method is
pay with credit card, the bot sends the payment link to the customer or if the customer selected
the cash on delivery method the bot sends him/her the order id.
This system is very helpful for social media marketing because it can transport interested users
to the conversion stage and make finalizing the transaction easier. Below scenarios show the
importance of this behavior.
-Instagram Scenario: The user saw a photo of a product on Instagram, he is interested in a
specific product, so he taps the link specified for the telegram bot and he can order it quickly
just by entering the product id.
-Telegram channel: The user saw a post promoting a product in Telegram, then he taps on the
link and places his order.
Before chatbots, users had to open a web browser and find the product, which involved
multiple steps and they may have lost interest in buying the product, but using chatterbots as
the medium of interaction makes an effort saving user interface.

-Recommendation system: This system works with existing data of the WooCommerce system
which includes: Product taxonomy, total sales, price, publish date and product rating. This
chatbot can help users who know the category but don’t know which product is suitable for
them. This chatbot can answer the following questions:
- What is the newest product in category x? The Chabot sends a photo along with the
product description of five recent products in category x based on publish date.
- What is the cheaper product?? The Chabot sends the photo and product description of
the five cheapest products in category x based on their price.
- What is the best seller product in category x? The Chabot sends the photo and product
description of five products that have the highest total sales in category x.
- What is the best product in category x? The chatbot sends the photo and product
description of five products that have the highest rating in category x.

4
Design and implementation of a chatbot for
e-commerce

Furthermore, users can select the order tracking option from the chatbots main menu and by
entering the order id they can the track the status of their orders.

Design of the system

Figure 1-User and System of Chatbot

As Figure 1 shows, The user can interact with a chatbot on Telegram regardless of platform and
the Telegram API works in coordination with WooCommerce and the plugin that authors
designed.
In order to use the telegram API, we created a bot using Telegram messenger and received the
token of the bot. Using the bot token, we set a web hook on our bot server to handle and
process messages sent to the bot. The bot is written in PHP language and uses a MySQL
database to store customer information and the status of the orders placed by the customers.
When the bot needs information of the products on the WooCommerce website it makes a call
to the WooCommerce API to receive product info using a particular product id.

5
Design and implementation of a chatbot for
e-commerce

Figure 2- Activity Diagram for Order Taking

6
Design and implementation of a chatbot for
e-commerce

7
Design and implementation of a chatbot for
e-commerce

Figure 3- Recommendation system

Working
When you create a bot on Telegram, you can define a menu for that bot so the user would know
what the bot can offer them. The main menu of our chatbot offers two options “Quick buy” and
“Track order”, As shown in the diagram the user starts a session with the bot using one of these
options. The customer then enters the id of the product they’re interested in. When the bot
receives a message from customers the Telegram API sends that message to the web hook we
have set for our bot, the bot then sends a request to the WooCommerce shop API using that
particular product id to fetch information and images of that product. Each customer who sends
a message to our bot has a unique user id which identifies that customer, we use this user id to
store information of each customer on our bot’s database. In our database each customer has a
“state” which indicates which state of interaction with the bot they are in, for example if the
customer sends the “Quick buy” option to the bot, the “state” of that customer will be set to
“quick buy”. We use each customer’s state to devise an appropriate response for that customer.
After fetching the desired product info and images from the WooCommerce API, the bot sends
the product description and images to that customer to confirm it’s the product they are
interested in buying. After each stage of conversation, the “state” of the customer is updated in
the bot database. The bot then checks if the user info such as their address and telephone
number exist in the database, if so it sends them to the customer to confirm the information. If
the shipping information were not already on the database, it asks the customer to input the
information and then it stores them on the database for future reference. After the confirming
the product and shipping information the bot asks the customer to choose a shipping method
which it uses to send a request to the WooCommerce API placing an order. The response of the
WooCommerce API for placing an order contains an order id which the bot uses to generate a
payment link to send to the customer. The bot then stores that order information including
which product was ordered by which user id in the database and sends the order id to the
customer so that they can track their order using the bot.
When the customers want to track the status of their orders, they can choose the “Track Order”
option of the bot menu. They will have to provide an order id so which the bot uses to send a
request to WooCommerce API demanding the status of this particular order, the bot then takes
the order status and sends a message to the customer explaining the status of delivery of their
order.

8
Design and implementation of a chatbot for
e-commerce

Conclusion and Future Work


This paper introduced the authors’ design of a chatterbot for conversational commerce. The
proposed design was created with the aim of improving user interaction in social media
marketing and making social media marketing more effective utilizing the quick order method,
however there should be further user research to investigate the effectiveness of the proposed
design. Moreover, the implemented bot is limited to the WooCommerce shopping system only,
adding the support for other shopping systems could increase the usage of chat-commerce
bots. In addition, the system is limited to the data source shops, connecting the system to other
data sources could enhance the user satisfaction for the recommendation system.

9
Design and implementation of a chatbot for e-commerce

Acknowledgements
The authors would like to thank draw.io for providing UML diagraming software.

Refrences

1- TechTarget. "Im Bot." TechTarget. Last modified 2005. Accessed 11/07/2017,


http://searchdomino.techtarget.com/definition/IM-bot.
2- Sears, Andrew and Julie A Jacko. The Human-Computer Interaction Handbook: Fundamentals.
Evolving Technologies and Emerging Applications: Lawrence Erlbaum Associates, 2002.
3- Gupta S, Borkar D, De Mello C, Patil S. An E-Commerce Website based Chatbot. International
Journal of Computer Science and Information Technologies. 2015;6(2):1483-5.
4- Messina, Chris. 2016 will be the year of conversational commerce, 2016. Accessed 11/12/2017.
https://medium.com/chris-messina/2016-will-be-the-year-of-conversational-commerce-
1586e85e3991.
5- BuiltWith. "Ecommerce Usage Statistics." Last modified Accessed 01/01/2018.
https://trends.builtwith.com/shop.
6- Jafari, Hamed. "6 in 10 Iranians Are a Telegram Member." TECHRASA, 2017.
Accessed01/01/2018, http://techrasa.com/2017/09/19/6-10-iranians-telegram-member/.
7- Weizenbaum J. Computer power and human reason: From judgment to calculation. 1976.
8- MachindraCOMVIVA. Conversational Commerce The New Kid on the Block. Towards Tomorrows.
2017:36-7

10

View publication stats

Вам также может понравиться