All problem statements

Problem 7

Pharmacy ERP — Smart Vendor Restocking & Bargaining Agent

Order what the store needs, negotiate the deal, and write the purchase order back.

Background

Pharmacy retail chains and small medicine stores track their stock through the Inventory/Procurement module of an ERP. When a store's stock of a medicine runs low, the ERP raises a reorder alert — but today a staff member still has to manually call or message a distributor, ask for a quote, and haggle over price, quantity, and delivery before placing the purchase order.

The Problem

Manual restocking is slow and repetitive, and it rarely gets the small store the best deal. Distributors often push their own bulk minimums and standard price lists rather than what the store actually needs, and a busy staff member has no time to compare multiple vendors or negotiate. This results in over-ordering, cash tied up in slow-moving stock, or under-ordering that leads to stockouts of fast-moving medicines.

The challenge is to build an agent that reasons about what the store actually needs — not what the vendor wants to sell — and negotiates on the store's behalf.

Target Users and Organizations

This problem is relevant to organizations involved in pharmaceutical retail and distribution, including:

  • Independent pharmacies and small medicine stores
  • Pharmacy retail chains
  • Medicine wholesalers and distributors
  • ERP/HealthTech vendors serving retail pharmacy

Challenge

Build an agentic AI module that plugs into a mock pharmacy ERP, detects medicines nearing their reorder threshold or expiry, sizes a purchase request to the store's real need, and negotiates price, quantity, and delivery terms with one or more vendor agents before posting a finalized purchase order back into the ERP.

Participants are not required to model every ERP field. Teams may choose the level of negotiation complexity they want to address and are encouraged to innovate beyond the examples provided.

Expected Capabilities

Reorder Detection

Read the stock/expiry table and flag medicines below their reorder threshold or close to expiry.

Right-Sized Requesting

Compute the quantity the store actually needs — based on sales velocity and shelf life — rather than a vendor's bulk minimum.

Negotiation

Bargain with one or more vendor agents on price, quantity breaks, and delivery date, and select the best overall deal.

ERP Write-Back

Post the finalized purchase order back into the mock ERP's inventory and purchase-order tables.

Difficulty Levels

Level 1 (Basic Agency)

The agent reads a CSV/JSON inventory table of medicines with stock levels, sales velocity, and reorder thresholds, and outputs a plain-language reorder list with the recommended quantity and reasoning for each medicine.

Level 2 (Tool Integration)

The agent calls a mock "Vendor API" representing 2–3 distributors with different price lists and minimum order quantities, automatically selects the best-fitting vendor and quantity for each medicine, and generates a structured purchase order.

Level 3 (Multi-Agent Bargaining — Stretch Goal)

A "Store Agent" negotiates over multiple rounds with 2–3 "Vendor Agents" (each with its own pricing rules and flexibility) to secure a better price, quantity, or delivery combination than the first offer, then writes the agreed purchase order back into the mock ERP.

Expected Outputs

A working demo showing detected shortages, the negotiation exchange, and the final purchase order.

A generated result may include:

  • List of medicines flagged for reorder with reasoning
  • Vendor comparison and selection rationale
  • Negotiation transcript
  • Final purchase order (vendor, quantity, price, delivery date)
  • Savings achieved versus the vendor's first offer

Scope

Participants are free to decide:

  • How the mock pharmacy inventory and vendor data are structured
  • Which negotiation strategy the agent uses
  • How reorder thresholds and sizing logic are calculated
  • How the purchase order is represented
  • Which AI models or tools are used
  • The number and behavior of vendor agents
  • The system architecture
  • Whether multiple AI agents are used

Teams may use synthetic or publicly available pharmacy/medicine data where appropriate.

Constraints

1. Meaningful AI Usage

The solution should demonstrate why intelligent, negotiation-aware reasoning is required. Solutions should go beyond simply picking the cheapest listed price.

2. Sizing and Negotiation Should Be Connected

The store's real need (from sales velocity and expiry) should meaningfully influence what is negotiated and ordered — not just the vendor's standard terms.

3. Deal Quality Preservation

The solution should attempt to secure terms at least as good as, and ideally better than, a vendor's first offer.

4. Appropriate Handling of Different Cases

Teams should show the agent behaving sensibly for both easy cases (single best vendor) and harder cases (multiple vendors, conflicting minimums).

5. Actionable Output

The final purchase order should be structured so it could be reviewed and approved by a real pharmacist or store owner.

6. Efficiency

Participants should be mindful of LLM calls, negotiation rounds, and overall processing time given the short hackathon window — a working, well-scoped Level 1 or 2 is better than an unfinished Level 3.

7. Innovation Freedom

Participants are not restricted to a specific model, framework, negotiation strategy, or technology.

Success Criteria and Evaluation

Criteria

What It Measures

Reorder Accuracy

Correctness of detected shortages and computed quantities

Negotiation Quality

How effectively the agent improves on the vendor's first offer

Deal Fit

Whether the final order genuinely fits the store's need and budget

Adaptability

Ability to handle multiple vendors or conflicting constraints

AI Necessity

Whether AI provides meaningful value beyond a static price lookup

Technical Quality

Architecture, implementation, and robustness

Efficiency

Sensible use of models and negotiation rounds within the time limit

Innovation

Novelty of the negotiation or sizing approach

Clarity of Demo

Ability to clearly show the negotiation and final outcome

Product Potential

Ability to evolve into a practical pharmacy ERP add-on

Freedom to Innovate

Participants are free to choose their own technical approach.

Solutions may use any relevant combination of:

  • LLMs
  • Rule-based or heuristic negotiation logic
  • Multi-agent orchestration
  • Optimization algorithms for order sizing
  • Mocked REST/JSON vendor APIs
  • Agentic AI

The listed technologies are examples only and should not limit innovation.

Core Objective

Given a pharmacy's real stock and sales data, intelligently detect what is genuinely needed, negotiate with vendors on the store's behalf, and produce a fair, well-justified purchase order.