Message Data Reference

The Message events contain information about Chat Messages (Web) or SMS received or sent to the patient. These can be outbound or inbound, and will have the contact information along with the content of the message itself.

Message Event Payload

The payload below is a representation of a Message event trigger.

The payload above is based on a message.inbound status, but is relevant for all Message trigger statuses. See the Workflow Events/Triggers article for a full list of available events.

{
    "channel": "WEB",
    "inbound": true,
    "customer": "88753219c812a34567832b1a",
    "contact": {
        "email": "johndoe@gmail.com"
    },
    "content": "Ok. Thank you for the explanation. Looking forward to receiving my package. Regards.",
    "subject": "Inbox inbound message",
    "status": "pending",
    "_id": "69123456a789b0123456c1d2",
    "createdAt": "2024-07-15T10:30:45.123Z",
    "updatedAt": "2024-07-15T10:30:45.123Z",
    "__v": 0
}

Properties Descriptions

The table below describes the parameters of the payload.

Property

Type

Description

channel

string

The communication channel for the message (e.g., "WEB", "SMS").

inbound

boolean

Indicates if the message originated from an external source and is coming into the system (true) or going out (false).

customer

string

A unique identifier for the patient.

contact

object

A nested object containing contact information.

contact.email

string

The email address of the contact.

content

string

The body or content of the message.

subject

string

The subject line of the message.

status

string

The current state of the message (e.g., "pending", "completed").

_id

string

A unique system-generated identifier for the message document.

createdAt

string

The timestamp indicating when the message was created.

updatedAt

string

The timestamp indicating when the message was last updated.

__v

number

The document version number, used for tracking changes.