The functionalities provided by the NCR API are a natural fit for solving grocery shopping problems. We came up with the idea of helping customers find nearby merchants that have all the items on a their shopping lists, so that they don't have to go to multiple stores to complete their purchase, or to go to a local convenience store instead of driving all the way to a chain grocery store. This app can also be extended to include further functionalities such as item recommendation and inventory management.
This app helps the consumer find groceries and products within a certain radius. The app also helps the supplier with inventory. This was build with the NCR API's and Python. We utilized Jupyter Notebook for part of coding and functions. The front end was based on Dash by Plotly; and Mapbox API was employed to visualize the user and store locations. We used Postman and learned how to import the API's from NCR development page.
The app development consists of three main tasks: interactive gui, backend search methods, and demo data creation.
1. Interactive GUI
The app is a web tool based on Dash by Plotly. The editable table components establish the communication between the users and backend APIs. To visualize the locations on the map, Mapbox API was embedded.
2. Backend Search Methods
The Dash GUI calls a collection of Python methods to obtain locations of sites that contain the items requested. The method is divided into three steps. First it finds nearby stores using the NCR "find-nearby" API. Then it search the catalog for items matching the search keywords using the NCR "GET items" API. Finally it check the availabilities of the items in the nearby stores to find the first few stores that contain all the items using the NCR "getItemAvailability" API. The method returns the results with all the site locations to the GUI.
3. Demo Data Creation
For our demo, we created a group of 500 hypothetical sites within a certain range of Atlanta downtown area using the NCR Sites API. We built a catalog of items copied from the ncr-market using the NCR Catalog API. Finally, to assign each site with an inventory of available items, we randomly assign each item's availability at each site using the NCR Item Availability API.