Campaign/Coupon Code Locks
Campaign/Coupon Code Locks allow a code which has a restricted number of available uses to be locked against a basket, so that while the basket transaction is in progress the code cannot be fully utilized by any other basket transaction.
Getting StartedTo enable Campaign/Coupon Code Locks, update the setting Coupon Code Locks Enabled to have a value of True.
Once enabled, code locking will be used for all code validations where the code has a restricted maximum number of uses.
When are code locks used?
When a basket is validated and the Qixol Promo Engine establishes that one or more promotion will utilize a code in the basket, the Qixol Promo Engine will:
- Look to see if the code has a restricted number of uses. If the code uses are not restricted, code locking is not required.
- Where code locking is required, establish if the code is available to be utilized based on the number of confirmed uses and active locks.
- Where the basket is not confirmed, and where the code is available to be utilized - record a lock against the code and calculate an expiration time based on the setting Coupon Code Lock Release Time [minutes]. If the lock already exists from a previous submission of the basket, the lock is updated with an expiration time calculated from the current date/time.
- Where the basket is confirmed, release the lock created for this basket and capture the code utilization.