
The Contest Rules is where you define the conditions for awarding points, as well as the Contest Start and End.
An example of the Rules system in CompetitionLabs is shown.
RULES fields
EXAMPLES
» Points calculation Model
Mandatory
Points calculation can be replaced with Custom points, as a Ruleset that lets you create more complex competitions. You can add, subtract or multiply points, or use your own adjustment factor. |
» Start the contests Model
Mandatory
A contest start is pre-selected when its parent contests are finalised. All the prior contests need to be finalised before the new one starts. |
» Finish the contests Model
Mandatory
A contest will finish when it has been active for exactly, or more than the time set for it, or at the Competition end time. |
» Finalise the contests Model
Mandatory
The contest will finalise according to the configured setting “the contests finished is equal or more than X”, which is typically set to complete within 1 minute. |
APP Example:
Points calculation | ![]() |
Start the contests | ![]() |
Finish the contests | ![]() |
Finalise the contests | ![]() |
API Example:
{"jsonClass": "Contest", ... "ruleSets": [ { "jsonClass": "RuleSet", "priority": 1, "scope": "contest", "action": "open.contest", "conditions": [ { "jsonClass": "MainConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "rules": [ { "jsonClass": "MainRule", "fact": "contest.parents.status", "operator": "==", "constant": "$finalised.status" }] }] }, { "jsonClass": "RuleSet", "priority": 2, "scope": "contest", "action": "finish.contest", "conditions": [ { "jsonClass": "MainConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "rules": [ { "jsonClass": "MainRule", "fact": "contest.active.elapsed", "operator": ">=", "constant": "$competitions.scheduled.end" }] }] }, { "jsonClass": "RuleSet", "priority": 3, "scope": "contest", "action": "finalise.contest", "conditions": [ { "jsonClass": "MainConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "rules": [ { "jsonClass": "MainRule", "fact": "contest.finish.elapsed", "operator": ">=", "constant": "1" }] }] },{ "jsonClass": "RuleSet", "priority": 4, "scope": "contest", "action": "contests.points.calculated.custom", "conditions": [ { "jsonClass": "MainConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "rules": [ { "jsonClass": "MainRule", "fact": "event.count", "operator": ">=", "constant": "1", "subConditions": [ { "jsonClass": "SubConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "subRules": [ { "jsonClass": "SubRule", "fact": "event.action.type", "operator": "==", "constant": "bet" }] }] }] }], "onMatchThen": "add", "onMatchConstant": "1" }, { "jsonClass": "RuleSet", "priority": 5, "scope": "contest", "action": "contests.points.calculated.custom", "conditions": [ { "jsonClass": "MainConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "rules": [ { "jsonClass": "MainRule", "fact": "event.count", "operator": ">=", "constant": "1", "subConditions": [ { "jsonClass": "SubConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "subRules": [ { "jsonClass": "SubRule", "fact": "event.action.type", "operator": "==", "constant": "win" }] }] }] } ], "onMatchThen": "add", "onMatchConstant": "3" } ], ... }