LogoLogo
HomepageCase studiesBook a demo
User Guide
User Guide
  • Welcome to Open Loyalty!
  • What's New
    • 2024
    • 2023
    • 2022
  • What's Next
  • Technical Guide
  • Main Features
    • Global Management
      • Analytics
      • Settings
      • Config Duplication
      • Usage
    • Dashboard
      • General Overview
      • Units Wallet Overview
      • Additional Metrics
      • Members by Tiers
    • Members
      • Member List
        • Configuration
        • Creating Members
        • Managing Members
        • Removing Members
      • Segments
        • Creating Segments
        • Managing Segments
        • Segment Conditions
      • Referred Members
    • Campaigns
      • Creating Campaigns
        • Return Campaign
        • Referral Campaign
        • Time-Based Campaign
        • Redemption Code Campaign
        • Internal event - Achievement progressed
        • Percent value distribution
      • Managing Campaigns
      • Campaign Simulation
      • Follow-up Campaigns
    • Custom Events
      • Custom Event Schemas
    • Transactions
      • Adding Transactions
      • Managing Transactions
      • Channels
    • Tiers
      • Adding Tiers
      • Managing Tiers
      • Tiers Configuration
      • Tier Benefits
    • Wallets
      • Wallet Types and Configuration
      • Unit Transfers
        • Creating Unit Transfers
        • Importing Unit Transfers
        • Managing Unit Transfers
    • Achievements
      • Creating Achievement
      • Managing Achievements
      • Follow up Achievements
    • Rewards
      • Reward List
        • Rewards Configuration
        • Creating Reward
        • Reward Types
        • Units Conversion Coupon
        • Adding Coupons
        • Reward Flow
      • Reward Fulfillment
      • Reward Categories
    • Webhooks
      • How to Configure a Webhook
      • What Triggers a Webhook
      • Expiring Notifications
    • Collections
    • Imports / Exports
      • Imports
        • Sample Import Files
      • Exports
        • UI Data Exports
        • Configuration Exports
        • S3 Bucket Exports
    • Settings
      • Roles
      • Admins
        • System Logs
      • Tenants
      • Translations
    • Expressions
      • Attributes List
      • Operators
      • Custom Functions
      • Expression Examples
      • Sample Use Cases
        • Using Member Custom Attributes
        • Complex Effects (if, else)
        • Excluding Members
        • Elapsed Time Conditions
        • Using Additional Dates for Calculations
        • Register on Birthday
        • Transaction on Birthday
        • Tier Upgrade or Downgrade
  • Sample Setups
    • Good Practices
    • Pay with Points
    • Promo and Discounts in Cart
    • Sample Campaigns
      • #1 Earn 1 point for every $1 spent
      • #2 Earn 2x points when shopping on Monday morning
      • #3 Earn 1 stamp for every transaction
      • #4 Buy product ACME 123 and earn 100 points
      • #5 Refer a friend and get 100 points
      • #6 Refer 5 friends and get a $50 off coupon for the next purchase
      • #7 Register to the program and get 50 bonus points
      • #8 Get 30 bonus points for your first transaction in the loyalty program
      • #9 Cashback campaign
      • #10 Product meets selected criteria
    • Sample Achievements
      • #1 Celebrate summer - Buy 5 times between June and August
      • #2 Place 10 Orders above 50€ - Complete 10 transactions, for more than 50€ each
      • #3 Ambitious player - Log in to the game 3 times per week for 8 consecutive weeks
      • #4 SKU 'ABC' configuration - Spend total of 100$ on products with SKU 'ABC132' in September
      • #5 Workout track -Track a workout of at least 30 minutes for 5 days in a row
      • #6 4 referees made the transactions for 2 consecutive weeks
      • #7 2 referees made a transaction configuration
  • FAQ
    • Configuration Migration
    • Custom Attributes
    • Achievements
    • GDPR
    • Opt-Out
    • Referral Programs
    • Returns and Cancellations
    • Timezones
Powered by GitBook
On this page
  • Member
  • Personal Details
  • Address Details
  • Profile Details
  • Transaction Details
  • Units Details
  • Transaction
  • Main Details
  • Item Details
  • Custom Event
  • Internal Event
  • Achievement Progress
  • Current Time

Was this helpful?

  1. Main Features
  2. Expressions

Attributes List

Below is a list of all the meta-language objects, along with the supported triggers and operators, that you can use when configuring your campaigns in Open Loyalty.

They are organized into sections based on the relevant trigger objects.

Member

In the referral campaigns, customer context refers to the referee. If you want to aim the referrer, use refferer context, e.g. referrer.labels referrer.lastTransactionDate

Personal Details

Context Object
Description

customer.firstName

Member's first name

customer.lastName

Member's last name

customer.gender

Member's gender

customer.email

Member's email

customer.phone

Member's phone number

customer.loyaltyCardNumber

Member's loyalty card number

Address Details

Context Object
Description

customer.address.street

Street name

customer.address.address1

Building name

customer.address.address2

Flat / Unit name

customer.address.city

City

customer.address.postal

Postal code

customer.address.province

State / Province

customer.address.country

Country

Profile Details

Context Object
Description

customer.level

Member's current tier

customer.levelAchievementDate

Date when member upgraded (or downgraded) to the current tier

customer.labels

Member's custom attribute

customer.registeredDate

customer.legalConsent

customer.marketingConsent

customer.dataProcessingConsent

Transaction Details

All the details are based on the transactions registered and matched with the member.

Context Object
Description

customer.firstTransactionDate

Date of the member's first transaction

customer.lastTransactionDate

Most recent date of the member's last transaction

customer.numberOfPurchases

Total count of member's transactions

customer.averagePurchaseAmount

Average transaction value (based on all transactions)

Units Details

Remember to replace the code with a valid wallet code.

Context Object
Description

customer.getWallet("code").activeUnits

Number of active units

customer.getWallet("code").spentUnits

Number of spent units

customer.getWallet("code").earnedUnits

Number of total earned units

customer.getWallet("code").lockedUnits

Number of pending units

customer.getWallet("code").blockedUnits

Number of blocked units

customer.getWallet("code").expiredUnits

Number of expired units

Transaction

Main Details

Context Object
Description

transaction.documentNumber

Document number

transaction.purchasedAt

Document date

transaction.purchasePlace

Purchase place

transaction.labels

Transaction's custom attributes

transaction.qty

Total quanity of items in a transaction

transaction.grossValue

Transaction's gross value

transaction.channelId

Channel ID

Item Details

Context Object
Description

transaction.category(‘shoes’).qty

Total number of items in a specified category

transaction.category(‘shoes’).grossValue

Total gross value of items in a specified category

transaction.maker(‘Nike’).qty

Total number of items of a specified brand

transaction.maker(‘Nike’).grossValue

Total gross value of items of a specified brand

transaction.sku(‘SKU123’).qty

Total number of items with a specified SKU

transaction.sku(‘SKU123’).grossValue

Total gross value of items with a specified SKU

transaction.itemLabel(‘SKU123’).qty

Total number of items with a specified custom attribute key

transaction.itemLabel(‘SKU123’).grossValue

Total gross value of items with a specified custom attribute key

transaction.itemLabel(‘SKU123’, ‘Value’).qty

Total number of items with a specified custom attribute key and value

transaction.itemLabel(‘SKU123’, ‘Value’).grossValue

Total gross value of items with a specified custom attribute key and value

transaction.itemLabels

Transaction items' custom attributes

Custom Event

Context Object
Description

event.eventDate

Date of a custom event

event.eventId

event.body.sampleatributename

Attribute system identifier

The term sampleatributename refers to the identifier assigned to an attribute in the custom event schema. For instance, if you added an attribute with the identifier colour, you would access this attribute as event.body.colour.

For further details, please refer to the article:

Custom Event Schemas

Internal Event

Any internal event that triggers the campaign.

Achievement Progress

Context Object
Description

event.body.progressStatuses[0].currentPeriodValue

Current value of the progress within the selected rule.

event.body.progressStatuses[0].periodGoal

Goal value within the selected rule.

event.body.progressStatuses[0].consecutivePeriods

Number of consecutive periods within the selected rule.

event.body.progressStatuses[0].completedConsecutivePeriods

Completed consecutive periods within the selected rule.

event.body.progressChanges[0]

Progress change (returned as number) within the selected rule.

event.body.completedCount

Completed count of the achievement.

The objects of expressions are available only in the Achievement progressed option in the Internal Event Campaign.

event.body.progressStatuses[0] - The number [0] in the object refers to the first rule in the achievement.

Current Time

Context Object
Description

executionContext.processedAt

Datetime of the triggered process

Last updated 22 days ago

Was this helpful?

Member's registration date This value is separate from the member's creation date (if specified in the member's profile).

Legal Consent (true/false) Also referred to as the Basic Legal Agreement in the member profile or as agreement1 in the API.

Marketing Consent (true/false) Also referred to as the Marketing Agreement in the member profile or as agreement2 in the API.

Data Processing Consent (true/false) Also referred to as the Data Processing Agreement in the member profile or as agreement3 in the API.

Event ID of a custom event This field represents the external ID, if one has been added. It should not be confused with the customEventId that is automatically generated in Open Loyalty.

❗
❗
❗
❗
❗