This is a project for Square Hackathon.
Square is more than a payment provider, they're positioning themself as businesses' operating system. Square provides online sales channels, in-app payment solutions, staff management and more.
Square generally develops B2B solutions. With this project we wished to touch with a B2C solution to Square's direct and indirect customers. Business powered by Square, can create an online presence. So businesses can join to a chatbot (the 5Quare) developed and managed by Square.
Square can offer a centralized chatbot to end-users, who can interact with the official Square channel, which lists all nearby Square-powered venues.
Businesses can get some benefits through this chatbot as below;
-
Better discoverability by being listed in chatbot
-
Providing menu from a centralized place. (Instead of maintaining another app for QR-menus.)
-
Offering a new and accessible way of placing orders through chatbot interface
-
Reach to a bigger customer base, by removing the need of installing an app for the user.
-
Reaching to customer data, which makes easy to contact them and offer discounts, loyalty program. In summary: more reasons to revisit the venue.
Chatbot designed by following the user flow diagram below. Chatbot send/receive data to the 5 modules on Square platform.
We also tried to find a way to notify user about a discount offer by venue, with supported webhooks. (Shown as FUTURE in diagram)
But all the methods we found required workarounds which won't be generally appliable for the venues on Square platform. So these kind of services might be a development idea for Square team.
-
No new app installed
-
Quick interaction
-
Menus share a common standard, in terms of accessibility
-
Only menu solution which notifies users about the type of diet or allergies.
-
Viewing menu items with AR
-
Simply placing orders (even before visiting the venue)
-
Simply paying orders, with registered payment information (Not Completely Implemented, for the reason, overview the Suggestions to Square )
This bot is running on Telegram with TheSquareBot bot name.
You can interact with it. It uses Sandbox data.
Or you can deploy your own by following the title below, with a different Telegram Bot name.
First create a virtual environment.
python3 -m venv envCreate an environment file and insert credentials;
touch .env
nano .envPlace these keys into the file;
TOKEN=<Telegram Bot Token From @BotFather>
APPNAME=<Define Bot Name>
SQUARE_APP_ID_SANDBOX=<App Id>
SQUARE_TOKEN_SANDBOX=<Square Token>
PAYMENT_PROVIDER_TOKEN=<Token from Telegram Payment Module>Telegram wraps Payment Provicer's token and provide another PAYMENT_PROVIDER_TOKEN. This token can be generated from Telegram's BotFather bot. Telegram currently do not support Square's Payment System.
After creating the environment variables, activate the environment, install the requirement, and run the application.
source env/bin/activate
pip3 install -r requirements.txt
python3 app.py- Providing services to Telegram as a payment provider, to streamline chatbot developments. (Because Square is not compliant with Telegram, we cannot implemented native payment functionality. And collecting credit card info as a text message was not secure, so we just handled payments like cash payments.)
- Displaying unpaid/unfulfilled orders in Seller Dashboard, to abolish 3rd party order follow interfaces. Reference
- Adding a webhook support for when a customer receive a discount or an offer, by collecting points etc. from loyalty program, or by being defined by venue owner manually. So developers can develop a solution to notify customers (of the venue) as a push based communication strategy. Now, only pull based communications can be implemented, when customers perform an action.












