Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Replace Offer in Cart Invocable Action

          Replace Offer in Cart Invocable Action

          Use this action to replace an existing offer in a cart containing a single valid offer with a corresponding single offer. The existing offer is disconnected and a new offer is added to the cart. Offers are modeled as products in Salesforce. For example, your existing customer wants to upgrade their limited phone plan to a new plan with unlimited data, text, and talk. As a sales rep, you want to ensure that their existing phone service isn't interrupted and their phone number remains the same. With this action, you can move this customer to an unlimited plan, guaranteeing the continuity of service and retaining the same mobile number and email address.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Unlimited, and Developer Editions

          Industries CPQ API Used to Invoke Replace Offer in Cart Invocable Action

          • getCartsTargetOffers
          • replaceOffers

          Input Values

          Parameter description data type
          cartId The ID of the quote or order record where you want to replace the offer. String
          offerId The ID of the target product that you want to upgrade. String
          validate Optional. A Boolean value that indicates whether to validate the configuration of the line item before replacing the line item. The default value is true. Boolean
          price Optional. A Boolean value that indicates whether to recalculate the price based on a new offer. The default value is true. Boolean

          Output Values

          Parameter description data type
          output A JSON string that includes the details of the replace offer action. String
          error An error that's encountered during the execution of the action. String

          Example

          JSON Request

          {
            "CartId":"801Dn000000vRGGIA2",
            "Targetofferid": "01uDn000001AfECIA0"
          }

          JSON Response Body

          {
            "messages": [
              {
                "message": "Replacement applied successfully",
                "severity": "INFO",
                "code": "830"
              }
            ]
          }
           
          Loading
          Salesforce Help | Article