Rules execute all of their Actions when all of their specified Conditions are true. Conditions may reference Events, Sessions, Profiles, Sources, and Segments, while Actions may utilize Connections when interacting with external systems.
For example, suppose you fire an event
Form Completed after a visitor to your website completes a form. You may define a Rule that depends on a Condition where
event must equal
Form Completed, and which fires an Action that sends a notification email.
How Rules are Evaluated and Executed
Rules are retrieved based on an inbound Event's information and are processed via a structured lifecycle:
- Firstparty looks up the Source based on that Event's
- Firstparty saves the Event, Session, and Profile, and sends a response to the Client
- Firstparty now retrieves all Rules enabled for that Source, evaluates the Conditions, and executes the appropriate Actions.
- The Event, Session, and Profile are saved once more.