Skip to content

Enclude-Components/SMS-Event-Reminders

Repository files navigation

SMS Event Reminders

Automatically sends SMS reminders to Event participants. Supports two modes: a scheduled reminder sent a configurable number of minutes, hours, or days before the event, and an immediate notification sent at the point of record creation. This package depends on Enclude Gateway SMS.

Install Latest Release

How It Works

Scheduled Reminder

  1. A user sets the SMS Reminder Time Offset (e.g. 2) and SMS Reminder Time Unit (e.g. Days Before) fields on an Event record.
  2. The SMS Reminder Date/Time formula field automatically computes the reminder time as the Event start date/time minus the offset.
  3. At the computed time, a record-triggered flow checks that the reminder is still current (within a 15-minute processing window).
  4. If valid, the flow looks up the Contact associated with the Event via the WhoId field and verifies they have a mobile phone number.
  5. An SMS message is created via the Enclude Gateway SMS package, which handles delivery.

Note

Salesforce scheduled flows do not fire at an exact time — there is a platform-level variance of a few minutes. For Minutes Before reminders shorter than 15 minutes, the SMS may arrive slightly earlier or later than expected.

Send on Creation

  1. A user ticks Send SMS on Creation when creating an Event record.
  2. On save, a record-triggered flow immediately invokes the subflow to send the notification.
  3. The checkbox has no effect if set after the record has been created. To resend, use the Send Event SMS Notification action instead.

Warning

No SMS will be sent if the participant is not a Contact or has no mobile phone number. See Supporting Additional Objects for more options.

Post-install Customisations

This being an unlocked package, it's possible to modify the metadata.

Defaulting the Reminder Offset

To avoid requiring users to manually set the offset fields on every Event, add a default value to SMS_Reminder_Time_Offset__c and SMS_Reminder_Time_Unit__c, or populate them via a flow triggered on Event creation.

Customising the SMS Message

The SMS body is built in the SUBFLOW_Send_Event_SMS_Notification flow using the DateTimeFormatterInvocable Apex action, which returns the event's start and end times as separate date (DD/MM/YYYY) and time (HH:mm) strings in Irish time (Europe/Dublin). These can be composed freely in a Flow Text Template to produce whatever message format is required.

Supporting Additional Objects

If SMS reminders need to be sent to objects other than Contact, such as Lead, modify the flow SUBFLOW_Send_Event_SMS_Notification

Additional Notifications

If SMS notifications should be sent at other points in the Event's lifecycle or automatically given certain criteria, create custom record-triggered Event flows and invoke the subflow SUBFLOW_Send_Event_SMS_Notification

Prerequisites

  • The Enclude Gateway SMS package must be installed in the target org before deploying this project

Objects & Fields

Object Field Type Description
Activity (Event/Task) SMS Reminder Time Offset Number The number of minutes, hours, or days before the Event start time to send the reminder
Activity (Event/Task) SMS Reminder Time Unit Picklist The unit to apply to the offset (Minutes Before / Hours Before / Days Before)
Activity (Event/Task) SMS Reminder Date/Time Formula (DateTime) The computed reminder time (read-only). Calculated as Event start minus the offset.
Event Send SMS on Creation Checkbox If ticked at record creation, immediately sends an SMS notification to the Event participant. Has no effect when edited after creation.

Flows

Flow Type Description
Event_Schedule_SMS_Reminder Record-Triggered (AutoLaunched) Triggers on Event create/update when SMS Reminder Date/Time and WhoId are populated. Schedules a path to fire at the computed reminder time, then checks the reminder is still current before invoking the subflow.
Event_After_Create_Send_SMS_Notification Record-Triggered (AutoLaunched) Triggers on Event creation only when Send SMS on Creation is ticked. Immediately invokes the subflow to send the notification.
SUBFLOW_Send_Event_SMS_Notification AutoLaunched (Subflow) Called by the parent flows or the screen flow. Looks up the Contact via WhoId, validates their mobile phone is populated, formats the event date/time via the DateTimeFormatterInvocable action, and creates an SMS Message record via the Enclude package to trigger delivery.
SCREEN_Send_Event_SMS_Notification Screen Flow Allows a user to manually send (or resend) an SMS notification for an Event. Can be added to the Event record page as a quick action.

Apex Classes

Class Description
DateTimeFormatterInvocable Invocable action that converts a DateTime value to a formatted date (DD/MM/YYYY) and time (HH:mm) string in Irish time (Europe/Dublin), with correct DST handling. Used by the subflow to build the SMS body.

Permission Sets

Permission Set Description
SMS Event Reminders Grants read/edit access to the SMS Reminder Time Offset, SMS Reminder Time Unit, and Send SMS on Creation fields, and read access to the SMS Reminder Date/Time formula field, on Events and Tasks

Assign this permission set to any users who should be able to schedule SMS reminders.

Development

Warning

This section is for developers only.

  1. Set up CumulusCI
  2. Run cci flow run dev_org --org dev to deploy this project.
  3. Run cci org browser dev to open the org in your browser.

Release

  1. Release a Beta Version
cci flow run release_unlocked_beta --org dev
  1. Test Deploy the Beta Version
cci flow run ci_beta --org beta
  1. Promote to a Production Version. This promotes the latest beta version by default
cci flow run release_unlocked_production --org release

About

Extension of the SMS package adding SMS notifications and reminders for Events

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages