Workflows
Workflows provide partners with greater flexibility and control over the order fulfillment process.
Honeybee supports multiple workflows and will work with partners to help them select the best one for their needs. Honeybee’s goal is always to make sure patients are happy and well taken care of, while supporting an efficient and simple workflow for our partners.
API Driven (Partner Requested Fills)
For the most control over when a prescription is filled, the Partner Requested Fills workflow can intake e-Prescriptions without creating an order automatically.
A typical use case for this workflow is creating a fill request after payment processing is completed.
An API call to POST /orders is used to create a fill request (order) against a prescription.
API Driven - Auto
This is the typical workflow and the fastest way to get integrated. The only requirement for our partners is to supply an API webhook endpoint where updates on orders and prescriptions will be posted.
When Honeybee receives an e-Prescription; patient, shipping, medication and prescriber data is extracted and an order is automatically created and the filling/verification process begins.
Virtual Pharmacist
Virtual Pharmacist is a solution that allows the embedding of a checkout flow via an iframe into a partner’s own apps. One of the benefits of this workflow is the separation of payment for provider consultation and medications in a white-labeled experience.
When the patient has completed their consultation and a medication is to be prescribed, the patient can complete their medication checkout directly in the Virtual Pharmacist interface.
Integration Guide
Obtain a
client_secret
andclient_id
from your Honeybee Health representative. You'll use these to authenticate.Utilize 0Auth 2.0 scheme to get your access token: Auth Scheme
Add the embed script to your page header. Use the preview tool for help: Embed Script Preview
class VirtualPharmacist{constructor(){this.selectors={vpModalOpen:"[data-vp-modal-open]",vpModalClose:"[data-vp-modal-close]",vpModal:"[data-vp-modal]"},this.modal=document.querySelector(this.selectors.vpModal),this.openModalBtn=document.querySelectorAll(this.selectors.vpModalOpen),this.closeModalBtn=document.querySelectorAll(this.selectors.vpModalClose),window.addEventListener("vp-start",this.onOpenVirtualPharmacy.bind(this),!1),this.openModalBtn.forEach((e=>{e.addEventListener("click",this.onOpenVirtualPharmacy.bind(this))}))}onOpenVirtualPharmacy(e){e.preventDefault();const n=e?.detail.orderNum||e?.currentTarget?.dataset?.hbhOrderNum,o=e?.detail.orderToken||e?.currentTarget?.dataset?.orderToken;n&&o?(document.body.style.overflow="hidden",this.appendModal(n,o)):console.error("No Order number or token Passed.")}onCloseVirtualPharmacy(e){e.preventDefault(),this.removeModal(),document.body.style.overflow=""}appendModal(e,n){const o=document.querySelector(this.selectors.vpModal);if(o)o.classList.add("open");else{const o=document.createElement("div");o.innerHTML=`\n <style>\n .vp-modal {\n position: fixed;\n width: 0;\n height: 100vh;\n opacity: 0;\n visibility: hidden;\n transition: all 0.3s ease;\n top: 0;\n left: 0;\n display: flex;\n justify-content: flex-start;\n z-index: 6000;\n }\n .vp-modal.open {\n visibility: visible;\n opacity: 1;\n transition-delay: 0s;\n width: 100vw;\n }\n .vp-modal-bg {\n position: absolute;\n background: rgb(0 0 0 / 60%);\n width: 100%;\n height: 100%;\n }\n .vp-modal-container {\n background: #fff;\n position: relative;\n }\n .vp-modal-body > iframe {\n height: 100vh;\n width: 100vw;\n }\n .vp-modal-close {\n position: absolute;\n line-height: 0;\n top: 19px;\n right: 35px;\n width: 35px;\n height: 35px;\n outline: none;\n appearance: none;\n color: #5898DD;\n background: #fff;\n border-radius: 4px;\n font-weight: bold;\n cursor: pointer;\n }\n </style> \n <div class="vp-modal open" data-vp-modal>\n <div class="vp-modal-bg" data-vp-modal-close></div>\n <div class="vp-modal-container">\n <button class="vp-modal-close" data-vp-modal-close>X</button>\n <div class="vp-modal-body">\n <iframe src="/vp-checkout?order=${e}&token=${n}" />\n </div>\n </div>\n </div>`,document.body.append(o),document.querySelectorAll(this.selectors.vpModalClose).forEach((e=>{e.addEventListener("click",this.onCloseVirtualPharmacy.bind(this))}))}}removeModal(){document.querySelector(this.selectors.vpModal).classList.remove("open")}}new VirtualPharmacist;
Submitting Orders
First, make an API call to POST /orders, ensuring you include the header
X-Honeybee-Order-Type
which is set tovirtual
. This will create a new order and return anorder_number
andX-Honeybee-Order-Token
.Add a button on your order confirmation page to continue to Virtual Pharmacist. The button should have the following data attributes set:
data-hbh-order-num={orderNum}
data-order-token={orderToken}
data-vp-modal-open