Skip to main content

Conditions

Conditions are the brains of your gamification system. They're rule containers that sit in your RapidMule dashboard and automatically evaluate every Action you send. When a Condition's requirements are met, magic happens - Badges are awarded, Triggers fire, and Deliverables are issued.

What is a Condition?

Think of a Condition as a complete rule that defines when and how a player earns a specific Badge or Trigger. Every Badge and Trigger in RapidMule has at least one Condition attached to it.

The Formula:

Condition = Challenges + Filters + Target (Badge/Trigger)

When you send an Action to RapidMule, the engine evaluates it against all active Conditions. If an Action satisfies a Condition's Challenges and passes its Filters, the associated Badge or Trigger is awarded.

Anatomy of a Condition

Every Condition has three key components:

1. Target Action

Which action type triggers this condition?

  • "purchase" - Tracks purchase actions only
  • "login" - Tracks login actions only
  • "complete_workout" - Tracks workout actions only

2. Challenges

The "what must happen" rules. Challenges define the specific criteria that must be met:

  • Several Times Challenge: "Player must perform this action X times"
  • Sum Challenge: "Player must accumulate a total of X (e.g., $1000)"
  • In A Time Period Challenge: "Player must do X within Y days (sliding window)"
  • For A Time Period Challenge: "Player must do X during specific dates (fixed period)"

You can combine multiple Challenges within one Condition!

3. Filters (Optional)

The "which actions qualify" rules. Filters narrow down which Actions count toward the Condition:

  • "Only purchases where category = "electronics""
  • "Only workouts where difficulty = "advanced""
  • "Only bets where amount >= 50"

Real-World Example

Let's create a "VIP Customer" badge for users who spend $1000+ in any 30-day period:

Dashboard Configuration:

Badge: "VIP Customer"

Condition:
Target Action: "purchase"

Challenge 1: Sum Challenge
- Action Object to Sum: "amount"
- Target Value: 1000

Challenge 2: In A Time Period Challenge
- Time Window: 30 days

Filter:
- Action Object: "category"
- Operator: "is not"
- Value: "refund"

What happens:

  1. User makes a $300 purchase → Added to running total (300/1000)
  2. User makes a $450 purchase → Added to running total (750/1000)
  3. User makes a $100 refund → Filtered out (doesn't count)
  4. User makes a $300 purchase → Total reaches $1050 ✅
  5. All within 25 days (< 30-day window) ✅
  6. Badge awarded! 🎉

Combining Multiple Challenges

The real power of Conditions comes from combining multiple Challenges:

Example 1: Habit Formation

Goal: Award "Fitness Enthusiast" to users who work out 10 times AND burn 5000 total calories in any 30 days

Condition:
Action: "complete_workout"

Challenge 1: Several Times Challenge
Target Count: 10 workouts

Challenge 2: Sum Challenge
Action Object: "calories_burned"
Target Value: 5000

Challenge 3: In A Time Period Challenge
Time Window: 30 days

What this means: The player must hit all three targets:

  • Complete 10 workouts ✅
  • Burn 5000 calories total ✅
  • Do it within any 30-day span ✅

Example 2: Category Mastery

Goal: Award "Shopping Expert" to users who make at least 1 purchase from each of 5 different categories

Condition:
Action: "purchase"

Challenge 1: Several Times Challenge
Target Count: 1 per unique category

Challenge 2: Unique Values Challenge
Action Object: "category"
Unique Count Required: 5

Conditions vs Challenges vs Filters

It's easy to confuse these, so here's the breakdown:

ConceptPurposeExample
ConditionThe complete rule container"VIP Customer Condition"
ChallengeSpecific criteria within the rule"Spend $1000 total" + "Within 30 days"
FilterWhich actions qualify"Only count purchases where category != refund"

Think of it like baking a cake:

  • Condition = The recipe
  • Challenges = Required ingredients (eggs, flour, sugar)
  • Filters = Quality standards (organic eggs only, high-grade flour)

Multiple Conditions for One Badge

Sometimes you want players to earn the same Badge through different paths. You can attach multiple Conditions to a single Badge:

Example: "Power User" Badge

Badge: "Power User"

Condition 1: Spending Path
- Spend $5000 total (Sum Challenge)

Condition 2: Activity Path
- Complete 100 actions (Several Times Challenge)

Condition 3: Social Path
- Get 50 upvotes on content (Sum Challenge)

The player can earn "Power User" by satisfying any one of these Conditions. This creates multiple engagement paths!

When Are Conditions Evaluated?

Conditions are evaluated in real-time when you send an Action. There's no batch processing or delay:

Send Action → Evaluation starts immediately → Response in milliseconds

This means your frontend can instantly display:

  • "🎉 New badge earned!"
  • "You're 3 purchases away from VIP status"
  • "Congratulations, you unlocked premium features!"

Dashboard-Only Configuration

Here's the beautiful part: You never write condition logic in code. All Conditions, Challenges, and Filters are configured once in your RapidMule dashboard.

The dashboard handles:

  • Challenge configuration
  • Filter setup
  • Rule combinations
  • Badge/Trigger assignment
  • Deliverable issuance

You can change rules, add new badges, modify filters - all without touching your code! 🎯

Common Condition Patterns

Pattern 1: Simple Milestone

Condition: "First Purchase Badge"
Action: "purchase"
Challenge: Several Times (count = 1)

Pattern 2: Accumulation Goal

Condition: "Big Spender Badge"
Action: "purchase"
Challenge: Sum (amount = 10000)

Pattern 3: Consistency Reward

Condition: "Loyal User Badge"
Action: "login"
Challenge 1: Several Times (count = 30)
Challenge 2: In A Time Period (30 days)

Pattern 4: Filtered Achievement

Condition: "Mobile Champion Badge"
Action: "login"
Challenge: Several Times (count = 50)
Filter: platform = "mobile"

Pattern 5: Complex Combination

Condition: "Elite Athlete Badge"
Action: "complete_workout"
Challenge 1: Several Times (count = 50)
Challenge 2: Sum (calories_burned = 25000)
Challenge 3: In A Time Period (60 days)
Filter 1: difficulty = "advanced"
Filter 2: completed_at_gym = true

Benefits of the Condition System

1. No Code Changes Required

Change rules without deploying new code. Marketing can create new campaigns without engineering!

2. Flexible Combinations

Mix and match Challenges and Filters to create sophisticated rules.

3. Real-Time Evaluation

Instant feedback to users when conditions are met.

4. Multiple Paths to Success

Attach multiple Conditions to one Badge for different earning paths.

5. Clear Separation of Concerns

Your code sends events. RapidMule handles gamification logic.


Challenges

Challenges are the specific rules within a Condition that define "what must happen" for a player to earn a Badge or Trigger. They're the building blocks of your gamification logic.

Think of Challenges as the actual criteria you're measuring:

  • "Did the player do this 5 times?" (Several Times Challenge)
  • "Did they accumulate a total of $1000?" (Sum Challenge)
  • "Did they complete 10 workouts in any 30-day window?" (In A Time Period Challenge)

Each Challenge type serves a different purpose, and you can combine multiple Challenges within one Condition to create sophisticated rules.

Challenge Types

Several Times Challenge

The "Several Times Challenge" requires players to perform a specific action or achieve a particular milestone multiple times to earn rewards, recognition, or progress in the gamified system.

Example

Award the player with a "VIP" badge after placing 100 bets.

This challenge is designed to foster repeated engagement, skill development, and sustained participation, motivating players to consistently interact with the platform.

Sum Challenge

The Sum Challenge defines conditions where players must accumulate a specific total through their activities, events, or actions. As players engage, their contributions are added to a cumulative total.

Example

Award the "Depositor" badge when the total sum of deposit actions reaches $50,000.

The challenge is completed once this total reaches or exceeds the specified target, rewarding continued participation and progress.

For A Time Period Challenge

This challenge can be used where players are tasked with completing specific activities, achieving goals, or accumulating points within a set timeframe. These challenges are designed to create a sense of urgency and excitement.

Example

Log in to the mobile app every day during January.

In A Time Period Challenge

This challenge is very similar to the "For A Time Period" challenge. The only difference is "In A Time Period" challenge has a sliding time window.

Example

Log in to the mobile app at least 10 times during a 30-day window.

The key difference:

  • For A Time Period: Fixed calendar dates (January 1-31)
  • In A Time Period: Sliding window (any consecutive 30 days)

The sliding window is much more forgiving and creates achievable goals for users who join at different times.

Combining Challenges: Patterns

The real power of Challenges comes from combining them within a single Condition. Here are common patterns:

Pattern 1: Count + Time Window

Goal: Build consistent habits with flexible deadlines

Badge: "Fitness Enthusiast"
Challenge 1: Several Times Challenge (10 workouts)
Challenge 2: In A Time Period Challenge (30 days)

What this means: Complete 10 workouts within any 30-day span. The window slides with user activity, making it achievable for everyone.


Pattern 2: Volume + Value

Goal: Reward both quantity and quality

Badge: "Power Trader"
Challenge 1: Several Times Challenge (50 trades)
Challenge 2: Sum Challenge ($50,000 total volume)

What this means: Place at least 50 trades AND trade at least $50,000 total. This prevents users from gaming the system with either many small trades or few large trades.


Pattern 3: Accumulation + Time Pressure

Goal: Create urgency while tracking progress

Badge: "Monthly Champion"
Challenge 1: Sum Challenge (5000 points)
Challenge 2: For A Time Period Challenge (January 1-31)

What this means: Accumulate 5000 points during January. Everyone starts fresh at the beginning of the month, creating a competitive sprint.


Pattern 4: Triple Combination

Goal: Complex achievement for advanced users

Badge: "Elite Athlete"
Challenge 1: Several Times Challenge (50 workouts)
Challenge 2: Sum Challenge (25,000 calories burned)
Challenge 3: In A Time Period Challenge (60 days)

What this means: Complete 50 workouts AND burn 25,000 total calories, both within any 60-day window. This creates a high-value achievement that requires sustained commitment.

Challenge Examples by Industry

E-commerce: VIP Customer Badge

Goal: Reward high-value customers

Condition:
Action: "purchase"
Challenge 1: Sum Challenge
- Object: "amount"
- Target: 1000
Challenge 2: In A Time Period Challenge
- Window: 30 days

Business Impact: Customers who spend $1000+ in any 30 days unlock VIP perks (free shipping, priority support, exclusive access).


Fitness App: Streak Master Badge

Goal: Build daily exercise habits

Condition:
Action: "complete_workout"
Challenge 1: Several Times Challenge
- Count: 30
Challenge 2: For A Time Period Challenge
- Period: 30 consecutive days

Business Impact: Users who work out daily for a month develop lasting habits and are significantly less likely to churn.


Gaming: Season Champion Badge

Goal: Competitive seasonal achievement

Condition:
Action: "win_match"
Challenge 1: Several Times Challenge
- Count: 100 wins
Challenge 2: For A Time Period Challenge
- Season dates: March 1 - March 31

Business Impact: Creates monthly competitive cycles that bring players back regularly.


Community Platform: Content Creator Badge

Goal: Encourage quality content creation

Condition 1 (Ranked Badge):
Action: "create_post"
Rank 1: 1 post
Rank 2: 5 posts
Rank 3: 20 posts
Rank 4: 50 posts
Rank 5: 100 posts

Condition 2 (Quality Badge):
Action: "receive_upvote"
Challenge 1: Sum Challenge
- Count: 100 upvotes
Challenge 2: In A Time Period Challenge
- Window: 90 days

Business Impact: Rewards both volume (posts) and quality (upvotes), creating a balanced incentive structure.

Choosing the Right Challenge Type

GoalChallenge TypeExample
Track milestonesSeveral Times"Complete 10 purchases"
Accumulate valueSum Challenge"Spend $1000 total"
Build habitsSeveral Times + In A Time Period"5 workouts in any 7 days"
Create urgencyFor A Time Period"Win 50 matches in January"
Long-term growthSum Challenge (no time limit)"Burn 1 million calories (lifetime)"
Flexible consistencyIn A Time Period"Login 20 times in any 30 days"

Challenge Design Tips

1. Start Easy, Scale Hard

Badge: "Community Contributor" (Ranked)
Rank 1: 1 post (easy entry)
Rank 2: 5 posts (achievable)
Rank 3: 20 posts (commitment)
Rank 4: 50 posts (dedication)
Rank 5: 100 posts (mastery)

2. Use Sliding Windows for Habits

# ✅ Good: Forgiving, achievable
"5 workouts in any 7-day window"

# ❌ Bad: Too strict, users give up
"Work out every single day for 7 days"

3. Combine Quantity + Quality

# ✅ Good: Balanced incentive
Challenge 1: 50 posts
Challenge 2: 100 total upvotes

# ❌ Bad: Encourages spam
Challenge: 100 posts (no quality check)

4. Match Time Windows to User Behavior

# Daily habits
"Login 7 times in 7 days"

# Weekly goals
"Complete 3 purchases in any 7-day window"

# Monthly challenges
"Earn 1000 points in January"

# Lifetime achievements
"Reach 1 million total points"

Filters

Filters are the gatekeepers of your Conditions. They answer the question: "Which Actions should count toward this Badge or Trigger?" While Challenges define "how many" or "how much," Filters define "which ones."

What is a Filter?

A Filter is a criteria applied to Action Objects that narrows down which Actions qualify for a Condition. Without Filters, every Action of a given type would count. With Filters, you can be extremely selective.

Example without Filter:

Condition: "First Purchase Badge"
Action: "purchase"
Challenge: Several Times (count = 1)

ANY purchase triggers this badge.

Example with Filter:

Condition: "Electronics Enthusiast Badge"
Action: "purchase"
Challenge: Several Times (count = 1)
Filter: category = "electronics"

ONLY electronics purchases trigger this badge.

How Filters Work

Filters act as a pre-filter before Challenges are evaluated. If an Action doesn't pass the Filters, it never even reaches the Challenge logic.

Filter Operators

RapidMule supports various comparison operators for Filters:

OperatorDescriptionExample
is / =Exact matchcategory is "electronics"
is not / !=Not equalcategory is not "refund"
>Greater thanamount > 100
>=Greater than or equalamount >= 50
<Less thanage < 18
<=Less than or equalduration <= 30
containsString containstitle contains "React"
starts withString starts withemail starts with "vip"
ends withString ends withemail ends with "@company.com"
Tüm Operatörleri Görmek İster misiniz?

RapidMule'da kullanılabilen tüm filter operatörlerini ve özelliklerini görmek için demo talep edin.

Common Filter Patterns

Pattern 1: Category-Specific Badges

Badge: "Electronics Enthusiast"
Condition:
Action: "purchase"
Challenge: Several Times (1 purchase)
Filter: category = "electronics"

Badge: "Fashion Forward"
Condition:
Action: "purchase"
Challenge: Several Times (1 purchase)
Filter: category = "clothing"

Result: Different badges for different product categories, encouraging diverse purchases.


Pattern 2: Value Threshold

Badge: "Big Spender"
Condition:
Action: "purchase"
Challenge: Several Times (10 purchases)
Filter: amount > 100

Result: Only purchases over $100 count. This rewards high-value customers, not just frequent shoppers.


Pattern 3: Platform-Specific

Badge: "Mobile Master"
Condition:
Action: "login"
Challenge: Several Times (50 logins)
Filter: platform = "mobile"

Badge: "Desktop Devotee"
Condition:
Action: "login"
Challenge: Several Times (50 logins)
Filter: platform = "desktop"

Result: Separate achievements for mobile vs desktop users, encouraging cross-platform adoption.


Pattern 4: Exclude Unwanted Actions

Badge: "Loyal Customer"
Condition:
Action: "purchase"
Challenge: Sum (amount = 1000)
Filter: category is not "refund"

Result: Refunds don't count toward the badge. Protects against gaming the system.


Pattern 5: Quality Content

Badge: "Quality Contributor"
Condition:
Action: "create_post"
Challenge: Several Times (20 posts)
Filter 1: word_count >= 300
Filter 2: has_code = true

Result: Only long-form posts with code examples count. Encourages high-quality contributions.

Combining Multiple Filters

You can apply multiple Filters to a single Condition. All Filters must pass for the Action to count (AND logic).

Example 1: High-Value Mobile Purchases

Badge: "Mobile VIP"
Condition:
Action: "purchase"
Challenge: Sum (amount = 5000)
Filter 1: platform = "mobile"
Filter 2: amount > 50
Filter 3: category is not "refund"

What this means:

  • Must be mobile purchase ✅
  • Must be over $50 ✅
  • Cannot be a refund ✅

Only purchases meeting ALL three criteria count toward the $5000 total.


Example 2: Premium Content Creation

Badge: "Tech Blogger Pro"
Condition:
Action: "create_post"
Challenge: Several Times (50 posts)
Filter 1: category = "technology"
Filter 2: word_count >= 500
Filter 3: has_images = true

What this means: Only technology posts with 500+ words and images count.

Filter Examples by Industry

E-commerce: Category Mastery

Goal: Encourage shopping across different categories

Badge: "Fashion Expert"
Filter: category = "clothing" OR category = "accessories"
Challenge: Several Times (10 purchases)

Badge: "Tech Guru"
Filter: category = "electronics" OR category = "computers"
Challenge: Several Times (10 purchases)

Badge: "Home Decorator"
Filter: category = "furniture" OR category = "decor"
Challenge: Several Times (10 purchases)

Business Impact: Users explore more product categories, increasing average cart value and discovery.


Fitness App: Workout Type Specialization

Goal: Reward users who specialize in specific workout types

Badge: "Cardio King"
Action: "complete_workout"
Filter: workout_type = "cardio"
Challenge: Several Times (100 workouts)

Badge: "Strength Champion"
Action: "complete_workout"
Filter: workout_type = "strength"
Challenge: Several Times (100 workouts)

Badge: "Yoga Master"
Action: "complete_workout"
Filter: workout_type = "yoga"
Challenge: Several Times (100 workouts)

Business Impact: Users develop workout habits in their preferred discipline, improving retention.


Betting Platform: Event-Specific Leaderboards

Goal: Create separate competitions for different sports

Leaderboard: "Football Champions"
Action: "place_bet"
Filter: event_type = "football"

Leaderboard: "Basketball Heroes"
Action: "place_bet"
Filter: event_type = "basketball"

Business Impact: Users can compete in their favorite sport category, increasing engagement.


Community Platform: Quality Content Rewards

Goal: Reward high-quality, helpful content

Badge: "Helpful Expert"
Action: "marked_helpful"
Filter 1: content_type = "answer"
Filter 2: word_count > 100
Challenge: Several Times (50 helpful marks)

Business Impact: Encourages detailed, helpful answers instead of short, low-effort responses.

Filter Design Best Practices

1. Be Specific but Achievable

# ✅ Good: Specific but fair
Filter 1: amount > 50
Filter 2: category is not "refund"

# ❌ Bad: Too restrictive
Filter 1: amount > 500
Filter 2: category = "luxury-electronics"
Filter 3: payment_method = "gold_card"
Filter 4: is_premium_member = true

2. Exclude System/Test Actions

# ✅ Good: Exclude test data
Filter 1: is_test = false
Filter 2: category is not "refund"
Filter 3: user_type is not "admin"

# ❌ Bad: No filtering, test data pollutes badges
No filters

3. Use Positive Filters When Possible

# ✅ Good: Clear positive filter
Filter: category = "electronics"

# ⚠️ OK but less clear: Negative filter
Filter: category is not "clothing" AND category is not "food"

4. Match Filters to Business Goals

# E-commerce: High-value behavior
Filter: amount > 100

# Fitness: Sustained effort
Filter: duration_minutes >= 30

# Community: Quality content
Filter: word_count >= 300

Filters vs Challenges

It's important to understand the distinction:

ConceptPurposeExample
FilterWhich actions qualify"Only purchases > $50"
ChallengeHow many/much is required"10 times" or "$1000 total"

Together:

Condition: "VIP Customer"
Action: "purchase"
Filter: amount > 50 ← Which actions count
Challenge: Several Times (20) ← How many needed

Translation: "Complete 20 purchases that are each over $50."

Dynamic Filtering Based on Action Objects

Filters work on Action Objects (the details array in your Actions). The richer your Action Objects, the more powerful your Filters can be.

Action sent:

{
"name": "create_post",
"referenceId": "post-123",
"playerId": "user-alex",
"details": [
{
"category": "web-development",
"word_count": 450,
"has_code": true,
"tags": ["react", "performance"],
"difficulty": "intermediate"
}
]
}

Filters you can create:

  • category = "web-development"
  • word_count >= 300
  • has_code = true
  • difficulty = "intermediate"
Pro Tip

Send rich Action Objects to unlock powerful filtering capabilities. Every field you include is a potential Filter!

Filters in Leaderboards

Filters are especially powerful in Leaderboards, allowing you to create category-specific competitions:

Leaderboard: "Premium Spenders"
Action: "purchase"
Filter: amount > 100
→ Ranks users by high-value purchases only

Leaderboard: "Mobile Users"
Action: "login"
Filter: platform = "mobile"
→ Ranks most active mobile users

Leaderboard: "Weekend Warriors"
Action: "place_bet"
Filter: day_of_week = "Saturday" OR day_of_week = "Sunday"
→ Ranks weekend betting activity

Next Steps