Cloning Bundle Line Items on the Cart
This method allows you to clone the primary bundle line items along with option line items and child line items (if applicable) on the Cart. This API is invoked when you click Clone action icon next to a bundle product on the Cart.
API | Signature |
---|---|
cloneBundleLineItems | webService static Apttus_CPQApi.CPQ.CloneLineItemsResponseDO cloneBundleLineItems(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. You must pass the value Apttus_Config2__LineNumber_c field instead of Apttus_Config2__PrimaryLineNumber_c to clone bundles. |
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 sample, you can clone the primary bundle line items after you configure your products, add the attributes, configure your options and arrive on the cart. This API accepts the Cart ID and the primary bundle and option line item numbers. In the form of 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 products using addBundle
or addMultiProducts API, you can invoke this API in order to clone the bundle and 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.
API Prerequisites
- Creating a Cart from a Quote
- Adding Products to a Cart OR Adding a Bundle to a Cart
- Updating Price For A Cart
Response/Request XML
Example Request
Example Response