Skip to main content

Customer.io Integration

RxScale can send events about your patients’ prescriptions and pharmacy orders to your own Customer.io workspace. Use them to trigger campaigns and transactional messages, for example “Your prescription has been signed” or “Your order is on its way”. The integration is configured per shop. Each shop can send to its own Customer.io workspace, and shops without an integration send nothing.

What you need

  • A Customer.io workspace and its Site ID and Tracking API key. In Customer.io, open Workspace Settings → API and Webhook Credentials → Tracking API Keys.
  • The region your Customer.io account is hosted in: EU (track-eu.customer.io) or US (track.customer.io).
  • A workspace that identifies people by email. RxScale identifies each patient by the email address of their order. In Customer.io, check Workspace Settings → Workspace → Identifiers and allow identification by email (“Email or ID”).
If the credentials or the region are wrong, Customer.io rejects the request and the event is not sent. Events are not stored for a later retry, so check the integration with a test order after setting it up.

Setup in the Admin Tool

  1. Open Settings → Shops.
  2. In the row of the shop, click the Marketing Integration action (megaphone icon).
  3. Choose the Region, then enter the Site ID and the Tracking API key.
  4. Keep Send events to Customer.io enabled and save.
The API key is stored encrypted and is never shown again. To change the region or Site ID, open the dialog again and leave the API key field empty to keep the stored key. Enter a new key only to replace it. To pause the integration, uncheck Send events to Customer.io: the credentials stay stored, but no events are sent. To delete the credentials, use Remove Customer.io in the shop’s action menu.

How events are sent

For every event, RxScale makes two calls to the Customer.io Track API with your Site ID and API key:
  1. It identifies the patient by email, so the person exists in your workspace even if Customer.io has not seen them before.
  2. It tracks the event on that person.
Events are sent only if the order belongs to the shop with an active integration and has a valid patient email address. If Customer.io is temporarily unavailable, RxScale retries the delivery automatically.

Events

Events contain identifiers and status information only. They contain no addresses, products, or medical information.

prescription_signed

Sent when a doctor signs a prescription for an order of the shop.

prescription_printed_for_patient

Sent when a digital prescription has been issued to the pharmacy. Physical (paper) prescriptions do not trigger this event.

pharmacy_order_updated

Sent every time the status of a pharmacy order changes, for example when the pharmacy starts processing or ships the order.

Fields

Using the events in Customer.io

In Customer.io, create a campaign with the trigger “Person performs event” and enter the event name, for example pharmacy_order_updated. Use event.status or event.shop_order_name in filters and message templates.
Klaviyo is configured separately. If your organisation already sends events to Klaviyo, those events are unchanged.