How triggers work
Triggers are business rules you define that run immediately when a specified event occurs. To understand triggers and when to use them we must first understand Influx events and the important consideration of event order. An event is often referred to as having “fired” when it occurs. So trigger actions are completed when an event fires.
Maps, tracks and steps have at least two events capable of initiating triggers. These events are open and close.
- Map open occurs when a lead is assigned to a map
- Map close occurs when the lead status is changed to closed, won, or lost.
- Track open occurs when a new track is opened
- Track close occurs when all steps in a track are completed
- Step open occurs when the track containing the step opens
- Step close occurs when the step is completed by the lead or the agent.
Now let’s consider some situations where events may not fire as you expect them to.
First track in a map: The open event of the map, track and all of the steps in the track occur simultaneously. If you attach triggers to any of these open events they will all fire at the same time.
First track is a video track: The open event of the map, first track, second track and all of the steps in both the first and second tracks will fire simultaneously. Video tracks do not stop workflow so that the agent can continue to work the lead whether or not the lead has completely watched all of the videos. To allow this to happen, Influx opens the video track and the next task track together.
Multiple video tracks: If your map has several video tracks in a row, all of them, along with the next task track will fire track open and step open events at the same time. If you want notification when a video has been watched, attach your trigger to the close event.
Flex track with flex trigger: All of the steps in a track open at the same time as the track opening. This will mean that most times you will simply attach your trigger to the track open. However, there are special situations when the step open is the right choice for firing your trigger. If you are using a flex track configured by a flex trigger, attaching another trigger to a step that is removed when the flex trigger fires will prevent that trigger from firing. In this way you can, for example, send a different email to a lead by attaching triggers to two steps, either one of which will be removed based on the flex trigger.
Optional steps: If you attach a trigger to the close event of an optional step, the agent may progress to the next track without ever completing your step. In this case, the trigger will never fire.