Coupons policies

Current version: 10.2

The Commerce Engine encompasses extensible services that enable you to customize commerce functionality.

Note

Do not extend or inherit from out-of-the-box policies; instead, create your own. You can change the values in a policy by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined and then re-running Bootstrap.

The following policies can be configured through the Coupons plug-in.

Policy

Description

Properties / Default Values

GlobalCouponsPolicy

Defines global settings for coupons.

  • GeneratedCouponCodeLength – defines number of characters that the coupon code can have.

  • MaxCouponCodeLength – maximum length of a coupon before it is rejected though validation; default = 30 (integer).

  • MaxCouponPrefixLength – maximum length of the coupon’s prefix; default = 10 (integer).

  • MaxCouponSuffixLength – maximum length of the coupon’s suffix; default = 10 (integer).

  • MaxNumberOfPrivateCoupons – maximum number of coupons to generate at one time; default = 1000 (integer).

  • MinPrivateCouponTotal – minimum number of private coupons; default = 1 (integer).

  • MinAllocationCount – minimum number of coupons to allocate; default = 1 (integer).

MaxCouponCodeLength \ 30

MaxCouponPrefixLength \ 10

MaxCouponSuffixLength \ 10

GeneratedCouponCodeLength  \ 6

MaxNumberOfPrivateCoupons \ 1000

MinPrivateCouponTotal \ 1

MinAllocationCount \ 1

KnownCouponActionsPolicy

Defines the names of the coupon entity view actions.

AddCoupon \ "AddCoupon"

RemoveCoupon \ "RemoveCoupon"

AddPrivateCoupon \ "AddPrivateCoupon"

AddPublicCoupon \ "AddPublicCoupon"

NewAllocation \ "NewAllocation" DownloadCouponCodes \ "DownloadCouponCodes"

KnownCouponsListsPolicy

Defines the names of the coupons transient and entity index lists.

PromotionCoupons \ "Promotions-{0}-Coupons"

AllocatedCoupons \ "Promotion-{0}-AllocatedCoupons"

UnallocatedCoupons \ "Promotion-{0}-UnallocatedCoupons"

PublicCoupons \ "Promotion-{0}-PublicCoupons"

PrivateCouponGroups \ "Promotion-{0}-PrivateCouponGroups"

KnownCouponViewsPolicy

Defines the names of the coupons entity views.

PublicCoupons \ "PublicCoupons"

PrivateCoupons \ "PrivateCoupons"

CouponDetails \ "CouponDetails"

Coupons \ "Coupons"

AllocationDetails \ "AllocationDetails"

Allocations \ "Allocations"

LimitUsagesPolicy

Defines how many times a coupon can be use.

LimitCount \ 1

CartCouponsPolicy

Defines a policy for the CartCoupons component:

  • MaxCouponsInCart – maximum # of coupons allowed in the cart; default = 5 (integer).

Do you have some feedback for us?

If you have suggestions for improving this article,