Adding Options to a Bundle
This adds one or more Options Products to a Bundle product.
API | Signature |
---|---|
addOptions | webService static Apttus_CPQApi.CPQ.AddOptionsResponseDO addOptions(Id cartId, Integer lineNumber, List selectedOptions) |
Request Parameters | ||
---|---|---|
Name | Type | Description |
CartID | ID | The cart ID |
lineNumber | Integer | Line Number of the Bundle Product |
selectedOptions | List<Apttus_CPQApi.CPQ.SelectedOptionDO> | List of Options |
Data Object - Apttus_CPQApi.CPQ.SelectedOptionDO | ||
---|---|---|
Field | Type | Description |
AttributeValues | List | List of attributes values. |
Comments | String | Comments associated with the record. |
ComponentId | ID | Id of the component. |
ComponentProductId | ID | Id of the component product. |
CustomData | Apttus_Config2__LineItem__c | The values to be set for the custom fields in the CustomFields List |
CustomFields | List<String> | List of Custom Field’s API Name |
EndDate | Date | The end date. |
Quantity | Decimal | The option quantity. |
SellingTerm | Decimal | The option selling term. |
SourceId | ID | ID of the source option. |
StartDate | Date | The start date. You should ensure you use the correct date format. |
Code Sample
Using the sample below you can dynamically add options to a bundled product that the user selects in the cart line item. For example, if the user selects a bundled product, Laptop, in the cart line item you can fetch the configured options for that selected product using the addoptions API. In the sample below, for a selected product you initially fetch the productID. Using the retrieve option groups API getOptionGroupsForPriceListProduct, you can check whether the selected product has option groups associated. If an option group is associated, fetch the option components and create a list comprising the CPQ.SelectedOptionDO. Invoke the addoptions API and pass the cartID, productID, and the list CPQ.SelectedOptionDO.
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.
Response/Request XML
Example Request
Example Response