Triggers
See Create Triggers to Email Class Reminders, Follow-ups and Surveys for an in-depth guide on how to use triggers.
Creating Triggers
Triggers consist of two main components: Actions and Events.
- Action - defines some behaviour to complete (such as sending a course survey email)
- Event - describes when to take that action (such as when a course is closed or completed)
You are also required to provide a name for your trigger.
Events
The following event types can be configured for Triggers.
Event | com.trainingrocket.module.training.event.CourseEventEnrolmentCreateEvent |
---|---|
Description | Fired whenever a new enrolment is created on a course event (private or public). |
Entity | The newly created Enrolment. |
Event | com.trainingrocket.module.training.event.CourseEventClosedEvent |
---|---|
Description | Fired whenever a course event is closed via the Instructor Interface. |
Entity | The closed Course Event. |
Actions
The following actions are currently available to be configured. Each action will have a set of options which need to be configured.
TriggerFiringTriggerAction
Used to trigger another trigger, passing a different entity. A common use case for this action is when wanting to perform another action on a collection (such as sending an email to all enrolments on a course event).
Option | Description | Example Value |
---|---|---|
targetField | The field on the events entity, containing entities to fire the next trigger with. | enrolments |
triggerId | The ID of the trigger to fire for each entity in the targetField. | 1 |
ScheduleTriggerAction
Used to schedule another trigger to be fired in the future.
Option | Description | Example Value |
---|---|---|
targetTriggerId | The ID of the trigger to fire at the scheduled time. | 1 |
period.beforeOrAfter | Indication of whether to schedule the notification before or after the timeField according to the period fields. | before |
period.days | The amount of time in days to schedule the notification out from the timeField. | 1 |
timeField | The field to use as a date and time for when to send the notification, modified by the period fields. | associatedEntity.startTime |
timezoneField | An indication of the time zone the timeField date and time is in. | associatedEntity.location.timeZone |
NotificationSchedulingTriggerAction
Schedules a notification to be sent at some point in the future. For example, send a survey notification 10 days after a course event is closed.
Option | Description | Example Value |
---|---|---|
toFields | The field containing a contact entity to send the notification to. | contact |
templateId | The ID of the template to use when sending mail. | 1 |
period.beforeOrAfter | Indication of whether to schedule the notification before or after the timeField according to the period fields. | before |
period.days | The amount of time in days to schedule the notification out from the timeField. | 1 |
timeField | The field to use as a date and time for when to send the notification, modified by the period fields. | associatedEntity.startTime |
timezoneField | An indication of the time zone the timeField date and time is in. | associatedEntity.location.timeZone |
To request a new event or action to allow you to complete a specific automation, please contact our Learndot Support team.