Village Product and Developer Docs
  • 📘Welcome to Village Labs
    • Welcome to Village Labs
    • Self Service Onboarding
    • Help Pages
      • Adding and Deleting Users
      • Mapping Users to Source tool IDs
      • How to follow or unfollow other users
      • Configuring & Removing Daily Slack Notification Whitelist
      • Changing the Reporting Lines & Teams
      • Following Custom Reports
      • Google Drive Privacy: When will my documents appear in Village Reports?
    • Custom Reports
      • Creating Team Reports
      • Creating Custom Reports & Custom Prompt Library
    • Meetings
      • Connecting your Calendar
      • Configuring your Meetings
      • Meeting Summary Reports
    • Village Assistant
      • Github PR Review Tool
    • Security & Compliance
    • Data Privacy & Permissions
  • 🔌Data Connections
    • Airtable
    • Ashby
    • Clickup
      • Finding ClickUp User IDs
    • Figma
    • Github
      • Finding GitHub User IDs
    • Gitlab
    • Google - OAuth (Recommended)
    • Google - Manual Connection
    • Hubspot
    • Jira
      • Finding Jira User IDs
    • Confluence
      • Finding Confluence / Jira User IDs
    • Linear
    • Asana
    • Monday
    • Notion
    • Pipedrive
    • Slack
    • Basecamp
    • Zoom
  • 👩‍💻Legacy Developer Docs
    • Developer Quickstart
    • Village APIs: Introduction
      • Activity API
      • User Status API
      • Patch User API
      • Segments API
      • Redemption API
      • Master Award Controls
      • Connections (Referrals) APIs
      • GET APIs
    • 3rd Party Payments Integrations
    • Embedding Village Dashboards
  • 🕵️LEGACY Knowledge Base
    • Admin Quickstart
    • Referrals Support
    • The Basics of Village in 15 Minutes
    • Programs & Rules
      • Triggers
        • Activities
        • Goals
      • Conditions
        • Segment Conditions
        • Time Conditions
        • Max Budget Conditions
        • Conditional Multipliers
    • Awards
      • Monetary (Cash) Awards
      • Non-Monetary Awards
        • Funding
          • In-depth use cases for funding pools
      • Badges & Statuses
      • Award Expiration
    • Segments
      • Segmentation Use Cases
    • Rule Evaluation Logic Deep-dive
    • The Village Dashboards
      • Admin Account Creation
      • User Access Management
      • Network Settings
      • User Dashboard
    • BigQuery
    • Managing Payment Integrations
    • Referrals (Connections)
      • Pre-populating Users' Unique Referral Codes In Signup Flows & Forms
  • No and Low Code Solutions
    • No and Low Code Solutions
      • No & Low Code Solutions
  • Feedback
    • Village Docs Feedback Form
    • Feature Requests
    • Talk to our Team
Powered by GitBook
On this page

Was this helpful?

  1. LEGACY Knowledge Base

Rule Evaluation Logic Deep-dive

A detailed explanation of how rule evaluation works

Rules Evaluation Logic Flow

Background

This section goes into more detail on exactly how the Village evaluates when a rule should be triggered, and what action to take. It is not required reading, but gives a more in depth understanding of the underlying system.

The Village system relies on two main pillars of data:

  1. Who people are: This involves user data, such as customer or supplier information, and the user's segment memberships and award balances.

  2. What people do: This refers to a user's ongoing activities online and in the real world, including deliveries, clicks, money transfers, and more. Activities fall into two broad categories: "Actions" and "Sales."

When is a rule executed?

Rule evaluation, that is whether a rule should be executed or not, can be triggered in two ways:

  1. User activity: Any real-world or app-based user action, like onboarding, completing a transaction, or making a delivery, can trigger a rule.

  2. Scheduled evaluation: Some rules have specified evaluation frequencies, and they are evaluated at the scheduled dates and times, for example "daily at 9pm GMT.”

Activity-Based Rules

1. Determine Rules to Evaluate:

  • If activity occurs, but there is no trigger set up that is associated with that activity, no rule evaluation commences.

  • When activity corresponds with a trigger, the user activity data will be used to evaluate any relevant rules. This could include a simple rule that is using this particular activity as a trigger, or a more complex cumulative activity goal that uses this trigger within its goal evaluation logic.

  • If the activity does not successfully pass evaluation for any rule or qualify for any goal that triggers a rule, the rule evaluation ends.

2. Rule Conditions and Goal Qualifications

a. Evaluate Rule Conditions:

  • Any rule conditions must be met before executing rule logic.

  • This includes checking whether the activity is within the active dates for both the rule and the program, and that the activity itself occurred within any activity qualification period, if set. If not, the rule evaluation ends.

  • Next, we evaluate whether the award recipient passed segment eligibility criteria at both the rule and program level. If not, the rule evaluation ends.

b. In the case of Goal-based Triggers, Evaluate Goal Qualifications. If not, skip to 3.

  • If the rule trigger passes all rule conditions, the rule's goal qualification logic will be executed.

  • This includes checking whether the activity amount meets the goal qualification requirements and has occurred within the goal qualifying dates. If not, the rule evaluation ends.

3. Rule Execution

a. Execute Rule:

  • If the award is over a max payout threshold, the rule execution ends.

  • If the rule's goal qualifications are met, the rule logic will be executed, which may involve issuing an award, adding or removing a user from a segment, or sending a communication, depending on the rule configuration.

b. Award Calculation:

  • If an award is to be issued, the activity amount is multiplied by the rule award amount to determine the award amount to be applied.

  • If the recipient is on a segment suspension list, the award is not issued, and the rule execution ends.

c. Issue Award or Segment:

  • The award or segment is issued to (or revoked from) the recipient.

Scheduled Evaluation Rules

  • Some rules are evaluated on a schedule rather than as a result of user activity.

  • Scheduled evaluations are used for:

    • Percentile activity goals (eg. is a user in the top 5% of riders based on trip count)

    • Minimum award goals (eg. does a user have 10,000 reward points)

    • Percentile award goals (eg. is a user in the top 5% of users ranked by award points held)

    • When the rule's scheduled evaluation date-time occurs, evaluation will commence. This can lead to the execution of minimum award, percentile award and percentile action goals.

Otherwise, scheduled evaluation rules are evaluated and executed in the same way as activity-based rules.

In all cases, if conditions or qualifications are not met, the rule evaluation or execution ends, ensuring that awards and segments are only issued when all necessary conditions are met.

PreviousSegmentation Use CasesNextThe Village Dashboards

Last updated 1 year ago

Was this helpful?

🕵️