Activities
Understanding how and when to use activity-based triggers
Last updated
Understanding how and when to use activity-based triggers
Last updated
Activity triggers are the simplest type of trigger within Village. They correspond to things that occur on your platform like events or behavior (Actions) or transactions (Sales).
During the implementation and setup phase, you'll need to map the activities that occur on your platform which you want to use within incentive or segmentation rules to the triggers that you set up within Village. This is done using the Activity API.
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 as a component of any rule, or as part of the qualification requirements of a goal.
When activity happens on your platform, the corresponding trigger will start the evaluation of the rule or goal logic of which it is a part.
Sales triggers are very similar to action triggers. However, they are designed to reference the value of a transaction, rather than whether a distinct activity occurred or not. When you set up a Sale trigger inside the Activity API, the "Amount" field references the total value of each transaction, and you can then use this amount as the basis for rules logic.
For example, if you want to award 1% cash back per sale, you would create a rule using a Sales trigger that awards .01 per transaction, or $.01 for every $1 in the amount field. If the transaction was for $10, this would award .01 * $10 = $0.10.
It's worth knowing that when you are passing an Action (versus a Sale) to Village using the Activity API, it's likely the amount field will be 1, since a single action occurred, eg. 1 signup. But the same logic applies to Actions as Sales if you were passing multiple Actions at once to Village through a single API call, eg. where action amount = 5.
Inside the Triggers section, choose either the Action or Sales tab. Click on the "New Action/Sales Trigger" button. The following inputs are required:
Input | Description |
---|---|
As a reminder, once you have created triggers within Village's admin dashboard, you still need to ensure that these are mapped correctly in the Activity API for rules that use these triggers to execute when the activity occurs on your platform.
Name
This may be user-facing, so choose a name that is identifiable for both external and internal users.
Short ID
This is the ID that will be used to map the trigger you’ve created in Village to a given activity on your platform inside the Activity API. This is also the ID used in the database to identify a particular trigger.
Description
Enter a short description to help identify the trigger. This is internal only.
Associated Users
Specify which of your users you would like this trigger to be associated with. Associated users will appear as recipients when you create a rule using this trigger (or in a rule with a goal-trigger that uses this trigger within its qualification logic). Please ensure these users are also being passed through by the Activity API.
For example: some events occurring on your platform may have multiple associated users. A food delivery taking place on a 3-sided marketplace platform likely has an associated consumer, deliverer and restaurant user. Creating one or multiple associated users will enable all of these users to be recipients when the associated rule executes.
Qualification Period
You have the option to restrict the time period in which a given activity or transaction will activate the trigger. For example, if you only want the trigger to activate for transactions during 6-9pm, you can set this with the qualification period. The trigger will not activate for a transaction that occurs at 5pm.