This topic provides the list of attributes supported for each profile.

Current Customer (currentCustomer)

This profile consists of attributes related to fetching customer's profile information and loyalty details as listed in the table below. Use this profile to execute actions based on loyalty information and profile details of customers when they make transactions. 


ATTRIBUTEDESCRIPTIONSUB ATTRIBUTES
nameCustomer's full nameNA
firstnameCustomer's first nameNA 
lastnameCustomer's last nameNA 
avgBasketSizeThe ratio of total items purchased to the number of transactions of a customerNA 
avgSpendPerVisitAverage purchases amount of a customer per visitNA
clusterValueIncludes()To check customers of a particular cluster (segment)clusterValueIncludes(String clusterName, String clusterValue) 
clusterValueExcludes()To check customers who are not part of a particular clusterclusterValueExcludes(String clusterName, String clusterValue) 
currentPointsAvailable loyalty points of the customerNA 
customFieldValueExcludes()Customer custom field excludes the given valuecustomFieldValueExcludes("Field","Value") 
customFieldValueIncludes()Customer custom field includes the given valuecustomFieldValueIncludes("Field","Value") 
emailCustomer's email idNA 
externalIdCustomer's external idNA 
initialCurrentPointsActive points of a customer before evaluating the eventNA
initialLifetimePointsTotal loyalty points earned by a customer before evaluating the eventNA 
initialSlabNameCustomer's tier name before evaluating the eventNA 
initialSlabNumberCustomer's tier number before evaluating the eventNA 
joinDate Registration date of a customerdateDiff, day, dayOfMonth, daysDiff, daysDiffFromString, isAfter, isHourBetween, isTimeBetween, isValid, isWeekday, isWeekend, month, and year
For examples on using date formats, see the Date Format section on 
Using Operators in Rule Expressions
lifetimePoints Total points earned by a customer from the date of registrationNA 
lifetimePurchasesTotal purchases amount of a loyalty customer from the date of registrationNA 
mobileMobile number of a customerNA 
numberOfTxnsTotal number of transactions made by a customer from the date of registrationNA 
numberOfTxnsTodayNumber of transactions made by a customer the current dayNA 
numberOfVisitsTotal number of times a loyalty customer  visited your stores (made transactions in different days) NA 
SlabNameName of the current loyalty tier of a customerNA 
SlabNumberSerial number of the current tierNA 
isLoyalChecks if the current customer is registered in the brand's loyalty programExample: currentCustomer.isLoyal==true
hasInstoreProfileChecks if the current customer has InStore profileExample: currentCustomer.hasInstoreProfile==true
hasWeChatProfileChecks if the current customer has WeChat profileExample: currentCustomer.hasWeChatProfile==true
doesProfileExistsChecks if a specific profile 


Current Transaction (currentTxn)

The currentTxn profile returns the details of a transaction. Use this profile to write rules on transactions, basket size, custom fields, and so on. Refer to the table below for all the supported attributes of customerTxn.


ATTRIBUTE

DESCRIPTION

 SUB ATTRIBUTES
numberTransaction number of the current transactioncontains, exists, isEmpty, isNotNull, isNull, isValidDate, matches, and notExists
basketSum()Sum of value of the items matching the inventory attributecurrentTxn.basketSum("Attribute Name","Inventory Value")
basketSumRegex()Sum of value of the items matching the inventory attribute - regular expressioncurrentTxn.basketSumRegex("Attribute Name","Attribute  Regex") 
basketQty()Total quantity of items in the bill matching the inventory. For instance, if 2 items of a given line-item are bought, then the basket quantity is 2.currentTxn.basketQty("Attribute Name","Attribute Value")
basketQtyRegex()Quantity of items in the bill matching the regular expressioncurrentTxn.basketIncludes("Jeans","Levis002") 
basketCount()Number of products in the transaction of the given inventory type - irrespective of quantityEither pass just value or attribute and value pair. 
Example: currentTxn.basketCount("Dvs_flag","DVS_Flag")>1
basketCountRegex()Number of products whose item attribute matches the given regular expressionPass attribute and regex of the attribute that you want to validate
currentTxn.basketSum("Inventory Attribute","Regex")
 
basketIncludes()Products contained in the transaction.Pass attribute and value pair.
currentTxn.basketIncludes("Attribute Name","Attribute Value")
Example:
currentTxn.basketIncludes("Jeans","Levis002")
basketExcludes()Products not contained in the transactionPass attribute and value pair. 
currentTxn.basketExcludes("Attribute Name","Attribute Value")
Example:
currentTxn.basketExcludes("Jeans","Levis002")
basketIncludesRegex()If the bill includes products whose item attribute does not match the given regular expressionPass attribute and value pair. 
currentTxn.basketIncludesRegex("Attribute Name","Attribute Regex")
Example:
currentTxn.basketIncludes("Jeans","XXX") 
basketExcludesRegex()If the bill does not include products whose item attribute does not match the given regular expressionPass attribute and value pair. 
currentTxn.basketExcludesRegex("Attribute Name","Attribute Regex")
Example:
currentTxn.basketExcludes("Jeans","XXX") 
basketSizeTotal number of items in the bill - irrespective of quantity of each itemNA     
customFieldValueExcludesTransaction custom field excludes the given valueMention the custom field value that you want to validate as shown below
currentCustomer.customFieldValueExcludes("a_customertype","Loyalty") 
customFieldValueIncludes()Check if customer's transaction level custom field value includes the given valueMention the custom field value that you want to validate as shown below
customFieldValueIncludes("Field","Value")
Example:
currentCustomer.customFieldValueIncludes("a_customertype","Loyalty")
dateDate of transactiondateDiff, day, dayOfMonth, daysDiff, daysDiffFromString, isAfter, isHourBetween, isTimeBetween, isValid, isWeekday, isWeekend, month, and year
discountDiscount availed for a transaction NA
pointsTotal points issued for a transaction NA
totalQtyTotal quantity of all items in a transaction. For instance, if 2 items of a given line item are bought, then the 2 is added to the basket quantity. NA
 valueTotal value of the transaction interval
 notesTransaction level notes specified by the cashier during transactioncontains, exists, isEmpty, isNotNull, isNull, isValidDate, matches, and notExists

Current Event (currentEvent)

The current event profile returns the event that is triggered by the event listener, i.e., the event on which the rule is created. The following table consists of the descriptions of all the attributes of currentEvent.


ATTRIBUTEDESCRIPTION SUB ATTRIBUTES
eventTypeName of the eventNA
Example:
currentEvent.eventType=="TransactionAdd" 
previousCustomFieldValue()Value of custom field before updatingcurrentEvent.previousCustomFieldValue("Custom Field Name","Field Value")
Example:
currentEvent.previousCustomFieldValue("age_group","value")
currentCustomFieldValue()Value of custom field after updatingcurrentEvent.currentCustomFieldValue("Custom Field Name","Field Value")
Example:
currentEvent.currentCustomFieldValue("age_group","value") 
previousMobileCustomer's mobile number before updatingNA 
previousEmailCustomer's email ID before updatingNA 
previousExternalIDCustomer's external ID before updatingNA 
previousNameCustomer's full name before updatingNA 
previousFirstNameCustomer's first name before updatingNA 
previousLastNameCustomer's last name before updatingNA 
currentMobileCustomer's mobile number after updatingNA 
currentEmailCustomer's email id after updatingNA 
currentExternalIDCustomer's external id after updatingNA 
currentNameCustomer's full name after updatingNA 
currentFirstNameCustomer's first name after updatingNA 
currentLastNameCustomer's last name after updating NA 
previousLoyaltyTypeChecks the loyalty status of the customer before the current event. Supported only for CustomerUpdate eventValues: LOYALTY/NON_LOYALTY
Example:
currentEvent.previousLoyaltyType=="LOYALTY" or currentEvent.previousLoyaltyType=="NON_LOYALTY"
previousLoyaltyTypeChecks the current loyalty status of the customer. Supported only for CustomerUpdate eventValues: LOYALTY/NON_LOYALTY


Current Line Item (currentLineItem)

The currentLineItem profile returns line-items of a current transaction. You can use this profile only on forward cases and when transaction unroll is enabled. Use this profile to check line-item level details of the current transaction as provided in the table below.

ATTRIBUTEDESCRIPTION  SUB ATTRIBUTE
codeItem code of the line-item as assigned in the inventoryNA 
descriptionThe description specified for the of the line-item in the inventoryNA
currentLineItem.description=="<Item Description>" 
discountPercentageDiscount percentage at line-item levelNA 
doesItemMatch() Check if an item code matches with the given codedoesItemMatch("<Attribute Name>","<Value>") 
qty Quantity of a line-item purchasedNA 
rateActual price of a line-itemNA 
valueSelling price of a line-item NA

Return Bill (returnBill)

The returnBill profile is used to of a current transaction. You can use this profile only on forward cases and when transaction unroll is enabled. Use this profile to check line-item level details of the current transaction as provided in the table below.

ATTRIBUTEDESCRIPTION  SUB ATTRIBUTES
basketCountNumber of products in the transaction of the given inventory type - irrespective of quantity NA
basketCountRegex()Number of products whose item attribute matches the given regular expressionreturnBill.basketCountRegex("Inventory Attribute","Regex") 
basketCountRegexBrandNumber of products whose brand name matches the given regular expressionreturnBill.basketCountRegexBrand("Brand Name","Regex") 
basketCountRegexCategoryNumber of products whose category name matches the given regular expressionreturnBill.basketCountRegexCategory("Category Name","Regex") 
basketExcludes()Products not contained in the transactionExample:
returnBill.basketExcludes("MkmMakeCode","M0081")
basketIncludes()Products contained in the transactionExample:
returnBill.basketIncludes("MkmMakeCode","M0081") 
basketExcludesRegex()To check if the transaction includes products whose item attribute does not match the given regular expressionExample:
returnBill.basketExcludesRegex("MC","KI_AC.*")
basketIncludesRegex()To check if the transaction includes products whose item attribute matches the given regular expressionExample:
returnBill.basketIncludesRegex("MC","KI_AP.*")
basketIncludesRegexBrand()To check whether the transaction contains items of a specific brand returnBill.basketIncludesRegexBrand("Brand Regex")
returnBill.basketIncludesRegexBrand("LS")
 
basketIncludesRegexCategory()To check whether the transaction contains items of a specific categoryreturnBill.basketIncludesRegexCategory("Category Regex") 
basketQty() To check number of items in a transaction returnBill.basketQty("Attribute Name","Attribute Value") 
basketQtyRegex() Quantity of items in the bill matching the regular expression returnBill.basketQty("Attribute Name","Attribute Value")  
basketQtyRegexBrand() Number of quantities of a specific item whose brand name matches the given regular expressionreturnBill.basketQtyRegexBrand("Brand Name","Regex")  
basketQtyRegexCategory() Number of quantities of a specific item whose category name matches the given regular expression returnBill.basketQtyRegexCategory("Category Name","Regex")
basketSize Total number of items in the bill - irrespective of quantity of each item  NA
basketSum()Sum of value of the items matching the inventory attribute Example:
returnBill.basketSum("Product","Shirt")
basketSumRegex()Sum of value of the items matching the inventory attribute - regular expression Example:
returnBill.basketSum("Product","Regex")
customFieldValueExcludes()Transaction custom field excludes the given value Pass the custom field value that you want to validate as shown below
customFieldValueExcludes("Field","Value")
Example:
returnBill.customFieldValueExcludes("a_customertype","Loyalty") 
customFieldValueIncludes() Check if customer's transaction level custom field value includes the given value Pass the custom field value that you want to validate as shown below
customFieldValueIncludes("Field","Value")
Example:
returnBill.customFieldValueIncludes("a_customertype","Loyalty") 
date Date of transactiondateDiff, day, dayOfMonth, daysDiff, daysDiffFromString, isAfter, isHourBetween, isTimeBetween, isValid, isWeekday, isWeekend, month, and year
For examples on using date formats, see the Date Format section on Using Operators in Rule Expressions
discount Discount availed for a transaction  NA
notesTransaction level notes specified by the cashier during transaction contains, exists, isEmpty, isNotNull , isNull , isValidDate, matches, and notExists 
numberTransaction number of the current transaction contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches, and notExists 
points Total points issued for a transaction NA
totalQty Date of transactionNA 

Current Store (currentStore)

The currentStore profile is used to check store level details. You can write rules based on the attributes provided in the table below. 


ATTRIBUTE

 DESCRIPTION

 SUB ATTRIBUTES

codeUnique code of the store NA
nameName of the store NA

Tender Profile (tenderProfile)

This tenderProfile is used to write rules based on the payment mode combinations.


ATTRIBUTEDESCRIPTION  SUB ATTRIBUTES
amountThe amount paid for a transaction using the payment mode NA
codeReturns code or name of the combination created in loyalty for the payment modecontains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists
notes Returns notes described for the tendercontains, exists, isEmpty, isNotNull , isNull , isValidDate, matches, and notExists

Current Customer Partner (currentCustomerPartner)

This currentCustomerPartner consists of attributes related to fetching customer partner's profile information and loyalty details as listed in the table below.


ATTRIBUTEDESCRIPTION  SUB ATTRIBUTES

additionalBenefitsInMembershipCycle

Additional benefits available during the membership life cycleNA
benefitsAvailedInActiveMembershipBenefits that are available with the active membershipNA
benefitsAvailedInEventCycleBenefits available during the event cycle
NA

benefitsLimit

The maximum or minimum limit of benefit that can be availedNA
countBillsCurrentCycleCalculate the number of bills generated during the current cycleNA
countPromotionPointsIssuedCurrentCycleCalculate the number of points issued during the current cycle
NA
daysElapsedInCurrentCycleNumber of days elasped in current cycle for customer partnerNA
isLinkedOnSpecificDateChecks if the current cutomer partner is linked on a specific date or not.
NA
isLinkedToChecks if the current cutomer partner is linked to a loyalty program or not
NA
sumPurchaseValueCurrentCycleSum of all purchase value during current cycleNA

Current Tracker (currentTracker)

This currentTracker is used to write rules based on the recent tracker details.

Current Tracker Condition (currentTrackerCondition)

This currentTrackerCondition is used to write rules based on the recent tracker condition.


ATTRIBUTEDESCRIPTION  SUB ATTRIBUTES

numberOfVisits

Number of visits isNotNull and isNull
trackedValue
interval, isNotNull and isNull
trackerConditionNameName of the tracker conditioncontains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists
trackerConditionPeriodDuration of the tracker condition
isNotNull and isNull
trackerCurrAggr
interval, isNotNull and isNull

trackerInitialPrevAggr


interval, isNotNull and isNull
trackerNameName of the trackercontains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

trackerPrevAggr


interval, isNotNull and isNull

Group Primary Customer (groupPrimaryCustomer)

This groupPrimaryCustomer is used to write rules based on the primary customer.


ATTRIBUTEDESCRIPTION  SUB ATTRIBUTES
avgBasketSize

isNotNull and isNull

avgSpendPerVisit

interval, isNotNull and isNull

clusterValueExcludes

NA
clusterValueIncludes

NA
countActiveCouponsInCouponSeries
NA
currentAllPoints

interval, isNotNull and isNull

currentNonRedeemablePoints

interval, isNotNull and isNull

currentPoints

interval, isNotNull and isNull

customFieldValueExcludes

NA
customFieldValueExists

NA
customFieldValueIncludes

NA
doesProfileExists

NA
email

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

extField

NA

externalId

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

firstname

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

hasInstoreProfile

isNotNull and isNull
hasWeChatProfile

isNotNull and isNull
includesLabelRegex

NA
initialCurrentAllPoints

interval, isNotNull and isNull

initialCurrentPoints

interval, isNotNull and isNull

initialLifetimePoints

interval, isNotNull and isNull

initialLifetimePurchase

interval, isNotNull and isNull
initialSlabName

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

initialSlabNumber

isNotNull and isNull
isControl

isNotNull and isNull
isGroupMember

isNotNull and isNull
isLoyal

isNotNull and isNull
isPrimary

isNotNull and isNull
isRegisteredOn

NA
isSecondary

isNotNull and isNull

isTest

isNotNull and isNull

joinDate

dateDiff, day dayOfMonth, daysDiff, daysDiffFromString, isAfter, isHourBetween, isNotNull, isNull, isTimeBetween, isValid, isWeekday, isWeekend, minutesDiff, month, year

lastname

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

lifetimeAllPoints

interval, isNotNull and isNull
lifetimeNonRedeemablePoints

interval, isNotNull and isNull
lifetimePoints

interval, isNotNull and isNull
lifetimePurchase

interval, isNotNull and isNull
mobile

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

name

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

numberOfRedemptionsInCalendarMonth

isNotNull and isNull
numberOfRedemptionsInCalendarWeek

isNotNull and isNull
numberOfRedemptionsInPastDays

NA
numberOfRedemptionsToday

isNotNull and isNull
numberOfTxns

isNotNull and isNull
numberOfTxnsToday

isNotNull and isNull
numberOfVisits

isNotNull and isNull
pointsRedeemedInCalendarMonth

interval, isNotNull and isNull
pointsRedeemedInCalendarWeek

interval, isNotNull and isNull
pointsRedeemedInPastDays

NA
pointsRedeemedToday

interval, isNotNull and isNull
slabChangeDate

dateDiff, day dayOfMonth, daysDiff, daysDiffFromString, isAfter, isHourBetween, isNotNull, isNull, isTimeBetween, isValid, isWeekday, isWeekend, minutesDiff, month, year

slabExpiryDate

dateDiff, day dayOfMonth, daysDiff, daysDiffFromString, isAfter, isHourBetween, isNotNull, isNull, isTimeBetween, isValid, isWeekday, isWeekend, minutesDiff, month, year

slabName

contains, exists, isEmpty, isNotNull, isNull, isValidDate, matches and notExists

slabNumber

isNotNull and isNull
trackerValueBeforeEvent

NA

Organization (organization)

This organization is used to write rules based on the organization's details.

Program (program)

This program is used to write rules based on the loyalty program details.

Referrer Code (referrerCode)

This referrerCode is used to write rules based on the referrer code details.


ATTRIBUTEDESCRIPTION  SUB ATTRIBUTES
refereeRegCountTotal number of registered referee
isNotNull and isNull
refereeTxnCountNumber of transactions done by the referee
isNotNull and isNull