The “Send Webhook” journey action is a powerful feature in Tellescope that allows you to send a webhook to either:
- A pre-configured webhook set up through our API, or
- A custom URL endpoint of your choice.
This is especially useful for logging events or triggering automations externally based on updates in Tellescope. It also provides a flexible way to integrate with third-party platforms that aren't currently supported by our built-in integrations.
Note: Webhooks are sent as POST requests by default with a Content-Type header of application/json.
Webhook Configuration Setup (via Tellescope API)
- Subscribe to Webhooks: Use the Configure Webhooks API endpoint to subscribe. Leave the "subscriptions" field blank to receive Journey webhooks specifically.
- Configure a Trigger: Set up a trigger to determine when patients enter the journey.
- Create a Journey: Set up a journey and select the "Send Webhook" action type for a journey step.
- Leave Endpoint URL Blank: In the “Send Webhook” journey step, do not enter a URL. This ensures the webhook uses your pre-configured destination.
- Leave JSON Body Unedited: Do not enable the "Edit Raw JSON Body" setting as it is not intended for this use case.
- Payload Format: When a patient reaches this step, a webhook is sent in the following format:
{
'type': 'automation'
'message': 'string',
'timestamp': 'string',
'integrity': 'string',
'enduserId': 'string',
}
Custom URL Endpoint Setup
- Configure a Trigger: Set up a trigger to determine when patients enter the journey.
- Create a Journey: Set up a journey and select the "Send Webhook" action type for a journey step.
- Enter Endpoint URL: In the “Send Webhook” step, provide the custom URL where the webhook should be sent.
- Define Payload Fields: Add key-value pairs for the data you want to send. Values can be hardcoded or patient profile fields can be referenced via string using the format: {{enduser.Field Name}}.
- Add Header Values: Configure any required HTTP headers, such as Content-Type, User-Agent, Authorization, or custom headers, to ensure proper request handling.
- Set the Send Method: Webhooks are sent using the POST method by default. You can change this using the "Method" dropdown, if a different HTTP method is required.
- Payload Format Example: When a patient reaches this step, a webhook is sent in the following format. Here’s an example payload that includes the enduser’s ID, a built-in field "email", and a custom field called “Payment Status”:
{
'enduser_id': '123456789'
'enduser_email': 'johndoe@email.com',
'payment_status': 'paid',
}
Editing the Raw JSON Payload Body
In some use cases, it may be necessary to have more control over the exact structure of the JSON body. This is common when integrating with certain external platforms. To accomplish this, you can simply enable the "Edit Raw JSON Body" setting and adjust the payload with valid JSON per your system's requirements.
Available Strings for Populating Webhook Values
Enduser (Patient) Fields
You can use the following dynamic strings to populate fields, values, or the endpoint URL in your webhook configuration:
- Identity & Contact:
- IDs
- {{enduser.id}}
- {{enduser.externalId}}
- {{enduser.Healthie ID}}
- {{enduser.humanReadableId}}
- {{enduser.athenaPracticeId}}
- {{enduser.athenaDepartmentId}}
- {{enduser.salesforceId}}
- {{enduser.chargebeeId}}
- Names
- {{enduser.fname}}
- {{enduser.mname}}
- {{enduser.lname}}
- {{enduser.suffix}}
- {{enduser.displayName}}
- Contact Info
- {{enduser.email}}
- {{enduser.alternateEmails}}
- {{enduser.phone}}
- {{enduser.alternatePhones}}
- {{enduser.landline}}
- Creation Info
{{enduser.createdAt}}
- IDs
- Demographics:
- {{enduser.dateOfBirth}}
- {{enduser.gender}}
- {{enduser.genderIdentity}}
- {{enduser.pronouns}}
- {{enduser.language}}
- {{enduser.timezone}}
- Computed Fields:
- {{enduser.Age}} — calculated from dateOfBirth
- {{enduser.BMI}} — calculated from height and weight
- Measurements:
- {{enduser.height.value}}
- {{enduser.height.unit}}
- {{enduser.weight.value}}
- {{enduser.weight.unit}}
- Address:
- {{enduser.addressLineOne}}
- {{enduser.addressLineTwo}}
- {{enduser.city}}
- {{enduser.state}}
- {{enduser.zipCode}}
- {{enduser.zipPlusFour}}
- Insurance (Primary):
- {{enduser.insurance.payerName}}
- {{enduser.insurance.memberId}}
- {{enduser.insurance.payerId}}
- {{enduser.insurance.groupNumber}}
- {{enduser.insurance.planName}}
- {{enduser.insurance.relationship}}
- {{enduser.insurance.eligibility}}
- {{enduser.insurance.status}}
- {{enduser.insurance.payerType}}
- {{enduser.insurance.startDate}}
- {{enduser.insurance.relationshipDetails}}
- Insurance (Secondary):
- {{enduser.insuranceSecondary.payerName}}
- {{enduser.insuranceSecondary.memberId}}
- {{enduser.insuranceSecondary.payerId}}
- {{enduser.insuranceSecondary.groupNumber}}
- {{enduser.insuranceSecondary.planName}}
- {{enduser.insuranceSecondary.relationship}}
- {{enduser.insuranceSecondary.eligibility}}
- {{enduser.insuranceSecondary.status}}
- {{enduser.insuranceSecondary.payerType}}
- {{enduser.insuranceSecondary.startDate}}
- {{enduser.insuranceSecondary.relationshipDetails}}
- Additional Fields:
- {{enduser.note}} — free text note on the patient profile
- {{enduser.marketingConsent}}
- {{enduser.unsubscribedFromMarketing}}
- {{enduser.preferredPharmacy}}
- {{enduser.customFieldName}} — any custom field (formatted exactly how it was originally defined, case-sensitive)
Organization Fields/Snippets
The following fields set at the organization level can also be leveraged:
- {{snippet:keyName}} — any snippet defined in the Templates section
- {{secrets.integrationTitle}} - returns the integration's
access_token(Only works in webhook headers, not in the body or URL)
Purchase Fields (Available for use with Purchase-specific Triggers Only)
These fields are available only if the patient is added to the journey via a "Purchase Made" trigger:
- {{purchase.id}} —Tellescope-assigned purchase ID
- {{purchase.externalId}} — Externally provided purchase ID
- {{purchase.cost.amount}} — Purchase cost in cents
- {{purchase.name}} — Name of the product purchased
- {{purchase.source}} — Source of the product purchased
Calendar Event Fields (Available for use with Calendar Event Triggers Only)
These fields are available only if the patient is added to the journey via a "Appointment Created", "Appointment Cancelled", "Appointment Completed", "Appointment Rescheduled", "Appointment No-Showed" trigger:
- {{calendar_event.id}}
- {{calendar_event.title}}
- {{calendar_event.start}}
- {{calendar_event.startTimeInMS}}
- {{calendar_event.durationInMinutes}}
- {{calendar_event.type}}
- {{calendar_event.source}}
- {{calendar_event.externalId}}
- {{calendar_event.videoURL}}
- {{calendar_event.externalVideoURL}}
- {{calendar_event.instructions}}
- {{calendar_event.timezone}}
- {{calendar_event.Healthie ID}}
SMS Message Fields (Available for use with "Incoming Message" and "SMS Reply" Triggers Only)
These fields are available only if the patient is added to the journey via an "Incoming Message" trigger (limited to the "SMS" channel) or "SMS Reply" trigger:
- {{sms.message}} — The text content of an incoming SMS message
Comments
0 comments
Article is closed for comments.