Intelligent Billing Cohort Analysis for a Leading Pharmacy Retailer 

Business Introduction 

The client is a leading pharmacy and wellness retailer with a nationwide footprint across India. Known for its 24/7 stores, online presence, and mobile app, the brand serves millions of customers with products ranging from prescription medicines to personal care and wellness essentials. 

Recognized as the best omnichannel retailer in healthcare, the client is rapidly expanding. With growth comes a need: to stop relying on gut-feel recommendations from sales staff and start using data to suggest the right product combinations—and boost bill value in the process. 

Technical Background 

The client had a central SQL Server database storing years of billing data. However, there was no intelligent system in place to analyze purchase patterns or make dynamic product suggestions. The need was to go beyond traditional machine learning models and build something that truly aligned with the business logic: grouping products by the bill value and recommending items that are frequently bought together. 

Business Objectives 

The project aimed to automate the identification of top-selling products grouped by bill value—enabling smarter product recommendations and better upselling strategies. The client’s vision was to: 

  • Increase revenue per bill 
  • Promote frequently bought-together products 
  • Base suggestions on real data, not sales memory or guesswork 
  • Visualize everything in an interactive, business-friendly dashboard 

Scope of Work 

Logesys was tasked with designing a solution that could extract and clean vast amounts of transactional data, develop a price-based cohorting model, and deliver actionable insights through a Power BI dashboard. 

Challenges & Solutions 

Challenge 1: High Data Volume 

With over 20 million transactions in just six months, processing data at this scale without performance issues was a serious challenge. 

Solution: 
We used PySpark on Azure Databricks to process and clean data in a distributed, cloud-based environment. This not only handled volume efficiently but also significantly reduced the time taken to process and refresh insights. 

Challenge 2: Duplicate & Invalid Data 

Bills often had the same product listed multiple times, and delivery charges were recorded as products. There were also null values and non-standard item codes. 

Solution: 
We built logic to consolidate duplicate product entries, clean out irrelevant rows like delivery charges, and validate all product codes. This ensured the final dataset was clean, reliable, and analytics ready. 

Challenge 3: No Off-the-Shelf Model 

Existing algorithms like Apriori weren’t suitable, as the client wanted grouping by bill value, not just product frequency. 

Solution: 
Logesys created a custom model in Python that grouped bills into pricing cohorts (e.g., ₹1–250, ₹251–500). Within each bucket, it identified which products were most often bought together. This approach gave precise, business-aligned recommendations. 

Challenge 4: Insightful Visualization 

The client needed a way to explore these recommendations intuitively—something that worked across devices and didn’t require data expertise. 

Solution: 
We delivered an interactive Power BI dashboard that visualized cohorts, top products, and suggested combinations for any selected item. It was embedded into their internal systems and optimized for both desktop and mobile use. 

Value Addition 

  • Gave the client a data-backed method to boost bill values 
  • Helped marketing and store teams promote high-impact product bundles 
  • Enabled smarter upselling and cross-selling strategies 
  • Turned massive data into simple, visual insights for daily use 
  • Delivered a scalable, cloud-based solution with zero manual steps 
  • Completed the project in just 3 weeks 

Conclusion 

This project marked a turning point in how the client approaches sales and customer experience. With a tailored analytics model and seamless visualization, Logesys turned raw transaction data into a daily decision-making tool. The client now recommends products with confidence, grows revenue through precision bundling, and operates with the kind of intelligence that only real data can provide. 

Interested in building a smarter analytics-driven engine for your business? Let Logesys help you unlock your data potential. 

Scroll to Top