Setting up your Email templates

Email templates play a crucial role in automating communication within the platform, ensuring that users and service providers receive timely notifications for various events. These templates are linked to specific events, enabling the platform to automatically trigger the appropriate emails based on user actions or system events.

Why Event-Driven Email Templates Are Important

1. Automation: Automatically triggers emails for important events, ensuring users and providers are informed without manual intervention.

2. Consistency: Ensures all communication follows the same format and tone, maintaining a professional and cohesive brand presence.

3. Personalization: Templates can be customized to include user-specific information, improving the relevance of the communication.

4. Scalability: New templates can be added to accommodate future events, enhancing the platform’s flexibility.

5. Operational Efficiency: Saves time by reducing the need for repetitive manual communications, allowing staff to focus on higher-priority tasks.

List of Available Email Templates and Their Triggers

Template Name
Trigger Event
Purpose

EMAIL_APPOINTMENT_BOOKED_TEMPLATE

AppointmentBooking

Informs patients about their appointment booking confirmation.

EMAIL_APPOINTMENT_RESCHEDULED_TEMPLATE

AppointmentRescheduled

Notifies patients about a change in their appointment schedule.

EMAIL_APPOINTMENT_CANCELLED_TEMPLATE

AppointmentCancelled

Informs patients that their appointment has been cancelled.

EMAIL_APPOINTMENT_BOOKED_SERVICE_PROVIDER_TEMPLATE

AppointmentBookedForServiceProvider

Alerts service providers about a newly booked appointment.

EMAIL_APPOINTMENT_CANCELLED_SERVICE_PROVIDER_TEMPLATE

AppointmentCancelledForServiceProvider

Notifies providers about a cancelled appointment.

EMAIL_CONSUMER_AGREEMENT_TEMPLATE

ConsumerAgreementViewed

Sends a copy of the agreement template to the consumer for review.

EMAIL_REGISTRATION_CONFIRMATION_TEMPLATE

UserRegistration

Confirms successful registration of a new user on the platform.

EMAIL_INVITE_CONFIRMATION_TEMPLATE

InvitationSent

Sends a confirmation for invitations issued to users or providers.

CONSENT_INVITATION_EMAIL_TEMPLATE

ConsentRequest

Invites users to provide consent electronically.

EMAIL_EXPORT_PATIENT_DATA_TEMPLATE

PatientDataExportCompleted

Provides exported patient data to relevant recipients.

TELE_GUEST_INVITATION_TEMPLATE

TelehealthInvitationSent

Invites a guest to join a telehealth session.

PATIENT_JOINED_WAITING_ROOM

PatientJoinedWaitingRoom

Notifies a provider that a patient has joined the virtual waiting room.

APPOINTMENT_REM_30_MIN_TEMPLATE

AppointmentReminder30Minutes

Reminds patients of their appointment 30 minutes before the scheduled time.

Extending Email Templates for Additional Use Cases

The platform is designed to be flexible, allowing new templates to be added to support additional use cases as the platform evolves. This ensures the communication framework can scale alongside new features and user needs.

API for Configuring Email Templates and Events

The platform provides a robust API for administrators to configure email templates based on various events. This API enables:

  • Creation and Management of new email templates.

  • Mapping Templates to Events to automate triggers for specific user actions or system events.

  • Updating Existing Templates to reflect changes in content or event associations.

To add an email template using the API, you can send a request as shown below:

Request

Sample Response

Explanation

  • Endpoint: Send a POST request to {{PlatformBaseUrl}}/api/config/email-templates.

  • Headers: Include the organization code and specify Content-Type as application/json.

  • Payload: Define the email template with organizationId, contentHtml, sender, and purpose.

    • Sender: The email sender for the request

    • ContentHTML" : Liquid JS template

Last updated