You are here:
Get Cart Promotions Action
In B2B Commerce Checkout flow, get promotions associated with a cart.
Required Editions
| Available in: Lightning Experience |
| View supported editions. |
In Flow Builder, add an Action element to your flow. Select the
Commerce category, and search for Get Cart
Promotions. To access this action from REST API, use the name getCartPromotions.
Set Input Values
Use values from earlier in the flow to set the inputs.
| Input Parameter | Description |
|---|---|
| Cart ID | The ID of the cart owned by the user. |
| Effective Account ID | (Optional) The ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context. |
| User ID | The ID of the buying user who owns the cart. |
| Web Store ID | The ID of the store associated with the cart. |
Store Output Values
Use output values later in the flow. The values are assigned when the item is created.
| Output Parameter | Description |
|---|---|
| Cart Promotions | An Apex ConnectApi.CartPromotionCollection record that includes a collection of line items in a cart. |
Error Conditions
| Error Condition | Description |
|---|---|
A required parameter hasn't been specified. |
Error Message: You must specify a value for the {0} parameter. <!--Where 0 is the API name of the parameter that requires input.--> Error Code: REQUIRED_FIELD_MISSING HTTP Status Code: 400 |
The specified ID is invalid. |
Error Message: Something's not right with the ID "{0}" specified for the {1} parameter. Check it and try again. <!--Where 0 is the invalid ID, and 1 is the API name of the input parameter with the invalid ID.--> Error Code: INVALID_INPUT HTTP Status Code: 400 |
The specified effective account ID is invalid for the account or guest buyer profile. |
Error Message: The ID "{0}" specified for the {1} parameter isn't a valid {2} record. <!--Where 0 is the specified ID, and 1 is the API name of the parameter with the specified ID, and 2 is the name of the valid record type.--> Error Code: INVALID_TYPE HTTP Status Code: 400 |
The specified store or cart doesn’t exist. |
Error Message: We couldn't find a record with the ID "{0}" specified for the {1} parameter. Check the record and try again. <!--Where 0 is the ID of the record that doesn't exist, and 1 is the parameter that the ID was specified for–> Error Code: RECORD_NOT_FOUND HTTP Status Code: 400 |

