Questionnaire Integration
RxScale provides embeddable medical questionnaires that collect patient information for doctor consultations. These questionnaires can be created and customized through the RxScale Admin Tool.Installation
On the questionnaire detail page in the Admin Tool, you’ll find an installation script. Questionnaire releases are versioned, allowing you to test new versions safely. Add the following to your page:Replace
YOUR_QUESTIONNAIRE_UID with the UID from your Admin Tool questionnaire detail page.- Product Recommender — Displays a recommendation flow based on patient answers
- Direct To Cart — Redirects users to the cart after completion (unless otherwise configured)
Event Hooks
RxScale supports optional JavaScript hooks that trigger on specific events. These hooks are independent and modular.Window Event Handler
After a successful questionnaire submission, RxScale invokes a callback namedrxscaleQuestionnaireCompleted:
DataLayer (Google Tag Manager)
RxScale pushes structured events into thedataLayer object for Google Tag Manager integration. Events are triggered on page transitions and upon questionnaire completion.
Available variables:
nextStep— Next step identifierpreviousStep— Previous step identifierstepName— Current step namequestionnaireVersion— Questionnaire versionquestionnaireName— Questionnaire namequestionnaireId— Questionnaire UID
Klaviyo Integration
The Klaviyo snippet must be installed on your webpage for this integration to function.
Helium Integration
The Helium snippet must be installed on your webpage for this integration to function.
Attaching Submissions to Orders
To associate a questionnaire submission with a Shopify order, include identifying metadata in the order. The required information can be stored at the order level or within each order item.Required Properties
| Property | Required For | Description |
|---|---|---|
_anamnesis_uid | RxScale questionnaires | Links the submission to the order |
_external_submission_identifier | External providers | Your external submission ID |
_external_provider_uid | External providers | Your external provider UID |
Example: RxScale Questionnaire
Example: External Questionnaire Provider
Pharmacy Selection
To associate a selected pharmacy with a submission, send the pharmacy information to the RxScale API:If the selected pharmacy receives data through an API integration (no email), pass an empty string for the
value field.Patient Status Check
After Shopify login, check when a patient last signed an anamnesis using their customer ID:The questionnaire must be tagged with the intent in the Admin Tool for this to work.
Return Codes
| Code | Meaning |
|---|---|
100 | No previous submission, or last signed submission older than 24 months |
200 | Last signed submission between 12 and 24 months ago |
300 | Last signed submission within the last 12 months |