dw.order
Class GiftCertificateMgr

The GiftCertificateMgr class contains a set of static methods for
interacting with GiftCertificates.
Constants
GC_ERROR_DISABLED
:
String = "GIFTCERTIFICATE-100"
Indicates that an error occurred because the Gift Certificate
is currently disabled.
Deprecated:
Use GiftCertificateStatusCodes instead.
GC_ERROR_INSUFFICIENT_BALANCE
:
String = "GIFTCERTIFICATE-110"
Indicates that an error occurred because the Gift Certificate
does not have a sufficient balance to perform the requested
operation.
Deprecated:
Use GiftCertificateStatusCodes instead.
GC_ERROR_INVALID_AMOUNT
:
String = "GIFTCERTIFICATE-140"
Indicates that an error occurred because the Gift Certificate
Amount was not valid.
Deprecated:
Use GiftCertificateStatusCodes instead.
GC_ERROR_INVALID_CODE
:
String = "GIFTCERTIFICATE-150"
Indicates that an error occurred because the Gift Certificate
ID was not valid.
Deprecated:
Use GiftCertificateStatusCodes instead.
GC_ERROR_PENDING
:
String = "GIFTCERTIFICATE-130"
Indicates that an error occurred because the Gift Certificate
has been fully redeemed.
Deprecated:
Use GiftCertificateStatusCodes instead.
GC_ERROR_REDEEMED
:
String = "GIFTCERTIFICATE-120"
Indicates that an error occurred because the Gift Certificate
has been fully redeemed.
Deprecated:
Use GiftCertificateStatusCodes instead.
Properties
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
static createGiftCertificate(amount
:
Number, code
:
String)
:
GiftCertificate
Creates a Gift Certificate.
static createGiftCertificate(amount
:
Number)
:
GiftCertificate
Creates a Gift Certificate.
static getGiftCertificate(giftCertificateCode
:
String)
:
GiftCertificate
Returns the Gift Certificate identified by the specified gift certificate code.
static getGiftCertificateByCode(giftCertificateCode
:
String)
:
GiftCertificate
Returns the Gift Certificate identified by the specified gift certificate code.
static getGiftCertificateByMerchantID(merchantID
:
String)
:
GiftCertificate
Returns the Gift Certificate identified by the specified merchant ID.
static redeemGiftCertificate(paymentInstrument
:
OrderPaymentInstrument)
:
Status
Redeems an amount from a Gift Certificate.
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.
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.
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.
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.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Method Detail
createGiftCertificate
Creates a Gift Certificate. If a non-empty Gift Certificate code is specified, the code will be used to create
the Gift Certificate. Be aware that this code must be unique for the current site. If it is not unique, the Gift
Certificate will not be created.
Parameters:
amount
-
the amount of the gift certificate. Must not be negative or zero.
code
-
the code for the new gift certificate. If parameter is null or empty , the system will assign a code to the new gift certificate.
Returns:
the newly created Gift Certificate.
createGiftCertificate
Creates a Gift Certificate. The system will assign a code to the new Gift Certificate.
Parameters:
amount
-
the amount of the gift certificate. Must not be negative or zero.
Returns:
the newly created Gift Certificate.
getGiftCertificate
Returns the Gift Certificate identified by the specified
gift certificate code.
Deprecated:
Parameters:
giftCertificateCode
-
to identify the Gift Certificate.
Returns:
the Gift Certificate identified by the specified code or null.
getGiftCertificateByCode
Returns the Gift Certificate identified by the specified
gift certificate code.
Parameters:
giftCertificateCode
-
to identify the Gift Certificate.
Returns:
the Gift Certificate identified by the specified code or null.
getGiftCertificateByMerchantID
Returns the Gift Certificate identified by the specified merchant ID.
Parameters:
merchantID
-
to identify the Gift Certificate.
Returns:
the Gift Certificate identified by the specified merchant ID or null.
redeemGiftCertificate
Redeems an amount from a Gift Certificate. The Gift Certificate ID
is specified in the OrderPaymentInstrument and the amount
specified in the PaymentTransaction associated with the
OrderPaymentInstrument. If the PaymentTransaction.getTransactionID()
is not null, the value returned by this method is used as the
'Order Number' for the redemption transaction. The 'Order Number' is
visible via the Business Manager.
Parameters:
paymentInstrument
-
the OrderPaymentInstrument containing the ID of the Gift Certificate to redeem, and the amount of the redemption.
Returns:
the status of the redemption operation.