The Companion Care Group refill topic must check that the patient has been seen within the last six months, confirm the medication is not on the controlled-substance hold list, and only then create the refill request. Which action backing type best fits this requirement?
Select an answer to reveal the explanation.
Short Explanation
You’re handling deterministic eligibility rules with a Flow-backed action, which can check the visit date and hold list before creating the request. Let the Flow make the decision consistently, and let the agent explain it in a friendly voice.
Full Explanation
Refill eligibility is deterministic business logic with a legally and clinically significant outcome, so it belongs in an action that executes the same way every time. A Flow-backed action is a strong fit for declarative multi-step logic: it can query records, apply the six-month and controlled-substance hold criteria, and create the refill request, while remaining maintainable by the specialists who build the agent. A prompt template action may seem suitable because a model can read a date and compare it, but its output is probabilistic and is not an auditable rule; it should not authorize a controlled substance. An Apex invocable action can implement the checks, but re-implementing rules that Flow can express adds code to maintain; use Apex when the logic genuinely exceeds Flow’s declarative capabilities. An external API call to the pharmacy system is appropriate when the authoritative data or decision lives there, but when the appointment history, hold list, and refill record are in Salesforce, the call adds latency and a failure mode without benefit. One caveat: whichever backing you use, the Agent User needs access to the relevant objects and to the Flow. Before release, test a patient just inside and outside the six-month window, a patient on the hold list, and a patient who passes both checks, confirming that only eligible patients get a refill request.