The Earning Rules menu in Headless Loyalty allows you to configure the main logic and rules of the loyalty program, such as how points are earned, transaction requirements, and ongoing promotion schemes.
A. Overview of the Rules Policy Page
| No. | Feature Name | Description |
|---|---|---|
| 1 | Create Rule | Button for adding a new rule. |
| 2 | Rule Name | Column displaying the rule name. |
| 3 | Status | Column displaying the rule status. |
| 4 | Last Updated | Column displaying the date when the data was last modified. |
| 5 | Actions | Icon for deleting a rule. |
| 6 | Row per page | Determines the number of data rows displayed on one page (for example, 10, 20, 50, or 100 records), allowing you to adjust the display for more convenient data list monitoring. |
B. How to Add a New Rule
Sign in to your Mekari Officeless account. Then select the “Configurations” menu.
Select the “Earning Rules” submenu.
You will be directed to the Rules Policy page. On this page, click “Create data”.
-
Complete each available field. The following is an explanation of each section and form field.
Rules Configuration
| No. | Feature Name | Description |
|---|---|---|
| 1 | Rule Name | Field for assigning a name to the loyalty rule. The name must use uppercase letters, numbers, or an underscore. If you enter spaces, the system will automatically convert them to underscores. |
| 2 | Triggering Activity |
Field for determining the customer's main activity that will trigger this rule. This data is displayed based on the data in the ‘Configuration - Rule Trigger’ menu. |
| 3 | Activate Rule | Toggle button for activating or deactivating the created rule. If active, the system will begin processing the rule based on the configuration in real time. |
Metadata Configuration
| No. | Feature Name | Description |
|---|---|---|
| 1 | Preview API Body |
Button for accessing the configured data structure draft (JSON), to ensure that the data format is correct before it is implemented in the API. |
| 2 | Config Metadata to Variable |
Feature for mapping the created metadata to system variables so that the data can be used in loyalty rule calculations. |
| 3 | Add Property | Button for adding a new metadata attribute row if you want to include more data parameters in one configuration. |
| 4 | Property Name | Field for specifying the name of the custom data attribute to use from the API (for example: items, event, or location). |
| 5 | Data Type |
Option for specifying the data format of the property, such as String (text), Number, or another format so that the system can process the data correctly. If the selected data type is Array Of Object, the system will display the Aggregations field. This is used to process or simplify a collection of numeric data (array).
|
| 6 | Button used to delete an added property. |
Conditions
| No. | Feature Name | Description |
|---|---|---|
| 1 | Logic Operator (AND/OR) |
Button for determining the relationship between conditions:
|
| 2 | Condition | Button used to add a new condition criteria row. |
| 3 | Group | Button used to create a more complex logical grouping (subcondition). |
| 4 | Variable |
Button for selecting the parameter or data to be processed. |
| 5 | Operator |
Comparison symbol for determining the variable to compare with a particular value. |
| 6 | Value | Field for entering the reference value that serves as the comparison target in a condition. |
| 7 | Show Preview |
Button for previewing a summary of the logic that has been created in an easy-to-read sentence and JSON format, to ensure that the criteria are correct before saving.
|
Rules Action
| No. | Feature Name | Description |
|---|---|---|
| 1 | Add Rules Action | Button for adding a new rule that the system will run when the requirements (conditions) have been met. |
| 2 | Action Key | Field for specifying the type of action to be provided, such as points, bonuses, or other loyalty attributes. |
| 3 | Currency | Selection menu for specifying the type of currency or point unit used in the action. |
| 4 | Value Formula |
Feature for creating a dynamic reward value calculation formula by combining Variable, Operator, and Number.
Button for entering dynamic data from the system or transaction as the basis for the calculation.
Button for adding a mathematical symbol.
Button for entering a fixed (static) numeric value into the formula. |
When all the data has been entered, click “Create Rule”.
The system displays a pop-up indicating that the rule was successfully added.
The created rule will then be displayed in the following Rules Policy table.
How to Edit, Delete, and Deactivate Rule Data
To edit a rule, click one of the added rule records.
-
You will then be directed to the Edit Rule section. Edit the data on the following page. Make sure the entered data is correct. There are 4 (four) sections that can be edited:
Rules Configuration
| No. | Feature Name | Description |
| 1 | Rule Name | Field for assigning a name to the loyalty rule. The name must use uppercase letters, numbers, or an underscore. If you enter spaces, the system will automatically convert them to underscores. |
| 2 | Triggering Activity |
Field for determining the customer's main activity that will trigger this rule. This data is displayed based on the data in the ‘Configuration - Rule Trigger’ menu. |
| 3 | Activate Rule | Toggle button for activating or deactivating the created rule. If active, the system will begin processing the rule based on the configuration in real time. |
Metadata Configuration
| No. | Feature Name | Description |
|---|---|---|
| 1 | Preview API Body |
Button for accessing the configured data structure draft (JSON), to ensure that the data format is correct before it is implemented in the API. |
| 2 | Config Metadata to Variable |
Feature for mapping the created metadata to system variables so that the data can be used in loyalty rule calculations. |
| 3 | Add Property | Button for adding a new metadata attribute row if you want to include more data parameters in one configuration. |
| 4 | Property Name | Field for specifying the name of the custom data attribute to use from the API (for example: items, event, or location). |
| 5 | Data Type |
Option for specifying the data format of the property, such as String (text), Number, or another format so that the system can process the data correctly. |
| 6 | Button used to delete an added property. |
Conditions
| No. | Feature Name | Description |
|---|---|---|
| 1 | Logic Operator (AND/OR) |
Button for determining the relationship between conditions:
|
| 2 | Condition | Button used to add a new condition criteria row. |
| 3 | Group | Button used to create a more complex logical grouping (subcondition). |
| 4 | Variable |
Button for selecting the parameter or data to be checked (for example: SKU, transaction total, or time). |
| 5 | Operator |
Comparison symbol for determining the variable to compare with a particular value. |
| 6 | Value | Field for entering the reference value that serves as the comparison target in a condition. |
| 7 | Show Preview |
Button for previewing a summary of the logic that has been created in an easy-to-read sentence and JSON format, to ensure that the criteria are correct before saving.
|
Rules Action
| No. | Feature Name | Description |
|---|---|---|
| 1 | Add Rules Action | Button for adding a new rule that the system will run when the requirements (conditions) have been met. |
| 2 | Action Key | Field for specifying the type of action to be provided, such as points, bonuses, or other loyalty attributes. |
| 3 | Currency | Selection menu for specifying the type of currency or point unit used in the action. |
| 4 | Value Formula |
Feature for creating a dynamic reward value calculation formula by combining Variable, Operator, and Number.
Button for entering dynamic data from the system or transaction as the basis for the calculation.
Button for adding a mathematical symbol.
Button for entering a fixed (static) numeric value into the formula. |
When all the data has been entered correctly, click “Update Rule”.
The system will display the following notification pop-up, indicating that the changes were successfully saved.
To delete the rule data, click the ‘
’ icon on one of the added rule records.
The system will display a data deletion confirmation pop-up.
The system will display the following notification pop-up, indicating that the data was successfully deleted. Click the “OK” button to close the pop-up.
To deactivate the rule data, click one of the added rule records with the Active status.
You will then be directed to the Edit Rule section. In the “Rule Configuration” section, click the “Activate Rule” toggle.
Then click the “Update Rule” button to save the changes.
The system will display the following notification pop-up, indicating that the changes were successfully saved.
The deactivated rule will then be displayed in the Rules Policy table with the Inactive status.