Loading
Salesforce now sends email only from verified domains. Read More
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
          Create Follow-on Order API

          Create Follow-on Order API

          The createFollowOnOrder API is invoked when customers want to capture a change to an inflight order after the inflight order has reached the Point of No Return (PONR).

          In CPQ, you can create and submit a follow-on order for Order Management to fulfill. The follow-on order captures changes with respect to the order it is following. The changes can be:

          • Add a new order item, product, or promotion.

          • Remove an existing product or promotion.

          • Modify an order item that was part of the previous order, such as changes to an attribute.

          • Change an existing product line item, such as configuration, price, adjustments, and promotions.

          • Modify the order header data.

          • Disconnect the order item that was added or modified in the original order.

          A follow-on order is queued until the original order is fulfilled (activated), then automatically submitted. The actual submission of the follow-on order happens through the Apex job that is scheduled from the Queued Orders tab.

          The createFollowOnOrder API is only invoked for orders, not quotes or opportunities.

          Invocation

          REST calls for this API are not supported. There are no REST API endpoints for this API.

          Remote Method

          This method is available through the standard remote endpoint.

          Apex

          This API is exposed from the CpqAppHandler class. For example:

          Id ordId = '8016g000000L4yG';
          String methodName = 'createFollowOnOrder';
          Map<String, Object> inputMap = new Map<String, Object> {
              'cartId' => ordId
          };
          Map<String, Object> outputMap = new Map<String, Object>();
          Map<String, Object> optionsMap = new Map<String, Object>();
          
          CpqAppHandler handler = new CpqAppHandler();
          handler.invokeMethod(methodName, inputMap, outputMap, optionsMap);

          Request

          Here is a sample request:

          {
            "methodName": "createFollowOnOrder",
            "cartId": "8016g000000L59EAAS"
          }

          Response

          Here is a sample response:

          
          {
            "result": {
              "totalSize": 1,
              "records": [
                {
                  "uiStates": {
                    
                  },
                  "nameResult": {
                    
                  },
                  "messages": [
                    
                  ],
                  "fields": {
                    "followOnOrderId": "8015e000000pLAfAAM",
                    "Id": "8015e000000p0j7AAA"
                  },
                  "displaySequence": -1,
                  "actions": {
                    
                  }
                }
              ],
              "name": null,
              "messages": [
                
              ]
            }
          }            
                      
           
          Loading
          Salesforce Help | Article