Campaigns
In this section, you will get to know everything related to Campaigns.
Campaigns work based on triggers, conditions, and Rewards. After the trigger occurs, conditions are checked based on trigger attributes, and a Reward is given. This functionality allows you to Reward the customer if they meet the conditions set out in the campaign.
For example, all customers whose name is John and who made a $20 purchase will receive 15 Units.
- Redemption Code Campaign

To add a new Campaign, log in to the app as an Administrator, and click on the Campaign tab on the left side menu, a list will expand with 3 options:
- List of Campaigns
- Add new Campaign
- Simulate Campaign
There are 2 options you can either click directly on the "Add new Campaign" button and find yourself on the "Add Campaign" screen or click on the "List of Campaigns", here you will land on the table with already created Campaigns and above it, in the right side the purple button "Add Campaign" is present.

After accessing the "Add Campaign" screen you need to fill in the required information to create the Campaign suiting you best.
First, you need to choose which Campaign you are willing to create. There are three options available:
These two types decide on which triggers and conditions will be based on your Campaign.

You can add more than one rule with different conditions and effects by clicking on the purple button "Add rule".
Please note that if you add e.g. 1 rule with 2 different conditions, both conditions must be met in order to reward a Member. But if you create two rules, only one of them must be fulfilled, because they are considered separately as each rule has its own effect.
If you would like to remove the previously added condition just click on the "x" button on the right-hand side.
After you have picked all of the necessary parameters just click on the "Add Campaign" button, a cordial celebration of your successful launch will appear and you will land on the Campaigns screen, where you can find your freshly created Campaign.
If you chose the "Custom Event", note that the "Event name" dropdown list will be empty if there weren't any "Custom Event schemas" created before.
Therefore if you want to be able to use this trigger, please first create a 'Custom Event schema' that you would like to base your Campaign on. Then, if you click on the "Event name", a list with created options will appear along with a condition that you have created in "Custom Event schemas".
It will be displayed on the conditions list during creating the "Custom Event" - based Campaign.
Campaign attributes can store various types of data in a key:value format. We can use these data to filter campaigns in the Admin Panel, via the API or use this data in external applications for management and filtering.
e.g. Display to a member a campaign that is available only to new members
Please note that if you would prepare the Campaign and would like to change it's trigger after putting all data, the form will be cleared from already put information.
When you choose this type of Campaign, in the next step you need to select the trigger on which you want to base your Campaign.
- Transaction - the Campaign is triggered by a Transaction
- Custom Event - the Campaign is triggered by a Custom Event
- Internal Events - the Campaign is triggered by actions that take place in the system
- Achievement - The Campaign is triggered by the completion of the Achievement
- 1.Fields you need to fill in, in the "Transaction" based case:
- Campaign name
- Short description - optional information about the Campaign
- + Translation - translation of name and the description of Campaign
- Start date - mandatory date of the start of Campaign
- End date - optional but if put, please note it must be after the start date
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Active - if you will not mark this checkbox your Campaign will not be active
- Rules
- Condition - this condition will trigger your Campaign. For example, each Member whose name is Jack and who made a $100 purchase(conditions) will receive 20 Units.
- Effect - you will need to click on the purple button, the list with two options will appear
- "Deduct Units" - select formulas to add, divide, multiply, and subtract your values and deduct units based on the calculation
- "Give Units" - select formulas to add, divide, multiply, and subtract your values and add units based on the calculation
- "Give Reward" - select the Reward that the Member who fulfills the conditions will receive
- 2.Fields you need to fill in, in the "Internal Event" based case:
- Event name - choose the Action on which the Campaign will be based
- Campaign name
- Short Description - optional information about the Campaign
- + Translation - translation of name and the description of Campaign
- Start date - mandatory date of the start of Campaign
- End date - optional but if put, please note it must be after the start date
- Active - if you will not mark this checkbox your Campaign will not be active
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Rules
- Condition - here you must pick conditions type from the list and add its condition and value. It will trigger your Campaign.
- Effect - click on the purple button, and the list with two options will appear
- "Deduct Units" - select formulas to add, divide, multiply, and subtract your values and deduct units based on the calculation
- "Give Units" - select formulas to add, divide, multiply, and subtract your values and add units based on the calculation
- "Give Reward" - select the Reward that the Member who fulfills the conditions will receive
- 3.Fields you need to fill in, in the "Custom Event" based case:
- Event name - choose the Event Schema on which the Campaign will be based
- Campaign name
- Short Description - optional
- + Translation - translation of name and the description of Campaign
- Start date - mandatory date of the start of Campaign
- End date - optional but if put, please note it must be after the start date
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Active - if you will not mark this checkbox your Campaign will not be active
- Rules
- Condition - here you must pick a conditions type from the list and add its condition and value. It will trigger your Campaign.
- Effect - click on the purple button, and the list with two options will appear
- "Deduct Units" - select formulas to add, divide, multiply, and subtract your values and deduct units based on the calculation
- "Give Units" - select formulas to add, divide, multiply, and subtract your values and add units based on the calculation
- "Give Reward" - select the Reward that the Member who fulfills the conditions will receive
If you have chosen this type of Campaign, the next thing you can do is choose the trigger on which your Campaign will be based.
- Transaction - the Campaign is triggered by a Transaction
- Custom Event - the Campaign is triggered by a Custom Event
- Internal Events - the campaign is triggered by actions that take place in the system
- 1.Fields you need to fill in, in the "Transaction" based case:
- Campaign name
- Short Description - optional information about the Campaign
- + Translation - translation of name and the description of Campaign
- Start date - mandatory date of the start of Campaign
- End date - optional but if put, please note it must be after the start date
- Active - if you will not mark this checkbox your Campaign will not be active
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Rules
- Condition - this condition will trigger your Campaign. For example, each member whose name is Jack and who made a $100 purchase(conditions) will receive 20 Units.
- Effect - you will need to click on the purple button, the list with two options will appear
- "Deduct Units" - select formulas to add, divide, multiply, and subtract your values and deduct units based on the calculation
- "Give Units" - select formulas to add, divide, multiply, and subtract your values and add units based on the calculation
- "Give Reward" - select the Reward that the Member who fulfills the conditions will receive
- 2.Fields you need to fill in, in the "Internal Event" based case:
- Event type - choose the Action on which the Campaign will be based (such as 'Member was activated')
- Campaign name
- Short Description - optional information about the Campaign
- + Translation - translation of name and the description of Campaign
- Start date - mandatory date of the start of Campaign
- End date - optional but if put, please note it must be after the start date
- Active - if you will not mark this checkbox your campaign will not be active
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Rules
- Condition - here you must pick conditions type from the list and add its condition and value. It will trigger your Campaign.
- Effect - click on the purple button, and the list with two options will appear
- Give Units - select formulas to add, divide, multiply, and subtract entered values
- Give Reward - select the Reward that the Member who fulfills the conditions will receive
- 3.Fields you need to fill in, in the "Custom Event" based case:
- Event name - choose the Event Schema on which the Campaign will be based
- Campaign name
- Short Description - optional information about the Campaign
- + Translation - translation of name and the description of Campaign
- Start date - mandatory date of the start of Campaign
- End date - optional but if put, please note it must be after the start date
- Active - if you will not mark this checkbox your Campaign will not be active
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Rules
- Condition - here you must pick a conditions type from the list and add its condition and value. It will trigger your Campaign.
- Effect - click on the purple button, and the list with two options will appear
- Give Units - select formulas to add, divide, multiply, and subtract entered values
- Give Reward - select the Reward that the Member who fulfills the conditions will receive
Referee - Person invited to the program
Referrer - Member sending the invitation
The 'Rules' section is divided into the 'Rules for Referrer' and 'Rules for Referee' sub-sections. There, you can create conditions you would like to apply respectively for Referrer, for Referee, or for both, and reward them accordingly.
Please note that rules are considered separately, which means that if you e.g. create a Campaign with rules for Referrer and Referee but only one of them will meet the conditions, only this Member will be rewarded.
Multi-level referral feature allows users to set up referral campaigns with multiple levels of referrals. This means that users can reward not only the person who makes the referral, but also the person who was referred by the original referrer, and so on. It allows users to reach a wider audience by incentivizing not just the original referrer, but also subsequent referrers. This can lead to increased sales and customer engagement. Additionally, users can customize the rewards for each level of referral, which can help to motivate referrers to refer more people.
To configure Multi-level Campaign follow the steps below:
- 1.Set the campaign type to the Referral campaign
- 2.Select Multi-level campaign
- 3.Select Referral max levels to the desired level, for example - 2
- 4.Set the campaign trigger to a desired event - Transaction, Internal event, Custom event, Achievement
- 5.If you selected Internal event, Select event type for example - Member was activated
- 6.Configure rules for the referrer and a referee
- 7.Add conditions - to target specific levels choose - "Current referral level for multi-level campaign" for example,
- 1.Rule 1 "Current referral level for multi-level campaign" is equal: 1
- 2.Add Effect - action type - Add units - 100
- 3.Rule 2 "Current referral level for multi-level campaign" is equal: 2
- 4.Add Effect - action type - Add units - 50
This way original referrer will get 100 units each time their' referee will invite someone to the program.
This Campaign type is based on the date of birth of an existing Member in the system. If you want to reward Members on their birthday, you should use this Campaign. Each day at 00:00 Members who celebrate their birthday will receive the reward that is specified in the Campaign.
This means if a member's account is created on his birthday, the member will not be rewarded in the campaign, since the rewards are given only at 00:00 AM.
You can create a birthday campaign that includes members registered at their birthday using expressions.
Fields you need to fill:
- Campaign name
- Short Description - optional information about the Campaign
- + Translation - here you can add implemented already a translation
- Start date - translation of name and the description of Campaign
- End date - optional but if put, please note it must be after the start date
- Active - if you will not mark this checkbox your Campaign will not be active
- Campaign attributes - optional attributes of the campaign used for additional data or filtering
- Rules
- Condition - here you must pick a conditions type from the list and add its condition and value. It will trigger your Campaign.
- Effect - click on the button, and the list with two options will appear
- Give Units - select formulas to add, divide, multiply, and subtract entered values
- Give Reward - select the Reward that the Member who fulfils the conditions will receive

Redemption Code Campaign - allows you to create a campaign based on codes for later use by members in the form of a bar code, QR code, or code to be entered in the app or on the website.

In order to create a Redemption code campaign follow the steps below:
- 1.Create a new custom event schema with a text type attribute.
- 2.Head to Add Campaign
- 3.Select desired Campaign type
- 4.Select the Redemption code in the Campaign trigger section.
- 5.Define the Event name and Attribute event name (that you created before).
- 6.Define code details:
- 1.Number of generated codes - How many codes can be generated(You can always generate more once the campaign is active)
- 2.Redemption code length - Lenght of the single code
- 3.Redemption code prefix - Set of characters uniform for each code
- 4.Redemption code character set - Alpha, Alphanumeric, Numeric
- 7.Add campaign name, attributes(optional), and campaign status
- 8.Add Rules(Conditions and Effects) - Effects are mandatory for codes to operate correctly. In Add units you can use Open Loyalty Language to define the reward based on the custom event attribute or different variables
To see the codes go to the list of campaigns click on the three dots on the right and select "Show codes"

The statuses will change dynamically each time the code is used.
In order to provide users with more flexibility in performing Campaign actions, it is possible to use a member's Custom Attributes as a condition in the Campaign. Depending on the value provided in the Custom Attributes we can also perform various operations on the stored data
Supported types of data::
- datetime, e.g. “2022-12-20T14:15:22+01:00”
- number, e.g. “10.2”
- string, e.g. “featured”
We can use it in the following scenarios:
- In order to retrieve the given Custom Attribute, use: e.g. agg(customer.labels).getFirstLabelValue('post_date') In this example, the function will return a value of the key “post_date”.
- In order to parse the custom attribute to date, use function to_date e.g. to_date(agg(customer.labels).getFirstLabelValue('post_date'))
- In order to compare dates, use timestamp(), e.g. timestamp(to_date(agg(customer.labels).getFirstLabelValue('post_date')))
- To compare numerical values, you don’t have to use any functions. Remember to use dot separator “.”, e.g. agg(customer.labels).getFirstLabelValue('posts_number') > 10
- Give Effect for a transaction within 5 days of a given date: (timestamp(transaction.purchasedAt) - timestamp(to_date(agg(customer.labels).getFirstLabelValue('post_date')))) <= 432000 In order to limit the granting of effects to this condition only, another condition should be added agg(customer.labels).getFirstLabelValue('post_date) != null
It is possible to create a campaign based on the progression of an achievement, rather than its execution. By using this functionality, we are able to reward our users for making progress within an activity, or create an advanced cashback threshold mechanism added to Campaigns Effect.
It is possible to use achievement-related properties in the following Campaigns:
- periodGoal - goal yet to be achieved
- currentPeriodValue - current progress value
- consecutivePeriods - applicable only for consecutive Achievements: periods yet to be achieved
- completedConsecutivePeriods - current achieved periods
- progressChanges - the difference between current periodGoal and previous periodGoal
e.g.
To understand this function, we can use the following example:
If you want to give a member a reward that is calculated based on a percentage of the value of their transaction, but the amount of the percentage/ratio depends on the amount of the transaction total:
in the range of: 0 - 5000 → 1%
in the range of: 5000 - 7500 → 1.2%
in the range of: 7500 - 10000 → 1.5%
in the range of: 10000 - Inf → 0%
1) Create an Achievement - this is needed to calculate the total value of orders in a member's account
- over: 1 month - progress will be calculated in the span of one month
- goal: 10000000 - a distant goal used to store the value of the calculation
- formula: transaction.grossValue - We want to keep track of the Gross Value of the transactions
- occurrence: consecutive month - Prograss will be calculated monthly
- Achievement counting: Sum of the event attributes - we will calculate attributes of the transaction
- Direct / transaction - Achievement will be based on the transaction
2) Create a Campaign
- direct campaign
- internal event: Achievement progressed
- conditions:
- expression: event.body.achievementId == '<ACHIEVEMENT_ID>'
- effect give units percent_value_distribution(event.body.progressChanges[0], [5000, 7500, 10000], [0.01, 0.012, 0.015, 0], event.body.progressStatuses[0].currentPeriodValue - event.body.progressChanges[0])
3) After making a transaction, achievement will track members’ progress and issue units based on the following formula: a monthly spend of up to $10K members get: $5K x 1% Cashback + next $2.5K x 1.2% + next $2.5K x 1.5%
It is possible to create a campaign that allows you to make point deductions. This can be especially practical in programs based on transactional campaigns - for example, when customer returns bought products.
Creating a return campaign
Create a transactional campaign with the same data as in the original campaign, but from the drop-down list in the campaign effects, we select deduct points.
For example:
Original campaign:

Return campaign:

Notice that the custom attribute [Return:True] is added to the return campaign to make filtering easier.
Then if you want to return the original transaction all you have to do is to issue a copy of the original transaction with the custom attribute Return:True. Since all the calculation formula is the same and only different is effect set to deduct, the correct amount of units will be deducted from members' accounts.
Creating campaign effects that deduct the points if the transaction has certain custom attributes will be especially helpful for transactions that trigger multiple campaigns. If the transaction triggers 4 campaigns and gives the user X points, and you want to deduct the points in case of a return, deduct points effect, will happen automatically.
The percentage distribution is an Effect function that allows you to create ranges on the units that can be granted to members.
percent_value_distribution(event.body.progressChanges[0], [array thresholds], [array thresholdPercentValues], event.body.progressStatuses[0].currentPeriodValue - event.body.progressChanges[0])
- percent_value_distribution - Function
- event.body.progressChanges[0] - Value of the current order
- [array thresholds] - Thresholds on the basis of which values will be calculated
- [array thresholdPercentValues] - The values that will be used for the calculation. In the order corresponding to thresholds
- event.body.progressStatuses[0].currentPeriodValue - event.body.progressChanges[0] - Current progress value without current order
To understand this function, we can use the following example: If you want to give a member a reward that is calculated based on a percentage of the value of their transaction, but the amount of the percentage/ratio depends on the amount of the transaction total:
in the range of: 0 - 5000 → 1%
in the range of: 5000 - 7500 → 1.2%
in the range of: 7500 - 10000 → 1.5%
in the range of: 10000 - Inf → 0%
you should use the following expression:
percent_value_distribution(event.body.progressChanges[0], [5000, 7500, 10000], [0.01, 0.012, 0.015, 0], event.body.progressStatuses[0].currentPeriodValue - event.body.progressChanges[0])
1) Create an Achievement - this is needed to calculate the total value of orders in a member's account
- over: 1 month - progress will be calculated in the span of one month
- goal: 10000000 - a distant goal used to store the value of the calculation
- formula: transaction.grossValue - We want to keep track of the Gross Value of the transactions
- occurrence: consecutive month - Prograss will be calculated monthly
- Achievement counting: Sum of the event attributes - we will calculate attributes of the transaction
- Direct / transaction - Achievement will be based on the transaction
2) Create a Campaign
- direct campaign
- internal event: Achievement progressed
- conditions:
- expression: event.body.achievementId == '<ACHIEVEMENT_ID>'
- effect give units percent_value_distribution(event.body.progressChanges[0], [5000, 7500, 10000], [0.01, 0.012, 0.015, 0], event.body.progressStatuses[0].currentPeriodValue - event.body.progressChanges[0])
3) After making a transaction, achievement will track members’ progress and issue units based on the following formula: a monthly spend of up to $10K members get: $5K x 1% Cashback + next $2.5K x 1.2% + next $2.5K x 1.5%
To see all created Campaigns you need to click on "List of Campaigns". Here, on the "Campaigns" screen, you will have them all presented in the table. You can filter out searched records, you can edit them, and create a new one.

Below you will find described operations that you can perform on Campaigns.
As mentioned above you can see all created Campaigns displayed in the table, data which are presented here:
- Order
- Name
- Campaign type
- Active
- Active from
- Active to
- Created at
There is a possibility to sort records by clicking on the column header for Name, Active, Active from, and Active to - when hovering over the header you may notice that the mouse cursor change to the hand, and arrows appears.
By changing the number in the Order section you are able to change the display order of Campaigns to sort them according to your preference.
Changing the order in which campaigns are displayed does not change the order in which they are executed.
There is also a possibility of filtering records by clicking on the "+Add filter" button and applying the picked condition. After that only records which will meet the required condition should be present. Also, statistics of how many records are created and how many of them meet the condition's criteria, are presented. Available conditions you can pick to filter out your results:
- Active
- Active from
- Active to
- Campaign ID
- Name
- Type

After applying the picked filter it appears in front of the "+Add filter" button, as a purple, pillow button which can be dismissed by clicking on "X". You can apply more than one condition at once.

In case the applied filter should not have any results present, such a label will be displayed instead of records.

If you would like to edit the Campaign which was created before, pick this specific Campaign and click on the overflow button, a shortlist with the "Edit" option will appear - click it.

Now you will land on edit Campaign view - here you can make expected changes and save new Campaign configuration.

How to edit in steps:
- 1.Select the Campaign
- 2.Click the context menu
- 3.Click "Edit"
- 4.Make a changes
- 5.Click “Save”
This feature helps you when filling in the 'Give Units' text field. When you will click on the text field and start typing, after the first two letters - the list with the suggested Templates or Variables will appear. You can mix the formulas (add, divide, multiply, and subtract) to obtain the expected result.

All available formulas you can use for the Campaigns:
- Templates
- Fixed amount of 100 Units
- 10 Units for every product with specific SKU
- 20 Units for every product from the specifc brand
- 1 Unit for every 1 unit of currency spent
- 1 Unit for every 10 units of currency spent and roundup the value of units
- 1 Units for every 1 unit of currency spent, 2x units for every product from the specific category
- 2 Units for every 1 unit of currency spent, exclude products from the specific brand
- 5 Units for every 1 unit of the currency spent on the product from the specific brand
- Variables
- Transaction gross value
- Total number of items in transaction
- Quantity of products with specific SKU
- Gross value of products with specific SKU
- Quantity of products from specific category
- Gross value of products from specific category
- Quantity of products from specific brand
- Gross value of products from specific brand
- round_down()
- round_up()
Besides the formulas, you can use already prepared templates, by clicking on the '+' button, where the searchable list will appear.
To choose the formula you can use the button "˅". Clicking on this button will open a list with optional formulas.
If any of your typed formulas will have a mistake, a message about the problem appears after trying to save the campaign.

Campaign limitation is one of the ways to incorporate anti-fraud into loyalty programs. These are based on different conditions in three main categories, namely: Global - relating to the entire campaign Individual - relating to the account of a single member Usage - how many times a member can receive points for a specific action.
When using this functionality, you are able to define how many units a single campaign is able to generate, with no breakdown per member; specify the maximum number of units a member is able to receive within a campaign, as well as how many times a member can receive units for fulfilling campaign conditions.
For example: Set an overall limit for the entire campaign of 10000 units, as well as a limit of 100 units for one member. As a result, I know that a minimum of 100 users can join the campaign, and each of them will be able to earn a maximum of 100 units.

Each of these limits can be set for a specific period of time during which it is enforced.
Timestamps:
- No limit - the Campaign is not limited
- Daily - Member can earn a specific number of units every x calendar days For example: Limit for number of units: In last n calendar days Number of days: 3 Maximum number of units: 230 Each Member in every 3 days from today (2022.04.12 00:00 - 2022.04.15 00:00) can earn 230 units
- Weekly - Member can earn a specific number of units every x calendar weeks For example: Limit for number of units: In last n calendar weeks Number of weeks: 5 Maximum number of units: 150 Each Member in every 5 weeks from this week (2022.04.11 00:00 - 2022.05.15 00:00) can earn 150 units
- Monthly - Member can earn a specific number of units every x calendar months For example: Limit for number of units: In last n calendar months Number of months: 0 Maximum number of units: 15 Each Member in every 0 month from this month (2022.05.01 00:00 - 2022.05.31 00:00) can earn 15 units
- Yearly - For example: Limit for number of units: In last n calendar months Number of years: 0 Maximum number of units: 1 500 Each Member in every 0 years from this year (2022.01.01 00:00 - 2022.12.31 00:00) can earn 1 500 units
- In total - this limit is set for the entire lifetime of the Campaign
Types of limits:
- 1.Limit for number of units - here you can set the general maximum number of Units to earn for all Members.
- 2.Limit for number of units per member - here you can set the maximum number of Units for each Member.
- 3.Limit for number of triggers per member - here you can set the maximum number of triggers for each Member.
This function allows you to simulate the Reward effect that will be returned when the Member will meet the Campaign conditions. The simulation helps to check whether the Campaign you have created contains the correct conditions and whether the Reward is returned correctly.
You can simulate direct or Referral Campaigns. If you would like to simulate the Referral Campaign, please note that you need to fill the 'Member details' section along with the 'Referrer details' to simulate rewards for both sides.

Simulation form
E.g.
Create a Referral Campaign with conditions:
Rules for referrer: Referrer first name is equal to John and Reward is equal to 80 Units
Rules for referee: Referee first name is equal to John and Reward is equal to 120 Units
Then go to simulation, fill in all required fields and enter Member(Referee) and Referrer first name. After simulating Member, you should see an effect in the results with a Reward of 120 Units for Member and 80 for Referrer.
In the simulated results, you may notice a distinction to whom the Reward will be granted.

Simulation results for Member and Referrer
E.g.
Create a Direct Campaign with a conditions:
First name is equal to John
and Reward is equal to 140 Units
Then go to the simulation, fill in all the required fields and enter the first name, John. After simulating the Campaign, you should see an effect in the results with a Reward of 140 Units for Member.

Simulation result only for Member
The simulation form contains 4 sections:
- Member details
- Referrer details
- Campaign trigger
- The last one depends on which trigger you will pick:
- Transaction details
- Event details (if you will choose Internal event or Custom Event)
After running the simulation 'Simulated Campaigns' and 'Simulated results' will appear. Here you may notice which Campaigns criteria were met along with who and what Reward may receive.
In open loyalty as one of the effects of the campaign, you can grant or remove the Member Custom Attribute. This allows you to fulfill many business scenarios, such as creating advanced member leveling, assigning custom units and using them as a reward calculation ratio, as well as creating badges.
Example: A customer, after purchasing two products from the lamp category above the amount of $100, will receive the badge "Shine a light"
configure the campaign according to your needs, when you go to Rules, fill in the following configuration:

Member Custom Attribute is set in the Key:Value format - you can group badges or different kinds of Attributes by naming the Key accordingly.
When a member completes a Campaign, a Badge will be assigned to the Member account: which can later be interpreted and displayed on the front end or mobile app.
In Open Loyalty, it is possible to create campaigns that dynamically grant units on the basis of the individual ratio available on customer accounts. This is possible by using the functionality of adding and updating custom attributes of the customer account, as well as using member custom attributes, in the campaign effect.
Example:
Each member performing a transaction has a ratio assigned to their account within the member custom attribute. The starting ratio is 0.5
After each transaction, the ratio is increased by 0.5.
Units are calculated according to the formula transaction gross value * ratio. - In the specific formula we add 0.5 to the ratio, due to the fact that we take into account the current ratio - already increased by 0.5.
To implement such a scenario in Campaign creator:
As a Rule 1 we set:
Condition:
Expression/ agg(customer.labels).matchLabel('ratio')
Effect:
Set Member Custom Attribute/ Key: ratio/ Value: agg(customer.labels).getLabelValue('ratio')+0.5
Add units: (agg(customer.labels).getLabelValue('ratio')+0.5)*transaction.grossValue
As a Rule 2 we set:
Condition:
Expression/ agg(customer.labels).matchLabel('ratio') == null
Effect:
Set Member Custom Attribute/ Key: ratio/ Value: 0.5
Add units: 0.5*transaction.grossValue
“Referrers earn 1% cash on all revenue generated by their referred customers”

Last modified 8d ago