Inspiration

We are thrilled and excited to go to work MakueniStore. What made us excited was the problem we were trying to solve, the impact we could make, the technologies we had access to, the people we worked with and our learning curve. This ecommerce application serves to inspired we as developers to imagine just a few of the endless possibilities of how to inject Batch AI, Real time AI, and Generative AI into an ecommerce application.

What it does

The MakueniStore illustrates how working with Square API, Google and AI can create a meaningful, custom user experience and accelerate development and time to value for the business through:

  • Custom Product Recommendations
  • Instant Lost Item Cart Updates
  • Interactive Chat and Vector Search for Private Enterprise Data

MakueniStore, an online retailer for square sellers, can capture a customer’s activity, such as clicks, views, purchases, etc. The application can then apply training models, both batch and in real-time, to make product recommendations custom for this user. If items in the customer’s cart go out of stock, MakueniStore can immediately recommend similar products, thus reducing friction for the user.

Finally, MakueniStore integrates PaLM API to allow the customer to interact in a very natural way with MakueniStore, asking for advice. MakueniStore responds by generating new content (hence “generative” AI) in the form of advice. It also searches MakueniStore’s private data, whether in the product collection, previous reviews from other customers, Q&A, etc, to offer even more specific product suggestions.

How we built it

Step 1. Prepared Data in MongoDB Atlas running on google cloud

Stood up an Atlas cluster. Created a database named “makueniStore” with 2 collections “products” and “customers” with the .json files in the git repository.

Step 2. Created Search Index named “default” on products collection 

The default dynamically mapped index will work but this one is more specific. Make sure to name the index “default”.

Step 3.

Integrating Square APIs (Orders API, Catalog API, and Inventory API) into MakueniStore using React . We get a list of catalog objects and once we receive data from the Square APIs, we can parse and display it in our React components. For example, we use the data to populate product listings, order history, or inventory status.

/ Get a list of catalog objects (items, variations, categories, etc.)
axios.get(`${catalogBaseUrl}/list`, {
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json',
  },
})
.then(response => { ...

Step 4.

Integrated generative AI capabilities and the PaLM API into our React , then built a powerful conversational AI chatbot using Google's PaLM API 2, set up the PaLM account, integrate the API, and create an engaging chatbot interface

Challenges we ran into

We delayed getting our API key , at first we had to hard-coded in the front end. We had to create a component , then build a message Exchange array.

Accomplishments that we're proud of

We built a strong connections and positive working relationships with the teammates that we hope wil continue in the future projects.

What we learned

Learn how to set up the PaLM account, integrate the API, and create an engaging chatbot interface

What's next for Makueni store

Provide documentation for Square sellers on how to use our pruduct with the integrated Square APIs and offer customer support to address any questions or issues related to the integration.

Share this project:

Updates