---
schema_version: "1"
id: a275856cf45b9882a18b880d873655c81edbeac465c9c5c159734ced8d3afb2f
title: Delete Cart Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_comm_actions_delete_cart.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_comm_actions_delete_cart.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ecb74a5e30dabd47918dcd2929d9a62affc3572eaaf79442e4859e813208a478
description: In a B2B Commerce Checkout flow, delete a cart.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Delete Cart Action

In a B2B Commerce Checkout flow, delete a cart.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note Cart actions aren’t available in flows for B2B stores built on an Aura template. To build a B2B Commerce Checkout flow for an Aura store, see [B2B Commerce Checkout Flow (Aura)](https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-setup-checkout-flow.html).

In Flow Builder, add an Action element to your flow. Select the **Commerce** category, and search for **Delete Cart**. To access this action from REST API, use the name `deleteCart`.

## Set Input Values

Use values from earlier in the flow to set the inputs.

 
| Input Parameter | Description |
| --- | --- |
| **Cart State or ID** | ID of the cart or state of the cart to delete. Valid state values are: active and current. A current cart is neither closed nor pending deletion. |
| **effectiveAccountId** | (Optional) ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context. |
| **Web Store ID** | ID of the web store associated with the cart. |

## Store Output Values

Output values aren’t available for this action.

## Error Conditions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:17.513134851138354%">
          <col style="width:82.48686514886164%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d56512e138">Error Condition</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d56512e141">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d56512e138 ">
              <p style="margin-bottom:0;">The user doesn’t have access to the cart.</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d56512e141 ">
              <p>Error Message: You don't have access to this cart. If possible, contact the admin for
                this web store.</p>
              <p>Error Code: INSUFFICIENT_ACCESS_OR_READONLY </p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

          </tr>
        </tbody>
      </table>