- Use cases: Analytics, Catalog, Personalization
- Industries: Retail
- Products and tools: Atlas, Aggregation Pipeline, Triggers, Functions, Atlas Charts
- Partners: Databricks
Deploying real-time analytics solutions with the right tech stack can transform a retail pricing strategy. Retailers want to grow their brand name and improve customer experience with value-based pricing while remaining competitive and cost effective.
With real-time pricing strategies, businesses can change product prices on the fly — both online and in-store through digital price tags — by leveraging data points across a wide variety of systems, such as inventory, marketing performance, and even regional and digital trends. Imagine dynamically lowering prices in response to excess inventory or new promotions, or increasing the price on something trending, without manual intervention.
Despite their ambition to become “data driven” operations, companies often fail in their endeavors because they struggle performing real-time analytics.
By the end of this demo you will get a detailed view of how to leverage MongoDB Atlas App Services in addition to Databricks model building and deployment capabilities to fuel data-driven strategies with real-time events data.
Transport: Transportation companies, such as airlines, taxis, and ride-sharing services, can use real-time pricing to adjust fares based on factors like demand, supply, and external events. This enables them to optimize revenue and manage passenger demand during peak hours or special occasions.
Telecommunications: Telecom companies can use real-time pricing for data plans, international calling, and roaming charges. They can adjust prices based on network capacity and demand to manage traffic and ensure optimal service levels.
Insurance: Insurance companies can implement real-time pricing for usage-based insurance products, such as pay-as-you-drive or pay-as-you-live. Premiums can be adjusted based on actual customer behavior or risk factors.
The event-driven architecture is very simple. It is made up of only four different events that a user can perform on the e-commerce site:
event_type | description |
“view” | A customer views a product on the product detail page. |
“cart” | A customer adds a product to the cart. |
“remove_from_cart” | A customer removes a product from the cart. |
“purchase” | A customer completes a transaction of a specific product. |
Follow this step-by-step guide and learn how to orchestrate MongoDB Atlas through MongoDB App Services triggers and serverless functions in conjunction with Databricks to create a real-time analytics and pricing solution for the retail industry.
1. Data Ingestion
The GitHub repo contains the eventsGenerator directory, in which you will find a generator.py file. Edit the file with the connection string, database and collection parameters to mimic the purchase events happening on an ecommerce storefront in real time.
2. Data Transformations
In this GitHub directory you'll find instructions on how to use triggers and functions to:
3. ML/AI
In this GitHub folder you will find a test code to run on a Databricks notebook. The code computes a simple calculation of the price elasticity of demand per product, receiving as input the purchase log per product and giving as output the price elasticity.
Data transformation: Recognizing the importance of transforming raw data into a more usable format or structure. In this project, triggers and functions are used to compute a historic purchase log and send data to external systems like Databricks.
Serverless architecture: Gaining insights into the benefits and workings of serverless functions and triggers, which can automatically respond to changes in data and execute predefined actions without the need for a dedicated server.
Real-time data processing: Understanding the importance and mechanisms of processing data in real-time, especially in the context of the retail industry where timely insights can drive immediate actions, such as dynamic pricing.
Create this solution yourself with the associated sample data, functions, and code.
See this solution in action to learn more about how MongoDB and Databricks partner to enable real-time dynamic pricing.
Learn how retailers are escaping monolithic, siloed data structures along the modernization journey.
The MACH approach is designed to help ecommerce businesses ensure their solutions can develop and evolve.