Triggers

Things that cause rules to be evaluated

Triggers Overview

Triggers are what kick off a ruleโ€™s evaluation process. Each rule must have a trigger, and if the evaluation of the rule is successful, the rule will be executed. Triggers can cause a rule to be evaluated in one of two ways: based on some specific activity that has occurred, or based on a schedule.

  • 1. Activity: Any real-world or app-based action, like onboarding, completing a transaction, or making a delivery, can trigger a rule evaluation. These activities are configured and passed to Village through our secure rest API or through a third-party data connection.

  • 2. Schedule: Some rules have specified evaluation schedules, for example "daily at 9pm GMT", and will be triggered at the scheduled dates and times. Specifically, Goal-based Triggers can be evaluated on a schedule.

When you create an activity-based trigger, you are effectively telling the API or data connection to listen for any events that trigger the rule. When it hears these events, the rule will be evaluated. If the evaluation is successful, itโ€™ll execute the rule. This is the same for scheduled evaluations, except that a date and time sets off the rule evaluation, rather than an event.

Types of Triggers in Village

Please see the Activity Triggers (Actions and Sales), and Goal Triggers for a detailed breakdown of each.

Here's a quick summary of the types of triggers that can be created in Village: Activities and Goals.

Activity Triggers

Action Triggers

Action triggers are the simplest type of trigger. They correspond to events that occur on your platform, such as user sign-up, document upload, or delivery completion. These triggers are straightforward to set up and can be used in any rule, or as a component of a goal trigger.

When a corresponding event or activity happens on your platform, Village detects the event and triggers the evaluation of the associated rule.

Sales Triggers

Sales triggers function similarly to action triggers. When using a Sales trigger, you likely don't just care that the sale occurred, but also the total GMV or the value of a specific sale and trigger a rule evaluation accordingly. Examples include providing an additional promo on top of every sale corresponding to basket-size, offering a 5% cashback on every sale, or modifying commission rates for transactions of a certain size.

Note that although we distinguish between Action and Sales Triggers on a functional level, they both use the Activity API.

Goals Triggers

Goals trigger a rule only when that goalโ€™s evaluation criteria has been satisfied. This means they introduce the concept of logic into a trigger, and allow you to set specified thresholds or conditions that you want a trigger to pass before a rule is evaluated.

Here's a very simple example of how to think about using an Action trigger versus a Goal Trigger. Let's say I want to award $5 every time a user completes a trip. I would use a simple Action trigger "Trip Complete" to award $5 every-time a trip completes.

Now let's say I only want to award a user the first time they complete a trip. I need logic to evaluate this. I'd use a Goal trigger, with logic "Trip Complete" = 1. Similarly I could award $5 only when the user completes 5 trips, where "Trip Complete" = $5.

When you set up Goal triggers, you can choose whether you want to consider activities, or awards and segments, as part of the evaluation:

  • Activity-based goals: these can be as simple as the number of actions meeting some specified threshold, or more nuanced, like multiple separate actions meeting specified thresholds as defined by the logic implemented when creating the goal.

    • Example: a goal could specify that a user must fulfill ten deliveries within a given time period for the goal evaluation criteria to be passed.

  • Award & segment-based goals: these function similarly to activity-based goals except they require a user to be in a segment, or have some defined number of awards. These types of goals can be set to run off scheduled evaluation frequencies to ascertain whether a meets the qualification criteria.

    • Example: a user must have over 10,000 points to pass the goal evaluation.

Last updated