Read-only view over a promotion's stored configuration properties - entry codes, discount and gift settings, quiz and upload options, and qualifying product categories - loaded from the reward.properties file held against the reward. Produced by PromotionService.promotionDetails and consumed by cart pricing, checkout rules and points rule evaluation to decide whether and how a promotion applies.
Properties
| Property | Returns | Description |
|---|---|---|
| allowAnon | boolean | Whether anonymous (not logged in) users are allowed to enter this promotion. |
| backgroundImage | String | Path or URL of the background image configured for this promotion. |
| details | String | Free-text details configured for this promotion. |
| enterable | boolean | Whether this promotion can currently be entered, ie whether either quiz entry or user upload entry is enabled. |
| maxCartCost | Integer | Maximum cart cost a cart may have to still qualify for this promotion. |
| maxToGift | Integer | Maximum quantity of the free gift a single cart can receive under this promotion. |
| minCartCost | Integer | Minimum cart cost a cart must reach to qualify for this promotion. |
| productCategories | String | Raw, comma-separated product category names configured for this promotion, used for form promotions. |
| productCategoriesList | List<String> | Product category names configured for this promotion, used for form promotions, split from the raw comma-separated getProductCategories value. |
| promoCategoryCodes | String | Raw, delimiter-separated category codes that qualify a cart for this promotion. |
| promoDiscountAmount | BigDecimal | Discount amount applied by this promotion, when isPromoDiscountEnabled is true. |
| promoDiscountEnabled | boolean | Whether this promotion applies a discount. |
| promoEntryCodes | String | Raw, delimiter-separated entry codes for this promotion. If set, a user must enter one of these codes to activate the promotion. |
| promoGiftEnabled | boolean | Whether this promotion gives a free gift item. |
| promoGiftSku | String | SKU code of the free gift product given by this promotion, when isPromoGiftEnabled is true. |
| promoProductCodes | String | Raw, delimiter-separated product codes that qualify a cart for this promotion. |
| qualifyingCategories | String | Raw, comma-separated names of the product categories that qualify a cart item for this checkout promotion. |
| qualifyingCategoriesList | List<String> | Names of the product categories that qualify a cart item for this checkout promotion, split from the raw comma-separated getQualifyingCategories value. |
| quizEnabled | boolean | Whether participants can enter this promotion by completing a quiz. |
| quizHtml | String | The promotion's quiz content, rendered from the configured quizHtml MVEL template. Computed once and cached. |
| rewardId | long | Database ID of the promotion (Reward) these details belong to. |
| selectOrg | boolean | Whether the entrant is required to select an organisation when entering this promotion. |
| selectOrgType | String | The organisation type the entrant must select from, when isSelectOrg is true. |
| selectProduct | boolean | Whether the entrant is required to select a product when entering this promotion. |
| storeName | String | Name of the store this promotion applies to. |
| userUploadEnabled | boolean | Whether participants can enter this promotion by uploading content. |
| userUploadMessage | String | Message shown to the user when uploading content for this promotion, rendered from the configured userUploadMessage MVEL template. Computed once and cached. |
Methods
getRewardId() · reward() · getUserUploadMessage() · isUserUploadEnabled() · isQuizEnabled() · getQuizHtml() · getDetails() · isAllowAnon() · isSelectOrg() · isEnterable() · getSelectOrgType() · getProductCategories() · getStoreName() · getPromoProductCodes() · getPromoCategoryCodes() · getPromoEntryCodes() · isPromoDiscountEnabled() · getPromoDiscountAmount() · isPromoGiftEnabled() · getPromoGiftSku() · getMaxToGift() · getMaxCartCost() · getMinCartCost() · getProductCategoriesList() · isSelectProduct() · getBackgroundImage() · getQualifyingCategories() · getQualifyingCategoriesList()
getRewardId()
Returns: long
Database ID of the promotion (Reward) these details belong to.
reward()
Returns: Reward
The promotion (Reward) these details belong to.
getUserUploadMessage()
Returns: String
Message shown to the user when uploading content for this promotion, rendered from the configured userUploadMessage MVEL template. Computed once and cached.
isUserUploadEnabled()
Returns: boolean
Whether participants can enter this promotion by uploading content.
isQuizEnabled()
Returns: boolean
Whether participants can enter this promotion by completing a quiz.
getQuizHtml()
Returns: String
The promotion's quiz content, rendered from the configured quizHtml MVEL template. Computed once and cached.
getDetails()
Returns: String
Free-text details configured for this promotion.
isAllowAnon()
Returns: boolean
Whether anonymous (not logged in) users are allowed to enter this promotion.
isSelectOrg()
Returns: boolean
Whether the entrant is required to select an organisation when entering this promotion.
isEnterable()
Returns: boolean
Whether this promotion can currently be entered, ie whether either quiz entry or user upload entry is enabled.
getSelectOrgType()
Returns: String
The organisation type the entrant must select from, when isSelectOrg is true.
getProductCategories()
Returns: String
Raw, comma-separated product category names configured for this promotion, used for form promotions.
getStoreName()
Returns: String
Name of the store this promotion applies to.
getPromoProductCodes()
Returns: String
Raw, delimiter-separated product codes that qualify a cart for this promotion.
getPromoCategoryCodes()
Returns: String
Raw, delimiter-separated category codes that qualify a cart for this promotion.
getPromoEntryCodes()
Returns: String
Raw, delimiter-separated entry codes for this promotion. If set, a user must enter one of these codes to activate the promotion.
isPromoDiscountEnabled()
Returns: boolean
Whether this promotion applies a discount.
getPromoDiscountAmount()
Returns: BigDecimal
Discount amount applied by this promotion, when isPromoDiscountEnabled is true.
isPromoGiftEnabled()
Returns: boolean
Whether this promotion gives a free gift item.
getPromoGiftSku()
Returns: String
SKU code of the free gift product given by this promotion, when isPromoGiftEnabled is true.
getMaxToGift()
Returns: Integer
Maximum quantity of the free gift a single cart can receive under this promotion.
getMaxCartCost()
Returns: Integer
Maximum cart cost a cart may have to still qualify for this promotion.
getMinCartCost()
Returns: Integer
Minimum cart cost a cart must reach to qualify for this promotion.
getProductCategoriesList()
Returns: List<String>
Product category names configured for this promotion, used for form promotions, split from the raw comma-separated getProductCategories value.
isSelectProduct()
Returns: boolean
Whether the entrant is required to select a product when entering this promotion.
getBackgroundImage()
Returns: String
Path or URL of the background image configured for this promotion.
getQualifyingCategories()
Returns: String
Raw, comma-separated names of the product categories that qualify a cart item for this checkout promotion.
getQualifyingCategoriesList()
Returns: List<String>
Names of the product categories that qualify a cart item for this checkout promotion, split from the raw comma-separated getQualifyingCategories value.