Trigger - Event
The Event trigger allows you to start a Flow when an event is triggered in your product (web or mobile app) – i.e. when someone performs an action in your product. For instance, when a person signs up for your app, you can send them a welcome email.
- The Event trigger will not work with events from Segment.com. For that please use the Segment Event trigger.
- The Event trigger can fire multiple times. For instance, if you have an event "Task Created" that triggers every time a person creates a task in your product, the step will trigger every time someone creates a task. However, you can use a filter step to end the Flow for people that have already completed the action. Read the last section of this article.
Connecting your app to Encharge
How to set up the Event trigger step?
To set up the step enter the name of the Event in your app. Note that the event name is case sensitive and must match exactly the name of the event coded in your app, otherwise, the step will not trigger.
The step will trigger every time someone performs this event (action) in your app.
Filtering with event properties
You can optionally add event properties to filter which event is specifically triggered with the step.
Event properties are additional attributes that come with events. For instance, the event "Signed Up" might have "Name", "Email", "Country" (of the person) as attributes. A "Task created" event might have "Type of task", "Submission time", and other properties.
In the example below, the step will only trigger if the task created is a recurring task.
To remove an event property click on the trash can on the right of the event name.
How to prevent people from triggering an Event trigger more than once?
The Event trigger can fire multiple times. For instance, if you have an event "Task Created" that triggers every time a person creates a task in your product, the step will trigger every time someone creates a task.
It's currently not possible to prevent people from entering an Event trigger step more than once. However, you can use a filter step to prevent people from continuing in the Flow if they have already performed the event. To do so connect the Event trigger to the Check Field filter step:
Then set up the Check Field step by adding an Event condition and using the name of your event:
Use the "Event count" switch and choose More than 1 time. This will target people that have performed the event 2 or more times:
Finally, connect the Check Field filter step to an action step. To end the Flow for people that have performed the event more than 1 time connect the Yes link to an End Flow step.
Using a Segment
Another way to prevent a person from entering a Flow more than once when they perform an event multiple times is by creating a Segment with Event condition:
Then in the Flow builder, use the Entered Segment step and connect it to the actions you'd like. With this setup, a person can enter a Segment only once, therefore the step can't be triggered more than once when they perform the action again.
Activate your Flow and test it by sending an event to your app. Then check the Activity Feed on your Dashboard to confirm it was successful:
Note that the Activity Feed will only display events that are used on a trigger in an activated Flow.
Additional resources and use cases.