---
schema_version: "1"
id: 481281655096f884cfc4380da20aed556aa1ba7caab7551ca0855a59f836eaed
title: Export Data When Suspending and Voiding Carts
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/retail-cloud/guides/export-data-when-suspending-voiding-carts.md
canonical_url: https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-data-when-suspending-voiding-carts.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a579f51b82bfe7384e909fe59bb9d0ea25bc60631e81db6f647f3756264a266d
products:
  - Point of Sale for Developers
  - Salesforce APIs
---
# Export Data When Suspending and Voiding Carts

By integrating with Point of Sale webhook APIs, merchants can export real-time data when a cart is voided or suspended in the POS app. This data includes details like product information, pricing, fulfillment methods, and more. You can store this information for loss prevention (LP) audits.

For details of the data structure and example values in the request and response payloads, refer to [Point of Sale API, SPI, and Webhook Overview](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/retail-cloud-api-spi-webhook-specs.html).

## Configure Void Cart Webhook

When configured, this webhook triggers in various scenarios, both manually and automatically. For manual scenarios, an example is when a store associate voids the cart via a deep link. Automatically, the webhook triggers when a cart experiences an idle timeout, displaying the error message, `Idle time limit exceeded and the cart has been voided.` The payload for the voided cart is empty, indicating the cart's expired status. For a complete list of scenarios that trigger the void cart webhook and their associated reason codes, refer to [Void Cart Webhook Scenarios and Reason Codes](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-data-when-suspending-voiding-carts.html#void-cart-webhook-scenarios-and-reason-codes).

For more information on voiding a cart on the POS app, refer to [Configuring and Customizing Cart Options on the Point of Sale App](https://help.salesforce.com/s/articleView?id=commerce.rt_pos_settings_custom_cart_options.htm&type=5) in _Salesforce Help_.

1.  In CMS, go to **Integrations** | **Custom Connectors**.

2.  Click **Create**.

3.  For Connector Type, select **Webhook**.

4.  For Endpoint Name, select **VOID_CART**.

5.  Configure the rest of the fields and save your changes.

![The CMS shows settings for void cart data export.](https://developer.salesforce.com/docs/media/retail-cloud/rt-pos-orders-process-export-suspend-void-data-void-webhook-settings.png)

### Void Cart Webhook Scenarios and Reason Codes

For automatically voided carts, a system-generated [reason code](https://help.salesforce.com/s/articleView?id=commerce.rt_cms_settings_reason_codes.htm&type=5) is included. Depending on the scenario, the payload can also contain product details. System-generated reason codes include the prefix `SYS`.

<table>
<col />
<col />
<thead>
  <tr>
    <th>
      Scenario
    </th>
    <th>
      Reason Code
    </th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>
      Customer logs out with items in the cart
    </td>
    <td>
      SYS_CUSTOMER_LOGOUT
    </td>
  </tr>
  <tr>
    <td>
      Cart session time expires (as set by
      <code>cartSessionExpiryDurationInSeconds</code>
      )
    </td>
    <td>
      SYS_CART_EXPIRED
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Last item in a sales, returns, or bundle product is removed from the cart
      </p>
    </td>
    <td>
      SYS_LAST_ITEM_REMOVED
    </td>
  </tr>
  <tr>
    <td>
      Switching from online to offline mode
    </td>
    <td>
      SYS_SWITCHED_TO_OFFLINE
    </td>
  </tr>
  <tr>
    <td>
      Phase two fails and the order is not placed
    </td>
    <td>
      SYS_ORDER_FAILED
    </td>
  </tr>
  <tr>
    <td>
      Associate logs out manually or via a timer in offline mode
    </td>
    <td>
      SYS_ASSOCIATE_LOGOUT
    </td>
  </tr>
  <tr>
    <td>
      Switching from offline to online mode with return items
    </td>
    <td>
      SYS_SWITCHED_TO_ONLINE
    </td>
  </tr>
  <tr>
    <td>
      Starting a return when there are already canceled or edited items in the cart
    </td>
    <td>
      SYS_VOID_TO_START_RETURN
    </td>
  </tr>
  <tr>
    <td>
      Clicking <b>Void Cart</b> manually without reason codes configured
    </td>
    <td>
      No reason code is sent
    </td>
  </tr>
  <tr>
    <td>
      Clicking <b>Cash Pickup</b>, <b>No Sale</b>, or <b>Cash Audit</b> deep links with items in cart
    </td>
    <td>
      SYS_CASH_EVENT
    </td>
  </tr>
  <tr>
    <td>
      Editing an order with items already in the cart
    </td>
    <td>
      SYS_VOID_TO_START_EDIT_ORDER
    </td>
  </tr>
</tbody>
</table>

## Configure Suspend Cart Webhook

When configured, this webhook triggers in two scenarios: when the store associate manually suspends the cart via a deep link or when the associate logs outs.

For more information about suspending a cart on the POS app, refer to [Suspend and Resume Carts](https://help.salesforce.com/s/articleView?id=commerce.rt_pos_orders_process_suspend_cart.htm&type=5) in _Salesforce Help_.

1.  In CMS, go to **Integrations** | **Custom Connectors**.

2.  Click **Create**.

3.  For Connector Type, select **Webhook**.

4.  For Endpoint Name, select **SUSPEND_CART**.

5.  Configure the rest of the fields and save your changes.

![The CMS shows settings for a webhook to export data for suspended cart.](https://developer.salesforce.com/docs/media/retail-cloud/rt-pos-orders-process-export-suspend-void-data-suspend-webhook-settings.png)

## Repost Webhooks

Point of Sale offers the ability to manually repost failed webhook events.

1.  In CMS, go to **Store Management** | **Reporting and Analytics** | **Repost Failed Webhook Events**.

2.  Search for the failed webhook event by configuring the search query parameters.

3.  Click **View Details** to view the details of the payload inside the selected webhook event.

4.  Click **Repost** to manually trigger a webhook event repost.

## Frequently Asked Questions (FAQs)

**What's the difference between `suspendCartId` and `cartID` for a suspended cart?**

The `suspendCartId` is a Globally Unique Identifier (GUID) specifically used to resume a suspended cart. In contrast, the `CartID` follows the format of an `orderID`, which it's converted to if the transaction is completed rather than suspended.
