Skip to content

5. Regulated questions and the pharmacist

The assistant is meant to refer health questions to a pharmacist rather than answer them. It does this with a simple screen, run on each assistant question before the catalog is searched.

  • Screening is a fixed keyword check in English and Spanish. It covers words such as dosage, prescription, symptoms, pregnancy, interactions, side effects, allergies and illness, plus a few fixed phrasings.
  • A question that matches never reaches the catalog. The customer is told the question is for a pharmacist, and that the pharmacy team may follow up.
  • A question that does not match is handled as a shopping question.
  • Card numbers typed into the chat are blocked as sensitive.
Step Who Operation Success looks like
Request The shop, automatically A handoff work item: policy pharmacist_review, category handoff_review, reason regulated_question Exactly one work item per question. The work item does not contain the question text
See open handoffs Pharmacist or merchant staff (signed in, merchants:read), over the API REST GET /v4/admin/ops/handoffs The work item is listed for your merchant
Record the decision Pharmacist (signed in, merchants:write), over the API REST POST /v4/admin/ops/handoffs/{id}/decision with {"outcome":"reviewed"} or {"outcome":"needs_follow_up"} Item closed. A second decision is refused with HANDOFF_CLOSED

Handoffs have no Admin console screen yet.

Customer questions can be health information. Know where they go:

Place Contains the question text?
The pharmacist handoff work item and its events No. Only policy, category, reason and the link to the conversation run
Logs written by the webchat transport, and the customer audit trail No
The assistant conversation run, once the customer is signed in Yes. The question is the input of that run. The flow runtime keeps it in your tenant’s run events and run views, where people with access to flow runs and operator tools can see it
Anything before sign-in No. An anonymous visitor’s question is not sent or stored. The page keeps it in the visitor’s browser until sign-in

No separate retention period is documented for this run data in this tutorial. Treat flow-run data as sensitive health data: restrict who has access to flow runs and operator tools in your tenant, and agree a retention policy with Orangepill before going live.

As the signed-in customer, ask “How much should I take of this?” Expected:

  • The shop refers you to a pharmacist and shows no products.
  • Exactly one new handoff appears for your merchant.
  • Platform tests: a regulated question gives exactly one handoff with these three values, while catalog questions and card data give none, and a replay creates nothing more.
  • Internal staging acceptance at 0.6.7: a “dosage” question produced exactly one handoff. One operator decision closed it, and a second decision was refused.
  • Docs acceptance on a prepared sandbox: pending.