Use this action to add a product as either a quote line item to a quote or an order product to an order in the cart. For example, a sales rep can use this action to add 10 units of fiber broadband to a quote to fulfill a customer's request.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
Industries CPQ API Used to Invoke Add Product to Cart Invocable Action
- postCartsItems
Input Values
| Parameter | description | data type |
|---|---|---|
| cartId | The ID of the quote or order record that you want to associate line items with. | String |
| itemId | The ID of the price book entry that you want to add to a quote or product. | String |
| noResponseNeeded | Optional. A Boolean value that indicates whether a response is required. The default value is false. | Boolean |
| quantity | Optional. The quantity of items to add. The default value is 1. | Integer |
| validate | Optional. A Boolean value that indicates whether to validate the configuration of the line item before adding the line item. The default value is true. | Boolean |
| price | Optional. A Boolean value that indicates whether to update the price of the line item before adding the item. The default value is true. | Boolean |
Output Values
| Parameter | description | data type |
|---|---|---|
| error | An error that's encountered during the execution of the action. | String |
| result | A message indicating whether the product was added to the cart. | String |
Limitations
Out-of-the-box, you cannot add optional products under a root child in a cart.
Example
JSON Request
cartId = (801DX000000DctNYAS)
itemId = (01uDX000000Z5kLYAS)
JSON Response Body
result (null)
cartErrorMessage (Required attribute missing for 2 GB 30 Days.)
error (null)