Salesforce B2C Commerce 23.5 > B2C Commerce API > B2C Commerce Pipelets > Basket (deprecated)
Pipelet AddCouponToBasket
Deprecated. Do not use this pipelet. Use the AddCouponToBasket2 pipelet instead.
Validates the supplied coupon code and, if the coupon code is valid, applies them to the basket.
While applying the coupon code the pipelet adds a new CouponLineItem to the basket based on the supplied coupon code. The coupon code gets set at the CouponLineItem.
A coupon code can be invalid because of the following reasons:

In this case, no CouponLineItem is added to the basket and the pipelet returns to the error connector. The returned "Status" object contains the details of why the coupon was invalid. Status: The status object representing the result of the operation. The status property (Status.status) will be set to 0 if the coupon was successfully applied or 1 otherwise. The code property (Status.code) will be set to one of the following values:
Deprecated:
Deprecated. Do not use this pipelet. Use the AddCouponToBasket2 pipelet instead.
Group:
Basket (deprecated)
Flags:
Error Connector
Transaction Required
Input Parameters
CouponCode  :  String (Required)
The code of the coupon to add.
Basket  :  LineItemCtnr (Required)
The basket to add the coupon to.
Output Parameters
CouponLineItem  :  CouponLineItem  :  (Optional)
The newly created coupon line item.
Status  :  Status  :  (Required)
DEPRECATED
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.