Back to guides
3
6 min

Dynamic Pricing

AI-Powered Pricing That Maximizes Margins

The Price Tag Dilemma

Walk into any electronics store on MG Road and you will see a familiar ritual. The customer asks "kitne ka hai?" (how much?), the shopkeeper quotes a price, the customer counters, and after 10 minutes of negotiation, they settle somewhere in between. This ancient dance is, in essence, dynamic pricing — adjusting the price based on the buyer, the moment, and the context.

Now imagine doing this across 10,000 products, 24 hours a day, for millions of online customers simultaneously. That is what AI-powered dynamic pricing does for modern retail. It is the same principle your neighbourhood shopkeeper uses — but at a scale no human can manage.

This chapter explains how dynamic pricing works, when to use it, when to avoid it, and how to implement it responsibly in the Indian market.

Price Elasticity: The Core Concept

Not all products respond to price changes the same way. This is called price elasticity, and understanding it is the foundation of smart pricing.

Product TypePrice SensitivityExample
Highly elasticSmall price change = big demand changeBranded biscuits (Parle-G vs store brand)
Moderately elasticPrice matters but other factors tooSmartphones (features matter alongside price)
InelasticPrice change barely affects demandMedicines, baby formula, cooking oil

Real example: If you discount a Rs 200 t-shirt to Rs 150, sales might jump 80%. But if you discount a Rs 50 bag of atta to Rs 40, sales might only increase 10% because people buy what they need regardless. AI pricing systems learn these elasticities from your data and adjust accordingly.

MRP vs. Selling Price: The Indian Context

India has a unique pricing construct that most global AI tools do not understand: the Maximum Retail Price (MRP). Under the Legal Metrology Act, every packaged product must display an MRP, and selling above it is illegal. But selling below MRP is perfectly fine — and this is where the game is played.

How Indian Pricing Works

MRP (printed on pack):     Rs 100
Retailer's cost price:     Rs 70
Typical selling price:     Rs 95-100
Competitor's price:        Rs 92
AI-optimized price:        Rs 94  (undercuts competitor, protects margin)

The AI's job is to find the sweet spot between cost price and MRP that maximizes your profit while keeping you competitive. The MRP acts as a ceiling — you can never go above it. Your cost price is the floor — go below it and you lose money on every sale.

Open data/pricing-history.csv in the code panel. This dataset contains 6 months of daily pricing decisions for 50 products across 3 categories — electronics, FMCG, and fashion. Each row includes the MRP, cost price, selling price, competitor price, units sold, and whether a promotion was active.

AI Pricing Rules

AI does not set prices randomly. You define the rules, and AI optimizes within them. Here are the rules every retailer should set:

1. Floor Price (Never Go Below)

Floor price = Cost price + minimum margin
Example: Cost Rs 70 + minimum 10% margin = Floor Rs 77
AI will never price below Rs 77, even during heavy competition.

2. Ceiling Price (Never Go Above)

In India, this is always MRP or below. For online sellers, platforms like Amazon and Flipkart may impose additional ceiling rules.

3. Competitor Matching Rules

Rule: Match competitor price if:
  - Competitor price > our floor price
  - Price difference > Rs 10 or > 5%
  - Competitor has the product in stock

Rule: Do NOT match if:
  - Competitor is running a loss-leader promotion
  - Our product has a quality/service advantage
  - Matching would create a price war

4. Margin Protection

If category average margin drops below 15%:
  - Stop further price reductions in that category
  - Shift AI focus to upselling and bundling instead
  - Alert the manager for manual review

Open data/competitor-prices.json to see how competitor price tracking works in practice. This file contains daily competitor prices scraped from major e-commerce platforms for 50 products, along with stock availability and seller ratings.

When Dynamic Pricing Works Best

Dynamic pricing is not appropriate for every product or situation. Here is a practical guide:

ScenarioDynamic Pricing?Why
Electronics during sale seasonYesHigh competition, price-sensitive buyers, large margins
Fashion end-of-seasonYesClear inventory before next season, time-sensitive
Grocery staples (dal, rice, oil)LimitedPrice-sensitive category, but too aggressive looks exploitative
Medicines and baby productsNoEthical concerns, regulatory scrutiny, trust damage
Perishables near expiryYesBetter to sell at 50% margin than waste at 100% loss
Festive gifting (Diwali boxes, etc.)YesDemand peaks predictably, premium willingness exists

When NOT to Use Dynamic Pricing

During Emergencies

If there is a natural disaster, pandemic, or supply crisis — do NOT use AI to raise prices. Even if the AI recommends it (because demand is high and supply is low), raising prices on essentials during emergencies destroys trust and may violate consumer protection laws in India.

On Trust-Sensitive Products

Medicines, baby food, school supplies — products where customers feel vulnerable. Dynamic pricing on these categories creates negative perception that spills over to your entire brand.

When You Cannot Explain the Price

If a customer asks "why was this Rs 500 yesterday and Rs 600 today?" you need a defensible answer. "The AI changed it" is not good enough. "We matched a supplier cost increase" or "the promotional period ended" — these are acceptable.

Ethical Pricing: The Indian Perspective

Dynamic pricing raises ethical questions that Indian retailers must take seriously:

  • Regional price discrimination. Should the same product cost more in Mumbai than in Patna? Technically, cost of delivery differs. But if customers discover they are paying more based on their pin code, trust erodes. Be transparent about delivery surcharges.
  • Time-of-day pricing. Quick-commerce platforms sometimes charge more during peak hours (lunch, late evening). This is accepted for food delivery (surge pricing on Swiggy/Zomato) but feels exploitative for groceries.
  • Personalized pricing. Showing different prices to different customers based on their browsing history or device is technically possible but legally risky under India's emerging data protection framework. Avoid this unless you have clear, disclosed policies.
  • Building Your Pricing Strategy with AI

    Step 1: Know Your Costs

    Before AI can optimize prices, you need accurate cost data. Include product cost, GST, shipping, packaging, platform fees (if selling on marketplaces), and return costs.

    Step 2: Track Competitors

    Monitor 3-5 key competitors for your top 50 products. You can do this manually (weekly checks) or use tools that automate it.

    Step 3: Set Your Rules

    Define floor prices, ceiling prices, margin targets, and ethical boundaries. Write these down before giving them to any AI system.

    Step 4: Start Small

    Begin with dynamic pricing on 10-20 products where you have good data and clear competitor benchmarks. Measure the impact for 30 days before expanding.

    AI Pricing Prompt

    Here are my top 10 products with cost price, MRP, current selling
    price, and competitor prices:
    [paste data]
    
    Suggest optimal selling prices that:
    - Stay below MRP
    - Maintain at least 15% margin
    - Are competitive with the lowest competitor price
    - Flag any products where a price change of >10% might surprise customers

    Key Takeaways

  • Dynamic pricing is not about charging more — it is about charging right. The goal is to find the price that maximizes total profit, which sometimes means lowering prices to increase volume.
  • MRP is your legal ceiling in India. Any AI pricing system for India must respect MRP constraints. Global tools that ignore this will create compliance problems.
  • Set rules before turning on AI. Floor prices, margin targets, and ethical boundaries must be defined by humans. AI optimizes within those boundaries — it does not set them.
  • Transparency builds trust. If customers feel your pricing is fair and explainable, they accept dynamic pricing. If they feel manipulated, they leave — and in India's relationship-driven retail culture, they tell 20 friends on the way out.
  • This is chapter 3 of AI for Retail & E-Commerce.

    Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.

    View course details