Cloning Option Line Items on the Cart
This method allows you to clone the option line items and child line items (if applicable) on the Cart. This API is invoked when you click Clone action icon next to an option product on the Cart.
API |
Signature |
---|---|
cloneOptionLineItems |
webService static Apttus_CPQApi.CPQ.CloneLineItemsResponseDO cloneOptionLineItems(Apttus_CPQApi.CPQ.CloneLineItemsRequestDO request) |
Request Parameter | ||
---|---|---|
Name |
Type |
Description |
Request | Apttus_CPQApi.CPQ.CloneLineItemsRequestDO |
This is the request data object. |
Request Data Object – Apttus_CPQApi.CPQ.CloneLineItemsRequestDO | ||
---|---|---|
Name |
Type |
Description |
Cart ID | ID |
The Id of the cart. |
PrimaryLineNumber | Integer |
The line numbers of the primary line items which have to be cloned using this API. Note:
This API works only if you provide different primary line numbers. If the same line number is passed multiple times, only one clone line number will be created. |
Response Data Object – Apttus_CPQApi.CPQ.CloneLineItemsResponseDO | ||
---|---|---|
Name |
Type |
Description |
OriginalToCloneMap | List<Apttus_CPQApi.CPQ.IntegerMapDO> |
The list of primary line item numbers. |
Response Data Object – Apttus_CPQApi.CPQ.IntegerMapDO | ||
---|---|---|
Name |
Type |
Description |
mapItem.Key | Integer |
The line item numbers of the source primary line item from which new line items are cloned using this API. |
mapItem.Value | Integer |
The line item numbers of the cloned line items. |
Code Sample
Using the below code sample, you can clone the option line items after you configure
your bundle products, add the attributes and arrive on the cart. This API accepts the
Cart ID and the option line item numbers, and clones these line items. In the form of
the response, this API provides the original line items in the
mapItem.Key
parameter and the newly cloned line items in the
mapItem.Value
parameter.
For example, once you configure your cart by adding option products using addoptions API, you can invoke this API in order to clone the option line items on the cart at any of the following:
- After the product is added on the Cart.
- Before making changes to pricing of the products.
- After updating the cart pricing using updatePriceForCart API.
Integration Details
Use the following information in your integrations with CPQ Web Services API. Refer to Integrating Conga with External Systems for information on how to get started.