dw.campaign
Class CouponMgr
Object
dw.campaign.CouponMgr
Manager to access coupons.
Constants
MR_ERROR_INVALID_SITE_ID  :  String = "MASKREDEMPTIONS_SITE_NOT_FOUND"
Indicates that an error occurred because a valid data domain cannot be found for given siteID.
Properties
coupons  :  Collection  (Read Only)
All coupons in the current site in no specific order.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
static getCoupon(couponID : String) : Coupon
Returns the coupon with the specified ID.
static getCouponByCode(couponCode : String) : Coupon
Tries to find a coupon for the given coupon code.
static getCoupons() : Collection
Returns all coupons in the current site in no specific order.
static getRedemptions(couponID : String, couponCode : String) : Collection
Returns list of CouponRedemptions for the specified coupon and coupon code, sorted by redemption date descending (i.e.
static maskRedemptions(siteID : String, email : String) : Status
Mask customer email address in coupon redemptions for the given siteID and email address
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
getCoupon
static getCoupon(couponID : String) : Coupon
Returns the coupon with the specified ID.
Parameters:
couponID - the coupon identifier.
Returns:
Coupon with specified ID or null

getCouponByCode
static getCouponByCode(couponCode : String) : Coupon
Tries to find a coupon for the given coupon code. The method first searches for a coupon with a fixed code matching the passed value. If no such fixed coupon is found, it searches for a coupon with a system-generated code matching the passed value. If found, the coupon is returned. Otherwise, the method returns null.
Parameters:
couponCode - The coupon code to get the coupon for.
Returns:
The coupon with the matching coupon code or null if no coupon was found.

getCoupons
static getCoupons() : Collection
Returns all coupons in the current site in no specific order.
Returns:
Coupons in current site

getRedemptions
static getRedemptions(couponID : String, couponCode : String) : Collection
Returns list of CouponRedemptions for the specified coupon and coupon code, sorted by redemption date descending (i.e. last redemption first). Usually, there should only either be 0 or 1 redemption. But if a coupon and code is removed and recreated and re-issued later, there might be multiple such redemption records. Returns an empty list if no redemption record exists in system for the specified coupon and code.
Parameters:
couponID - The coupon id to find redemption for.
couponCode - The coupon code to find redemption for.
Returns:
A sorted list of CouponRedemptions for the specified coupon and coupon code or an empty list if no redemption record exists.

maskRedemptions
static maskRedemptions(siteID : String, email : String) : Status
Mask customer email address in coupon redemptions for the given siteID and email address
Parameters:
siteID - the site ID
email - the customer email address
Returns:
The status of the masking result

β™₯
Notifications pending to read