Herbix: an iHerb alternative with LLM-driven pricing and support
Herbix is a vitamin and supplement marketplace built as a direct alternative to iHerb for markets where iHerb's logistics or pricing do not work. PHII Labs built the storefront, the order pipeline, and the AI layer that handles pricing and customer support.
Context
The supplement market in the Gulf region has a demand problem: customers want iHerb's catalog and pricing, but shipping is slow, expensive, or unavailable. Local alternatives tend to be either overpriced or understocked. Herbix was founded to fill that gap — a curated catalog, local fulfillment, and competitive pricing.
The team came to PHII Labs with a catalog and a supplier network but no software. They needed a storefront, an order management pipeline, and a way to keep support costs down without hiring a large team.
Problem
Two constraints shaped the build:
- Pricing had to be dynamic. Supplement prices fluctuate with supplier costs, currency rates, and competitor pricing on iHerb. A static price list goes stale within a week. Manual repricing was not feasible for a catalog of hundreds of SKUs.
- Support would overwhelm a small team. Customers ask the same things: "Is this in stock?", "When does it ship?", "What's the equivalent of iHerb product X?", "Can I combine these?" A human support team answering these one by one would eat the margin.
Approach
We built the marketplace on FlutterFlow with a Firebase backend. FlutterFlow gave us a mobile-first storefront with rapid iteration; Firebase handled auth, inventory state, and order records without standing up a custom backend.
The AI layer runs on Python, calling OpenAI's function-calling API. We chose function-calling over a free-form chatbot because the actions the system can take are bounded and enumerable: look up a product, check stock, compare two products, estimate shipping, place an order. Function-calling lets the model select and parameterize an action; the system executes it deterministically. The model never touches the database directly.
For pricing, we built a repricing service that runs on a schedule. It pulls supplier cost data, checks the current iHerb price for the equivalent product, applies a margin rule, and writes the new price to Firebase. The margin rule is configurable per category — supplements have different elasticity than protein powders.
What was built
- Storefront in FlutterFlow: catalog, search, cart, checkout, order tracking. Mobile-first, deployed as a web app and wrapped for mobile.
- Order pipeline: Firebase functions handle checkout, payment capture, inventory decrement, and fulfillment status updates.
- Dynamic pricing API: a Python service that reprices the catalog on a schedule using supplier costs and competitor benchmarks.
- Support chatbot: an OpenAI function-calling agent that answers product questions, checks stock, compares products, and guides checkout. It escalates to a human only for order modifications, refunds, and edge cases it cannot resolve.
- Marketplace layer: multi-supplier support so the catalog can aggregate inventory from more than one source without manual reconciliation.
Results
- Support load down 18%. The chatbot absorbed the repetitive query volume — stock checks, product comparisons, shipping estimates — leaving human agents for the conversations that needed judgment.
- Average order value up 9%. The chatbot's product comparison and cross-sell suggestions, driven by the function-calling layer, nudged customers toward complementary products without being pushy.
- First 300 orders processed without manual help. The pipeline handled checkout, payment, inventory, and fulfillment status end-to-end. No manual intervention was needed for the first 300 orders, which validated the system before scale.
Takeaway
Function-calling is the right abstraction for an e-commerce support agent. The model does not need to be creative — it needs to select the right action from a known set and fill in the parameters. Bounding the model's actions to a function list makes the system reliable enough to put in front of paying customers, and the deterministic execution layer means a hallucinated function call fails safely rather than corrupting an order.
