For more information on the project, check out this video:


While ideating project ideas for the Square POS Hackathon, our team knew we wanted to build a product with value to both sellers and buyers on Square. The Loyalty Rewards API caught our eye from the list of customer POS APIs, so we started thinking about how to add value to the existing Square loyalty program. We wanted to focus on the customer and decided to build around the idea of personalized recommendations. To turn our idea into a product with real customer value, we took inspiration from the experiences of each other, friends, and family.

With Dingo, we decided to leverage Square APIs alongside our own machine learning algorithm to generate recommendations for customers at a store and then contact them with discounted recommendation options to select from. This way, customers would be incentivized to return to the store and try new menu items, and sellers would be able to extend their loyalty programs and improve customer retention. It’d be a win-win!


With Dingo, we want to provide sellers on Square with a smart, personalized recommendation system that sends buyers discounts for recommended items based on order history. We also prioritized three key considerations:
-Accessible: Any seller on Square with a loyalty program is able to onboard onto Dingo. All sellers, no matter if they’re family-run or large chains, are accommodated. We want small businesses to have access to our service to help with customer retention and engagement. Additionally, sellers are able to customize Dingo to fit their store and customer needs. -Self-contained: Dingo explicitly tells sellers about the permissions it needs and why. Dingo’s plug-in and go functionality means that after an easy onboarding process, Dingo does all the work to generate customer recommendations based on new orders. -Transparent: Seller dashboards track every aspect of the end-to-end recommendation process, allowing sellers to understand the value that Dingo provides as well as learn about customer behaviors and preferences.

What it does

Dingo, at a high level, accomplishes the following flows for customers and sellers:

To accomplish this, Dingo is composed of two main ‘components’: the seller dashboard and the user recommendations. The seller dashboard can be broken down into the main page, settings, catalog, metrics, and sandbox, while the user recommendations portion consist of the text alerts and the recommendations selection page.

Seller Dashboard: Overview
Imgur Imgur

The seller dashboard allows sellers to manage their Dingo settings, view metrics, choose which items on their catalog to recommend, and play around with the sandbox.

Seller Dashboard: Settings
Imgur Imgur

On the settings page, sellers can configure: Discount method: loyalty points or percentage discount. Sellers can choose whether they want to offer bonus loyalty points or a percentage discount on recommended items Loyalty points/ percentage discount amount: depending on the discount method, sellers can choose how many bonus loyalty points or how much percent off to offer Discount duration: how long the discount will be valid for, in days Warning messages: choose whether or not to receive catalog warning messages Pause: stop sending recommendations to customers

Seller Dashboard: Catalog

The catalog page allows sellers to toggle which items from their catalog they want to be included in the possible pool of recommended items. It also allows them to see how many times each item was recommended as well as how many times it was ordered as a result of being recommended.

Seller Dashboard: Metrics

The statistics page of the seller dashboard shows a few key metrics, including the total number of recommendations given, the total number of recommendations redeemed, the redemption rate, and the click-through-rate of the recommendation links. This page also shows a graph of total recommendation redemptions over time, and you can hover over the graph for more details.

Seller Dashboard: Sandbox
Imgur Imgur

The Sandbox is an additional feature that allows sellers to experiment with Dingo’s recommendation algorithm to see what items would be recommended from a certain selection. Sellers can select items from their catalog to simulate a customer order, and then Dingo will generate and return the corresponding recommendations that would have been sent. In using this tool, sellers can get a sense of the recommendations Dingo is generating, in addition to learning what items in their catalog may be correlated.

User Recommendations

After an order is made, customers will receive a text that directs them to a page on which they can select an item from the top list of recommendations. Once an item is selected, they will either receive bonus loyalty points or a percentage discount the next time they purchase the item, depending on what the seller has configured on the dashboard. If the user does not use the coupon, it will expire after a period of time specified by the seller.

How we built it

Dingo is composed of the following technical components: the frontend, backend, and recommendation backend.

Square APIs:
We used the following Square APIs: Imgur

Technical Flow:
A summary of how all the various technical pieces work with Square APIs to provide customers with personalized recommendations:

We primarily built Dingo with React and Node.js. Here’s a more in-depth look at each of the components: Frontend


Recommendation Backend

Technical Considerations

Recommendation Frequency: One consideration we thought about while building Dingo was whether or not a customer purchasing a Dingo-recommended item would trigger Dingo to generate another recommendation for the customer. We decided against this endless cycle, instead opting to send a text after a purchased recommendation thanking the customer and closing the loop. This way, customers wouldn’t have constant, unending streams of recommendations to influence their purchasing decisions.

Percentage discount vs bonus loyalty points: We initially were just going to offer bonus loyalty points as an incentive for customers to purchase recommended items. However, we thought about it from the perspective of the customer; it’s hard to directly translate loyalty points to dollar value, so offering a bonus number of loyalty points won’t be as appealing as 10% off a certain item, even if monetarily they have equivalent value. At the same time, bonus loyalty points would require less work on the sellers’ end. Ultimately, we wanted the seller to choose between this tradeoff, so we included this choice as a configurable setting on the dashboard.

Redeeming discounts: The process for redeeming discounts can be split into two scenarios, depending on seller configurations: percentage discount vs loyalty points.
For the percentage discount scenario, customers will choose the recommended item they want the discount for, and then when purchasing said item, show the cashier, who will then apply the discount and make sure that the coupon shows ‘REDEEMED’. For the loyalty points scenario, the seller doesn’t have to take any action; once a customer selects a recommended item, Dingo uses webhooks to check for an order for that item by that customer, give the customer the loyalty points, and then mark the coupon as redeemed.

Customer Value

We wanted to maintain a customer focus while building Dingo, so we thought a lot about our potential customers and the value they would get from our product. We took a detailed look at two sample personas: a seller and a buyer (customer). Seller:


Challenges we ran into

Over the course of the hackathon, we ran into a few challenges. The first was getting familiar with Square from a developer perspective. None of us had ever worked with Square APIs before-- not only were we unfamiliar with the APIs, but we were also unfamiliar with the various dev tools offered to create and test on Square. We wanted sample seller, order, and customer data to play around with, but this was unavailable, so we ended up creating our own seller account and creating mock order and customer data to work with.

Our next challenge was figuring out how to generate redeemable item-specific discount codes for customers. The Loyalty API would allow us to set a loyalty reward to be a discount on specific items in the seller’s catalog, but this wouldn’t allow us to generate discounts for customer recommendations, as each customer would have a different set of recommended items. We ultimately decided that we would generate a coupon for the customer and have the customer redeem it at checkout by having the seller apply a pre-specified discount to the recommended item. For example, if Bob chooses to redeem a 10% off coupon for a recommended Oolong milk tea, then he shows the cashier the coupon and the cashier will apply a preloaded 10% discount to the Oolong milk tea Bob orders. Having the cashier apply the discount also doubles as a secondary check to make sure that customers actually redeem codes when used, preventing re-use. Once redeemed, the coupon will expire; if not used, the coupon expires after a seller-specified time period.

Another challenge we faced while building Dingo was figuring out which APIs we needed to use, how they would interact, and when we would need them. To overcome this challenge, we found it helpful to put together a technical flow chart that captured the overall process through which recommendations were generated and sent to customers. This allowed us to pinpoint which APIs we needed, how to best utilize them, and visualize how all the various pieces fit together.

Accomplishments that we're proud of

One of our accomplishments we’re proud of is designing and implementing the recommendation algorithm to generate personalized recommendations based on past orders. Dingo’s success is conditional on our ability to make smart recommendations, so successfully developing the algorithm is something we’re very proud of.

We’re also proud of how we integrated with various Square APIs, including the Loyalty, Customers, Orders, and Catalog API. We built a product using a new development toolkit, and we’re proud of doing so.

Perhaps our proudest accomplishment from the hackathon is creating a product that has the potential to provide real value to sellers and customers. After the hackathon, we want to start looking for sellers to onboard onto Dingo.

What we learned

We learned a lot over the course of this hackathon. Many pertain to the technical challenges and accomplishments we’ve outlined above, such as how to properly use and integrate various Square APIs and developer tools and building an effective ML recommendation algorithm for sellers.

In addition to what we learned technically, we learned about building products with the customer in mind. Dingo was ideated from our own experiences, and we found it critical to prioritize customer needs while we were designing and building the service. We didn’t want to create something that nobody would use, and veering towards the customer resulted in a lot of valuable learning.

What's next for Dingo

After the hackathon, we want to go out and find some real customers. We plan on reaching out to restaurants, cafes, shops-- any business that uses Square to handle their payments. We want to talk to them, get feedback, and iterate. We want to keep building Dingo with our users in mind.

We also want to expand Dingo’s use cases. We don’t want to limit ourselves to sellers using Square’s loyalty program-- we want to be able to integrate with all sellers on Square. It also doesn’t just need to be food-related sellers, it can be anyone who has customers and a need for generating personalized recommendations. There’s other use cases for Dingo-- we just need to identify and act on them.

On the technical end, there are a lot of places we can take Dingo even further. A few include: more customization options for sellers, more metrics tracked on the dashboard, more fine-tuning of the recommendation algorithm, etc. For example, sellers may want to only offer discounts on certain item sizes, which we don’t currently support.

We think Dingo has potential, and we’re excited to see where we can take it moving forward.

Share this project: