Campaigns

Rules and effects

The conditions a campaign can check and the effects it can apply.

Every campaign has at least one rule. A rule's conditions decide when it applies, and its effects decide what happens to the member, for example that they get points or a reward. A rule applies when all of its conditions are met, and a rule without conditions applies to every event of the trigger.

A campaign can have several rules, each with its own conditions and effects, for example one rule per tier with a different number of points.

Conditions

A condition compares a value with an operator, for example Transaction value Greater than 5000 or Registration date Before a date. The conditions you can pick depend on the trigger.

Member

Available for every trigger.

ConditionChecks
Birth date, Registration dateThe member's dates.
Email, First name, Last name, Phone, Loyalty card number, Referral tokenThe member's profile fields.
Gender, CountryThe member's gender and country.
AnonymizedWhether the member's data has been anonymized.
Transaction countHow many transactions the member has.
Has custom attribute on memberWhether the member has a custom attribute, optionally with a specific value.
TierThe member's current tier. Purchase and Return Transaction triggers only.
Registration placeWhere the member signed up. Registration trigger only.

Transaction

Available for the Purchase Transaction and Return Transaction triggers.

ConditionChecks
Transaction date, Transaction value, Transaction currencyThe transaction's date, gross value and currency.
Has product from category, Has product from brandWhether the transaction contains a product from a category or brand.
Has custom attributeA custom attribute on the transaction.
Has custom attribute (Product)A custom attribute on one of the transaction's products.
Used reward, Used points, Used walletWhether the member used a reward, points or a specific wallet in this transaction.

The Return Transaction trigger has the same checks for the original purchase, such as Original transaction date, Original transaction value and Original has product from category.

Wallets

Available for the Purchase Transaction and Return Transaction triggers.

ConditionChecks
Active units, Pending units, Blocked unitsThe member's current balances.
Total spent unitsHow many units the member has spent in total.

Custom condition

When none of the built-in conditions fits, a Custom condition lets you write your own expression. The rule applies when the expression is true. This one checks, on a Return Transaction, that the return happened within 30 days of the original purchase:

abs(date(originalTransaction.transactionDate) - date(transactionDate)) / 86400 <= 30

Effects

EffectWhat it doesYou choose
Add unitsAdds units to the member's wallet.The wallet type and the amount, as a number or a formula. Optionally a delay and an expiry date.
Spend unitsTakes units from the member's wallet.The wallet type and the amount.
Block unitsPuts some of the member's units on hold. Blocked units can't be spent.The wallet type and the amount.
Add block unitsHolds new points for the member without adding them to any balance yet. They turn into real points only when an Activate points effect runs for the member, for example after the member completes their profile.The wallet type, the amount and a delay. Without a delay, no points are held.
Activate pointsReleases all points that Add block units held for the member. Points whose delay has ended become active right away, and the rest stay pending until the delay ends. It also recalculates the member's tier.Nothing else.
Give rewardGives the member a reward, for example a coupon.The reward.
Cancel unit transferReturn Transaction only. Reverses points connected to the original purchase. The return must send the original purchase's documentIdentifier in linkedTransactionId.Pending units cancels the pending units the original purchase earned. Active units blocks the amount you enter in the chosen wallet, so the member can't spend it.
Trigger recalculationRecalculates the member's tier.Nothing else.
Add member custom attributeAdds a key/value pair to the member's custom attributes.The key and the value.
Update member custom attributeChanges the value of an existing custom attribute.The key and the new value.
Delete member custom attributeRemoves a custom attribute from the member.The key.
Custom effectDoes what your program needs when the built-in effects don't cover it.The Scops Loyalty team builds it with you.

A rule can have several effects, so one rule can add points, give a reward and tag the member at the same time.

Delay and expiry

The clock icon delays an effect, for example to award points 30 days after the purchase. See Delay. On Add units, the timer icon sets Expires at, the date after which the added units expire.

Member custom attributes

The three custom attribute effects let a campaign tag members and change the tags later. Member custom attributes has an example.

Custom effects

A custom effect covers a requirement the built-in effects don't, for example calling one of your own systems or a business rule specific to you. We can build almost any behavior this way, so talk to the Scops Loyalty team about what you need.

Next steps