The Rules Engine

Create a rule

The rules engine is where you define what happens when a user triggers a rule. What is needed to create a rule are actions, which can be created in the action menu. Optional components to create a rule are custom points and badges, which we will cover further in this article. The action is a point in trigger when a player has come across it. A simple rule can be created just like below:

New Rule

Let’s see how to create a rule:

1. Click on the New Rule button located on the top right hand side

Rule title

2. Insert the title of this rule, description of the rule, word tags and the status to enable this rule. The title, description, tags is just for our reference in the dashboard.

Add Action

3. Next click on the Add Action and choose an action from the list of action that is suitable for this rule. If you do not see any actions or actions that you would like to include, you can create a new action from the action page and it will appear in this list.

Filter string

4. Once an action has been selected, a module action will appear right underneath the title and description. You will have an option to insert a URL or filter string. This option can enable us to distinguish from other rules having the same action.


5. Adding conditions to the rule can create challenges and avoid players from cheating. For example you would like to have an action that can be done once an hour. You can do this by clicking on the dark button ‘+ Add: condition & reward’ button right underneath the action module and a drop down list appears. Click on the condition and a window will appear with a list of conditions that you can choose from. In this short tutorial we will be using the cool down condition which will let users to do this rule once every n number of seconds / minutes / hours / days or forever.


6. Finally giving rewards to the player once they have satisfied all the conditions. Click on the dark color button underneath the condition module ‘+ Add: condition & reward’. Again a drop down menu appears. Click on the reward and a pop up list of rewards will appear for you to choose from. Notice in the figure below you are likely to have only 3 standard rewards but in this example there is a reward ‘coin’ which is a custom point. These custom points can be easily created in the custom point menu which we will cover as you read on. But for now let’s choose point as a reward for the player.

Reward quantity

7. Make sure to set the quantity of the reward that will be given to the player in the quantity field.

Save rule

8. As this is done click save and the new rule will be included into the list of rules, which it will be ready to be used via the Playbasis API.


9. Further reading on for rewarding players with badges. To reward players with badges you need to create badges in the badge menu which creating badges will be covered in the Badges menu section. When choosing a badge as a reward, a window will pop up with a list of badges that was created by you.

Save rule

References for conditions:

• After – Player is able to complete the rule after a particular date and time.
• Before – Player is able to complete the rule before a particular date and time.
• Between – Player is able to complete the rule between a period of date and time.
• Cooldown – Player is able to complete the rule after a period of time.
• Count – Player must complete this action for a certain number of time in order to complete the rule.
• Daily – Player can complete this rule once a day.
• Every N Days – Player can complete this rule once every N days. – Depending on your N number of days.
• Monthly – Player can complete this rule once a month.
• Weekly – Player can complete this rule once a week.