The platform is a vitamin and supplement marketplace built as a direct alternative to iHerb for markets where iHerb's logistics or pricing don't work. PHII Labs built the storefront, the order pipeline, and the AI layer that handles pricing and customer support.
Context
In the Gulf, supplement customers want iHerb's catalog and prices, but shipping is slow, expensive, or not available at all. Local alternatives tend to be either overpriced or understocked. The marketplace was founded to fill that gap with 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 big team.
Problem
Two constraints shaped the build:
- Pricing had to be dynamic. Supplement prices move with supplier costs, currency rates, and competitor pricing on iHerb. A static price list goes stale within a week, and repricing hundreds of SKUs by hand wasn't realistic
- Support would overwhelm a small team. Customers keep asking the same things: "Is this in stock?", "When does it ship?", "What's the equivalent of iHerb product X?", "Can I combine these?" A 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 we could iterate on quickly; Firebase handled auth, inventory state and order records, so we didn't need a custom backend
The AI layer runs on Python and calls OpenAI's function-calling API. We chose function-calling over a free-form chatbot because the actions the system can take are limited and can be listed: look up a product, check stock, compare two products, estimate shipping, place an order. The model picks an action and fills in its parameters; the system then 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 costs, checks the current iHerb price for the equivalent product, applies a margin rule and writes the new price to Firebase. The margin rule is set per category, because 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 updates and fulfillment status
- 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 hands over to a human only for order changes, refunds, and edge cases it can't resolve
- Marketplace layer: multi-supplier support so the catalog can combine inventory from more than one source without manual reconciliation
Results
- Support load down 18%. The chatbot took over the repetitive questions — stock checks, product comparisons, shipping estimates — so human agents could focus on the conversations that needed judgment
- Average order value up 9%. The chatbot's product comparisons 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. The first 300 orders needed no manual intervention, which validated the system before it scaled
Takeaway
Function-calling is the right fit for an e-commerce support agent. The model doesn't need to be creative. It needs to pick the right action from a known set and fill in the parameters. Limiting the model to a list of functions makes the system reliable enough to put in front of paying customers, and because execution is deterministic, a hallucinated function call fails safely instead of corrupting an order.

