I worked on a team developing B2B and D2C ecommerce systems on the EpiServer platform and part of the implement was integrating its' recommendation systems into our websites. This was a very long and arduous and error-prone process that involved us initialing contact with the EpiServer Perform team, adding several configuration items and waiting for the data sync process to complete and for them to notify us of the results. The process took several months to complete. I imagined a recommendation system that was more elegant and required less configuration. I was also curious to learn how such recommender systems were built on the back-end since as integrators, we only worked with the client-side APIs.
What it does
The Square Recommender is a Square app that a merchant using a Square Online store can install and ,after a brief setup, view product recommendations on the product pages of their site. During the setup process, the app collects catalog and order data and runs a matrix-factorization machine learning algorithm to determine which products should be recommended when a particular product is viewed. These recommends will be recalculated daily from new orders coming in.
Also during the initial setup, a snippet is installed to the merchant's Square account that will display recommendations on the product page of their site.
How we built it
The app was build using .Net Core and Azure for the APIs and delayed jobs. Node.js was used for the merchant setup UI.
Challenges we ran into
Integrating the code snippet into the Square Online store was very challenging. I had to understand the DOM events very well before I could properly place the product recommendations on the product page.
I wanted a solution that was 100% Azure-based however I found using their document database Cosmos very cumbersome and expensive. I switched datastores to MongoDBb Atlas and that was easier to use and free.
This was supposed to be a 2 person project splitting the front-end and back-end work. However my partner had to drop-out after the planning phases of the project so I had to scramble to get the front-end work complete.
What we learned
- How to build a recommender system from the ground-up.
- How to build APIs and delayed jobs in .Net Core and deploy them to Azure.
- How to choose the correct machine learning algorithm given the data that you have and how it will be used.
- How to develop an app on the Square Marketplace and allow merchants to connect to the app using OAuth.
What's next for Square Recommender
Wow. Lots. I really only had time for a proof-of-concept. I would like more security built into the app, particularly around storing the access and refresh tokens securely. The ability for merchants to revoke a token in the UI. Get on the Square Marketplace.