Loyalty cards

You can find all configuration for the loyalty card subsystem in the Sitecore.Commerce.LoyaltyPrograms.config file. Here you will find all details for the entities, pipelines, and repositories used by the loyalty card system.

The default loyalty card entities for Commerce Connect only assume some of the basic loyalty card information will be used across all commerce systems. It is expected that you will need to extend these entities.

You can extend the following eleven entities , which are defined in the Connect system for loyalty cards:

  • LoyaltyCard- represents the LoyaltyCard of a user, and contains information such as card number, associated programs, and reward points.

  • LoyaltyCardPaymentInfo - extends the PaymentInfo class to allow a loyalty card to be used to pay for all or part of an order.

  • LoyaltyCardTier - describes a tier within a loyalty program, contains information such as valid from and to dates.

  • LoyaltyCardTransaction - describes a points transaction on a loyalty card, contains information such as points awarded and the type of points awarded.

  • LoyaltyProgram - describes a program that a loyalty card is part of; contains information such as any tiers that the program might have.

  • LoyaltyProgramStatus - describes a program that a loyalty card is part of; contains information such as any tiers that the program might have.

  • LoyaltyProgramSummary - contains basic information about a program such as name, description, shop name, and id.

  • LoyaltyRewardPoint - represents meta data around points added to a card; contains information such as description, point type, and issued points.

  • LoyaltyRewardPointEntryType - used as extensible enumeration class for describing different point types. The default types are None, Earn, and Redeem.

  • LoyaltyTier - describes a tier within a loyalty program; contains information such as the tier id and level.

  • PointBasedLoyaltyTier - extends the Loyalty tier class to describe a points-based tier; contains a property to indicate the amount of points required to reach the tier.

  • RewardPointType - indicates what can or cannot be done with a collection of points. The default values are Redeemable and NotRedeemable.

To extend any of these default entities,  you create a new class that inherits from the relevant type, and then patch the relevant entity under <commerce.Entities> in the Sitecore.Commerce.LoyaltyPrograms.config file.

There are seven pipelines for loyalty cards that allow most basic functionality.

For example:

  • The GetLoyaltyCards, GetLoyaltyCardTransactions, and getLoyaltyProgramStatus pipelines - used to get loyalty card information.

  • The getLoyaltyPrograms and getLoyaltyProgram pipelines - used to get program information.

  • The joinLoyaltyProgram pipeline - used to join a customer to a loyalty program.


For more information, see the Commerce Connect Developer Reference.