---
schema_version: "1"
id: fb290ec4ef99bca4ba208d26999a38bf6caa6a925afe5c82a994c453a8132d47
title: Create Follow-on Order API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-create-follow-on-order.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-create-follow-on-order.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: deb98db808af7b934606ec5e93e573c4ea5fa630d6c05fb91017baa68294bf31
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Create Follow-on Order API

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:

```nolang
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);
```

## Example Request

```nolang
{
  "methodName": "createFollowOnOrder",
  "cartId": "8016g000000L59EAAS"
}
```

## Example Response

```nolang
{
  "result": {
    "totalSize": 1,
    "records": [
      {
        "uiStates": {
        },
        "nameResult": {
        },
        "messages": [
        ],
        "fields": {
          "followOnOrderId": "8015e000000pLAfAAM",
          "Id": "8015e000000p0j7AAA"
        },
        "displaySequence": -1,
        "actions": {
        }
      }
    ],
    "name": null,
    "messages": [
    ]
  }
}
```
