Add a Promotion to a Basket

There are two ways in your order capture journey that you can apply/add a promotion when you create or update your cart:

  • Choose a promotion using getOffers and add it to the basket. The product to which the promotion applies is added to the basket by default. The promotion is applied to the product.

  • Add a product and then apply a promotion to it.

Adding a promotion to a basket is a two-step process if Multi Transaction Service (MTS). To enable MTS, see CPQ Configuration Settings Reference.

For example:

Step 1: Create the order Item and apply the promotion:

Step 2: In the response of Step1, under the validateAndPriceAction node in the JSON response, a REST parameter named transactionKey is present. Add that transaction key in the request body to make the request for Step 2.

Create the order Item and apply a promotion:

During the second step, the engine applies validation and pricing to the basket and returns an updated cartContextKey.