Challenge Overview

Challenge Introduction

Welcome to the Retailer Loyalty Mobile App Backend Implementation Challenge. Our client is a leading agriculture company that supplies its products to Retailers. Visibility into retailer inventory and their sales of our clients products is very limited and the process is manual.  Retailers receive our client's products but do not report back on actual sales or inventory.  There is also no formal loyalty process that includes retailers.

 

The Agriculture company supplies products like Fertilizer, Herbicide, Pesticide, Fungicide, Plant Tonic.

 

Our client would like a mobile application to automate this Retailer Loyalty process. The app will add value in facilitating the Retailer on-boarding process, update product inventory at point of sale and encourage retailers to engage with our client in the form of a Retailer Loyalty feature.

 

The app will enable our clients Sales agents to engage with their retailers, view specific data related to each retailer, and gain valuable insight into actual products sold.  Our clients Sales agents can further engage with the retailer via the Retailer Loyalty feature.

 

We have just wrapped up a Design Challenge to build out the screens for this app.

Challenge Description

A leading Agriculture company would like an app to increase visibility of stock within their retailers. The current model is not scalable and requires sales reps to conduct regular visits to their retailers. Furthermore, there is a significant dependency on retailers to to keep track of products which both enter and leave their physical retail site, which leads to data integrity issues. As a result visibility of sales is poor and it is challenging to reward loyal retailers.

 

Application Users:

The application may be run by a Retailer, or one of our staff (an Agent or an Admin). This is the description of each of the roles:

Retailer: A Retailer buys products from us (be it directly or also from the market) and sells them further to his customers. He scans the products when they arrive, to build his inventory, and check for any counterfeit products (in case he gets them from the market), and scans them again when he sells them, in order to collect loyalty points. A Retailer is connected only to one Agent.

Agent: An Agent is a salesperson working for our company. He is allocated to a certain Country and has a pool of Retailers that are associated with him and for which he is the person of contact. The Agent can only see the data associated to his own Retailers. He cannot see the Retailers of other Agents.

Admin: Assume an admin is a user that has access to all information about all Retailers. He can also see a list of all registered Agents and their associated Retailers.

 

The Problem:

Currently visibility into retailer inventory and their sales of our products is very limited and usually done manually. Retailer receives our products based on orders and doesn’t report back on actual sales or inventory. There is currently no formal loyalty process that includes the retailers.

Loyalty Process:

Retailer Flow:

- The Retailer registers as a new user. He/she can use Social Login or Username/Password.

- The Retailer enters username, password, and enters his contact details and location of his Retail site. He also enters his Retailer ID so that his identity can be confirmed (The Retailer ID is given to them by the Agent on a scratch-card so assume the Retailer already knows their ID).

- The Retailer is automatically assigned an Agent and is shown the the contact details of the agent (Name, Phone number, Location)

- The app remembers their login credentials so they don’t need to enter them next time they use the app.

- Process starts with the retailer scanning the barcode of an incoming product (individual item or box of items).

- Initial validation check when the product is scanned. The application will check against a list of known products sold by the Agriculture company (if no match is found, product doesn't add to the inventory and shows a message to contact agent)

- A Product Inventory is created and Loyalty points are updated in the mobile app and it is synced / updated only when the app is connected to the internet (note: the Retailer might have a poor Internet connection on their mobile phone)

- Retailer scans our products at the selling point (be it box or individual item): inventory is updated and sales list is created.

- For each product scanned and sold a number of points will be automatically calculated.

- The retailer can check the points level in the app itself (reports/dashboard) or can ask his Agent for his status via the app in the form of a message (email or notification inside the app itself).

 

Agent Flow:

- Agent will already have the credentials to login, they login into the app.

- They will be able to see his associated retailers within the app once they also register themselves as app users.

- They can access a report on all retailers that have scanned our products and are confirmed users of the app

- We can check list of sold products for each retailer and calculate loyalty points (Loyalty Points are calculated automatically).

- Should be able to see list of inquiries and be able to act on them.

 

Admin Flow:

- The Admin will use a web app for Desktop screen size to access the data, they will not need to login to the web app.

- View of all Agents, associated Retailers & sold Products

- Will have the ability to filter data by date, Agent, Retailer, Product

 

Technology Stack

 

- OS - Ubuntu 14.04 LTS

- Database - MongoDB

- Implementation - Node 6.x

- Authentication - Auth0

- Process Management - pm2

- Database Access - Mongoose

- REST endpoints - ExpressJS

- Logging - Winston

- Push Notification - APNS

 

For any other modules that you plan to use, please discuss in the forums and get it approved by co-pilot/ PM before using it.

Data Model


The Swagger definition (provided in forums) defines the external data models exposed by the API. You are expected to design and build any additional internal data models required. We've also attached some data model notes in the forum.

 

Web Services Needed


The Swagger definition (provided in forums) and web services notes are provided in the fourm.

 

 


Final Submission Guidelines

- Source code

- Deployment Guide containing configuration and verification details

- DDL scripts to create, drop the mentioned entities, insert test data

- Postman collection to test each of the mentioned endpoints

- Video is NOT mandatory but if you feel it would help highlight your submission features, please feel free to submit it

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30055625