Skip to content

Build an AI-assisted pharmacy

Intermediate · About 120 minutes. Course available now. Simulation requires a prepared test tenant and controlled access.

For the 0.6.12 merchant and customer MCP workflow, start in your hosted Orangepill workspace. Set up a merchant and buy through MCP

Read Fundamentals first or bring equivalent experience. You can study the six lessons as a design case. For the controlled simulation, use the prerequisites below.

A pharmacy wants customers to browse routine purchases in chat while a pharmacist handles questions requiring professional judgment. Decide which action the customer, agent, administrator and pharmacist may each take. In this course, your AI agent discovers and checks, people in your organization approve and install, customers shop through a conversation, and every purchase is traceable from order to ledger.

At a glance
You end with A working conversational shop on webchat, with one order, one payment and one balanced ledger journal per purchase
You need An Orangepill-prepared test tenant, a tenant admin, and a coding agent connected over MCP
Your agent does Discovery, readiness previews and checks, and reading runs. It cannot install the Blueprint or take payments
Status Preview: every operation exists at the pinned platform commit; the tutorial has not yet been run as written on a test tenant

You will deploy a complete conversational pharmacy shop in a test tenant that Orangepill prepares for you in one of its non-production environments (see Environments). Customers chat on webchat, browse, sign in, fill a cart and pay with a simulated (Dummy) card. Each purchase produces exactly one order, one payment and a balanced ledger journal. Questions that match a simple health-keyword screen are not answered by the shop: they are passed to a human pharmacist. The screen is incomplete and not clinically validated (see chapter 5).

  • A shop using the Pharmacy Agentic Commerce Blueprint, version 0.6.7, on webchat.
  • Anonymous product browsing, then sign-in with an emailed code when the customer wants to buy.
  • A server-priced cart, an exact checkout summary, and confirmation with a code emailed to the customer.
  • Payment through the Dummy card provider (no real money).
  • One order, one payment and one balanced ledger journal per purchase, with a receipt the customer can open.
  • A keyword screen for regulated questions (dosage, prescriptions, symptoms and similar), with matching questions handed to a human pharmacist. The screen is incomplete for regulated go-live.

Not in scope: real card payments, WhatsApp production onboarding, purchase mandates, autonomous payment authorization, and payment actions by operator agents.

Your AI agent does a lot, but not everything. Some steps need an authorized person, and some need Orangepill.

Step Your AI agent (MCP) Authorized person (Admin console) Authorized person (API only) Orangepill
1. Access and connection Connects; reads and sets the active project Signs in; issues the agent’s credential Prepares your test tenant
2. Discover the Blueprint Previews readiness Browses the Blueprint catalog
3. Readiness Re-checks readiness Creates the merchant Creates the Dummy card instance; binds the catalog Enables customer sign-in, email and the Dummy provider for your tenant
4. Install Previews; cannot install (refused by design: the Blueprint can take payments) Installs version 0.6.7
5. Customer experience and webchat Checks readiness Creates the webchat channel; routes it Enables customer entrypoints; links webchat to the experience
6–7. Shop and verify Reads runs and outcomes Reviews the order, payment and ledger
8. Pharmacist handoff Records the pharmacist’s decision
9–10. Observe and operate Reads and explains runs (needs an extra grant) Upgrades, uninstalls Disables entrypoints; rolls back

This guide must first be run end to end, exactly as written, on an Orangepill-prepared test tenant at a pinned platform release, with synthetic data. The evidence must be recorded. That run must include:

  • every step in chapters 1–6, with the success checks in each table;
  • a customer sign-in recovery check: sign out or revoke consent mid-conversation, confirm the customer is asked to sign in again and nothing is replayed twice, then sign back in and finish the purchase;
  • the pharmacist handoff, including a question the screen is expected to miss, so the limitation is recorded honestly.

Until then, version 0.6.7 remains the reference for the six webchat lessons below.

  1. Access and your AI agent
  2. Discover the Blueprint and prepare readiness
  3. Install and enable the customer experience
  4. Shop as a customer and verify the purchase
  5. Regulated questions and the pharmacist
  6. Observe, troubleshoot, disable and upgrade

Throughout, examples use made-up data: the store Sample Pharmacy, the customer ana@example.com, and placeholders such as <installation-id>. Never paste real customer data into an agent conversation.

Submit an actor map, a trace linking a simulated order to its payment and committed journal, and one handoff example showing the question, reviewer and decision. For a design-only submission, mark the evidence you would need to collect. A reviewer should be able to follow the same references through the six lessons.

Knowledge check. The agent can preview the package. Who may install the financially exposed application? An authorized person in the controlled environment. A customer confirms a purchase, then asks a regulated question. Who owns the professional decision? The pharmacist. The purchase confirmation covers only its specified purchase.

Adapt the design for a second pharmacy. List what the Blueprint can reuse and which merchant, channel, catalog, review team and permissions must be configured locally. Propose one measure of customer service and one measure of safe handoff.