You are here:
Create Cart Action
In a B2B Commerce Checkout flow, create 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 Create Cart. To
access this action from REST API, use the name createCart.
Set Input Values
Use values from earlier in the flow to set the inputs.
| Input Parameter | Description |
|---|---|
| Web Store ID | The ID of the web store. |
| Cart Input | This input is an Apex-defined variable of class ConnectApi.CartInput, which includes these fields:
|
Store Output Values
Use output values later in the flow. The values are assigned when the cart is created.
| Output Parameter | Description |
|---|---|
| Cart Summary | This output is an Apex-defined variable of class ConnectApi.CartSummary, which includes these fields:
|
Error Conditions
| Error Condition | Description |
|---|---|
The user doesn’t have access to create a cart. |
Error Message: You don't have access to this cart. If possible, contact the admin for this web store. Error Code: INSUFFICIENT_ACCESS_OR_READONLY HTTP Status Code: 400 |

