skip to Main Content

The Achievement rules are where you define the fulfillment conditions of an Achievement. An example of the rule system of CompetitionLabs is shown.



In the screen shot shown below a rule set is shown. A rule set contains:

  1. Main rule
  2. Sub rule

Depending on the rule, rules can have sub rules. Sub rules are optional.

Each rule consists of the following 3 things:

  1. fact
  2. operator
  3. constant

Each rule has properties – one of the properties is conditional match of All or Any. And evaluation criteria of True or False.

All or Any match condition describes how rules interact – If the conditional match is set to All then all rules must evaluate, if its set to Any then only 1 rule has to evaluate. The first that matches all conditions will be triggered. This works on the principle of And or Or. By clicking And Condition, you add conditions with an AND that extend the rule.

A more detailed rules explanation can be found in Competitions and Contests -> Rules guide or you can navigate directly to our rules guide here

Example: Achievements event count fact has sub rules. A sub rule has the exact same properties as rules – it contains conditional matching, evaluation criteria and rules. The only exception – sub rules cannot have other sub rules.

API Rules Example:

"ruleSets": [
        "jsonClass": "RuleSet",
        "priority": 1,
        "scope": "achievement",
        "action": "member.achievement",
        "conditions": [
                "jsonClass": "MainConditionSet",
                "matchCondition": "All",
                "mustEvaluateTo": true,
                "rules": [
                        "jsonClass": "MainRule",
                        "fact": "event.count",
                        "operator": ">=",
                        "constant": "5",
                        "subConditions": [
                                "jsonClass": "SubConditionSet",
                                "matchCondition": "All",
                                "mustEvaluateTo": true,
                                "subRules": [
                                        "jsonClass": "SubRule",
                                        "fact": "event.action.type",
                                        "operator": "==",
                                        "constant": "bet"

The API example provides only a simplified version of the POST Rules body. A full example of POST Achievement can be found in the Achievements Rules APP API documentation here.

Rules section action icon buttons

You can use the icons provided:

  • Remove removes the rule and any sub conditions.
  • – Add lets you add an additional sub rule or main rule in parallel to the one you are creating.
  • – Edit lets you edit text or numerical values.
  •   – Remove rule set Icon removes all the rules in the rule set.

PREVIOUS – Click Previous and go back to the previous step.

CONTINUE – Click Next to proceed to the next step.

Back To Top