The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

Remove a Promotion from a Basket

The DeleteServices configuration setting determines whether line items are deleted. Setting DeleteServices to No prevents line items from being deleted while setting DeleteServices to Yes allows line items to be deleted.

If there is an asset on which a promotion is already applied and you convert that asset into a basket using assetToBasket operation, and if you want to remove the existing promotion (whose Action is Change) from this basket, then in the request payload you must make the following changes for the promotion cancellation to take effect:

Rest End Point :: POST /v3/catalogs/{CATALOGCODE}/basket/{CartContextKey}?context={"accountId":"02i4P000009ion5QAA”}&isloggedin=true

In addition, when deleting a promotion from a basket, the following parameters are available:

  • basketAction = The action to perform, such as DeleteFromBasket.

  • offer = promotion code to delete.

  • appliedAction: The action of the applied promotion (Apply, Add, or Existing).

  • bundleContextKey: The bundle context key from which a child product needs to be deleted. If a basket includes multiple promotions of the same type applied to a similar product object, include the bundleContextKey parameter in the delete promotion call. This parameter is supported by CME Winter '20 and later releases.

  • cancellationDate: The cancellation date for a promotion in the case of a MACD order.

  • cancellationReason: The reason for the cancellation of the promotion in the case of MACD order.

The following is an example of removing a promotion from a basket: