---
schema_version: "1"
id: 2ccd7020d3972cf0d397984fc30b283a80d19e6d10967ff1aea1488f14921a9a
title: Get Cart Promotions 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_get_cart_promotions.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_comm_actions_get_cart_promotions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7d7860dfb272e83ab3d77d03e536649db54b905b6957f83f6798b8b5e4c7aca5
description: In B2B Commerce Checkout flow, get promotions associated with a cart.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Get Cart Promotions Action

In B2B Commerce Checkout flow, get promotions associated with 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 **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](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_cart_promotion_collection.htm) record that includes a collection of line items in a cart. |

## 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="d224356e159">Error Condition</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d224356e162">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e159 ">
              <p style="margin-bottom:0;">A required parameter hasn't been specified.</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e162 ">
              <p>Error Message: You must specify a value for the {0} parameter. &lt;!--Where 0 is the API
                name of the parameter that requires input.--&gt; </p>
              <p>Error Code: REQUIRED_FIELD_MISSING </p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e159 ">
              <p style="margin-bottom:0;">The specified ID is invalid.</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e162 ">
              <p>Error Message: Something's not right with the ID "{0}" specified for the {1} parameter.
                Check it and try again. &lt;!--Where 0 is the invalid ID, and 1 is the API name of the
                input parameter with the invalid ID.--&gt; </p>
              <p>Error Code: INVALID_INPUT</p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e159 ">
              <p style="margin-bottom:0;">The specified effective account ID is invalid for the account or guest buyer profile.</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e162 ">
              <p>Error Message: The ID "{0}" specified for the {1} parameter isn't a valid {2} record.
                &lt;!--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.--&gt;</p>
              <p>Error Code: INVALID_TYPE</p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e159 ">
              <p style="margin-bottom:0;">The specified store or cart doesn’t exist. </p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d224356e162 ">
              <p>Error Message: We couldn't find a record with the ID "{0}" specified for the {1}
                parameter. Check the record and try again. &lt;!--Where 0 is the ID of the record that
                doesn't exist, and 1 is the parameter that the ID was specified for–&gt;</p>
              <p>Error Code: RECORD_NOT_FOUND</p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

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