Docs Menu
Docs Home
/ /
Atlas Architecture Center
/ / /

RFID: Real-Time Product Tracking

Enhance retail inventory management with Radio Frequency Identification (RFID) Technology and MongoDB Atlas for real-time tracking, improved accuracy, and data-driven insights across your supply chain.

Use cases: Catalog, Personalization

Industries: Retail

Products: MongoDB Atlas

Retailers must ensure accurate and consistent inventory information across multiple channels while handling vast amounts of data. However, traditional methods struggle to keep pace with the demands of today's dynamic market.

In this scenario, RFID Technology offers a transformative solution. By automatically tracking tagged items using electromagnetic fields, retailers gain unprecedented real-time visibility into inventory levels. This implementation optimize stock management, reduce labor costs, and elevate customer satisfaction.

Harnessing RFID's potential requires a robust data layer. MongoDB Atlas provides the solution for capturing, processing, and analyzing these massive datasets.

By integrating RFID Technology with a powerful database solution, retailers can efficiently address product information management challenges and unlock key advantages:

  • Inventory accuracy: Eliminate stock discrepancies and reduce out-of-stocks, ensuring products are where customers expect them to be.

  • Operational efficiency: Streamline processes like receiving, picking, and packing, leading to faster turnaround times and cost savings.

  • Enhanced customer experience: Fulfill orders accurately and quickly, boosting customer satisfaction and loyalty.

  • Data-driven insights: Leverage detailed product and sales data to make informed business decisions and optimize product assortment.

Businesses can track items from the manufacturing floor to the end consumer by attaching RFID tags to products and using a network of readers. Below, we explain the general architecture of a RFID system and provide a specific example with Zebra Technologies.

This architecture shows a comprehensive system with RFID Technology to monitor product movement through the supply chain. MongoDB Atlas serves as the underlying data layer to manage and analyze RFID data.

  • RFID data collection: Information is captured from RFID tags attached to products using RFID readers.

  • Data management: MongoDB Atlas stores and processes collected RFID data.

  • Data analysis: The system utilizes MongoDB Atlas to extract valuable insights from the data through data cleaning, transformation, and analysis.

  • Workflow optimization: The architecture visualizes the data flow from initial collection to the generation of actionable insights.

End-to-end supply chain RFID tracking architecture

Figure 1. End-to-end supply chain RFID tracking architecture

Using a RFID product tracking architecture, we show an example that integrates the Zebra Technologies 123RFID app with MongoDB Atlas through an API gateway.

Key Components and Functionalities

  • RFID data capture: The Zebra Technologies 123RFID app collects product information via RFID tags.

  • Data integration: An API gateway seamlessly transfers RFID data from the app to MongoDB Atlas.

  • Data storage and analysis: MongoDB Atlas serves as the central repository for RFID data, enabling comprehensive data analysis.

Example of a RFID product architecture with Atlas and Zebra Technologies

Figure 2. Example of a RFID product tracking architecture based on the integration of Zebra Technologies with MongoDB Atlas

This guide explains how a retail RFID product tracking application integrates with MongoDB Atlas and demonstrates how to use it for efficient inventory checks.

1

Cluster Setup

  • Select a cloud provider.

  • Choose a region.

  • Configure cluster specifications (e.g., instance size, storage).

Network Security

  • Configure network access.

  • Identify IP access list for edge devices and application servers.

  • User authentication.

  • Create a database user with read and write permissions for the inventory database.

Connection

  • Obtain connection string from MongoDB Atlas.

  • Use connection string to connect your application to the cluster.

2

Project Setup

Device Pairing

  • Enable Bluetooth on iOS device.

  • Pair RFID reader using 123RFID app.

Running the Application

  • Connect iOS device to Mac.

  • Select device as target in Xcode.

  • Run the application.

3

The getMatchingTagList method in Objective-C compares RFID tags from the current physical inventory with a predefined list of tags and updates the user interface accordingly. This procedure works as follows:

  • Retrieves current inventory and predefined tag list.

  • Compares inventory tags with the tag list to find matches.

  • Removes matched tags from the missing tags list.

  • Updates UI with counts of unique and total tags.

  • Stops inventory operation and confirms a complete match if all tags are accounted.

4

The sendUrlRequestToFlag method sends a POST request to a specified URL to indicate the result of the inventory check. This process works as follows:

  • Initializes POST request to the target URL.

  • Sets JSON content type header.

  • Prepares JSON payload with inventory check results.

  • Sends POST request and logs the results.

  • Displays a warning message based on the inventory check outcome.

5

We leverage MongoDB Change Streams for instant notifications and visualize the data using MongoDB Atlas Charts. The code sets up a change stream to monitor new inventory checks in the inventoryCheck collection.

Endpoint Setup

  • Use MongoDB Change Streams to monitor changes in the inventoryCheck collection.

const startWatchInventoryCheck = async (dashboard, addAlert, utils) => {
console.log("Start watching stream");
const runs = await getMongoCollection(utils.dbInfo.dbName, "inventoryCheck");
const filter = {
filter: {
operationType: "insert"
}
};
const stream = runs.watch(filter);
const closeStreamInventoryCheck = () => {
console.log("Closing stream");
stream.return();
};
try {
for await (const change of stream) {
console.log(change.fullDocument);
addAlert(change.fullDocument.checkResult);
dashboard.refresh();
}
} catch (error) {
console.error("Error watching stream:", error);
}
};

Embed the dashboard

  • Use MongoDB Charts embedding SDK to integrate the dashboard into your web application.

  • Import the necessary libraries and context.

  • Create an instance of ChartsEmbedSDK with your base URL.

  • Define and render the dashboard properties into a designated div.

  • Start the change stream and handle real-time updates with alerts.

Implement Real-Time Alerts

  • Display success or error alerts based on the inventory check results using pushToast.

Ensure Integration

  • Verify that real-time notifications and dashboard updates work seamlessly.

  • Maintain accurate inventory data and respond quickly to discrepancies.

Follow this guide to effectively integrate the Zebra 123RFID app with MongoDB Atlas, enabling real-time inventory management and data accuracy.

By combining RFID Technology and MongoDB Atlas, retailers can enhance their inventory management capabilities. This integration provides several key advantages:

  • Real-time inventory management: Leverage RFID Technology and MongoDB Atlas to achieve accurate and up-to-date inventory data.

  • Improved efficiency: Streamline inventory processes, reduce stockouts, and optimize operations through data-driven insights.

  • Data-driven decision making: Use MongoDB Atlas Charts for real-time visualizations, enabling informed business decisions.

  • Francesco Baldissera, MongoDB

  • Pedro Bereilh, MongoDB

  • Rami Pinto, MongoDB

  • Sebastian Rojas Arbulu, MongoDB

  • Mehar Grewal, MongoDB

  • Prashant Juttukonda, MongoDB

Back

Building Modern Omnichannel Ordering on MongoDB

On this page