Beluga Messaging
Two Separate Channels
Beluga has two completely separate messaging channels. They are often confused. Understanding the difference is critical.
| Channel | Direction | Patient sees it? | Used for |
|---|---|---|---|
| Doctor ↔ Patient Chat | Doctor → Patient / Patient → Doctor | Yes | Clinical communication |
| CS ↔ Beluga Admin | Your CS team → Beluga admin / Beluga admin → Your CS | No | Internal ops, support escalations |
Channel 1 — Doctor ↔ Patient Chat (patient-visible)
Incoming: Doctor sends message to patient
Beluga fires a DOCTOR_CHAT webhook to app. App saves it as a BELUGA_DOCTOR_CHAT activity and displays it in the patient portal inbox.
Sample webhook payload from Beluga:
{
"masterId": "abc123",
"event": "DOCTOR_CHAT",
"content": "Hi, I've reviewed your intake and I'm prescribing semaglutide 0.25mg weekly."
}Outgoing: Patient replies to doctor
App calls Beluga's chat endpoint. Patient must include their name so Beluga knows who sent it.
Endpoint: POST {belugaBaseUrl}/external/chat
Sample payload:
{
"firstName": "Jane",
"lastName": "Smith",
"content": "Thank you, I have a question about the dosage.",
"isMedia": false,
"masterId": "abc123"
}For image/media messages set isMedia: true and put the base64-encoded JPEG in content and sends to Beluga
Channel 2 — CS ↔ Beluga Admin (internal only, patient never sees)
This channel is for back-and-forth between your customer service staff and Beluga's admin team. Examples: escalating a billing issue, asking Beluga to expedite an order, reporting a data problem. The patient has no visibility into any of this.
Outgoing: Your CS team sends a message to Beluga admin
Triggered from the EMR patient profile → Messages tab → send box.
Endpoint: POST {belugaBaseUrl}/external/cs-message
Sample payload:
{
"content": "Patient is reporting they never received their shipment for order #8821. Can you check on this?",
"masterId": "abc123"
}Incoming: Beluga admin replies to your CS team
Beluga fires a CS_MESSAGE webhook to app. App saves it as a BELUGA_CS_MESSAGE activity and shows it in the EMR patient profile Messages tab — visible to staff only, never to the patient.
Sample webhook payload from Beluga:
{
"masterId": "abc123",
"event": "CS_MESSAGE",
"content": "We've located the shipment — it was delayed at the carrier. Expected delivery tomorrow."
}How it appears in the EMR
The Messages tab in the EMR patient profile shows all four message types together with colour-coded labels:
| Message type | Label shown | Tag |
|---|---|---|
BELUGA_DOCTOR_CHAT | Doctor → Patient | Patient sees this (green) |
PATIENT_CHAT_SENT | Patient (to Doctor) | Patient sees this (green) |
BELUGA_CS_SENT | Your CS → Beluga Admin | Internal only (orange) |
BELUGA_CS_MESSAGE | Beluga Admin → Your CS | Internal only (orange) |
The send box at the bottom of the tab only sends CS messages (Channel 2). It goes to Beluga's admin team, not to the patient. A warning banner above the input confirms this.
Updated 31 minutes ago