# Action - Liquid Tag Reference

Source: https://support.storeconnect.com/articles/action-tag-reference · Last modified 21 August 2026

The `action` simple tag triggers a server-side action from within a Liquid controller. Use it to run cart, promotion, and pricebook operations inline, without wrapping content in a block.

## Syntax


```liquid

{% action "cart.add", product_identifier: product.sfid, quantity: 2 %}
```


| Property | Value |
|----------|-------|
| **Tag Name** | `action` |
| **Type** | Simple tag |
| **Source** | StoreConnect |

The first argument is the action name. Remaining arguments are named parameters passed to that action. Actions run inside Liquid controllers (the `before`, `after`, or `final` controller positions), not in page templates.

## Available actions

| Action | Purpose | Key parameters |
|--------|---------|----------------|
| `cart.select` | Make an existing resumable cart the current cart | `cart_identifier` |
| `cart.create` | Create a new empty cart and make it current | — |
| `cart.clone` | Copy an existing cart's eligible items into a new cart | `cart_identifier` |
| `cart.add` | Add a product to the current cart | `product_identifier`, `quantity`, `price`, `override_price` |
| `cart.update` | Change the quantity or price of a cart item | `cart_item`, `quantity`, `price`, `override_price` |
| `cart.remove` | Remove a cart item | `cart_item` |
| `cart.empty` | Remove all items from the current cart | — |
| `shipping.set` | Set the shipping name and price on the current cart | `name`, `price` |
| `pricebook.set` | Set the active pricebook for the session | `pricebook_id` |
| `pricebook.clear` | Clear the session pricebook | — |
| `promotion.apply` | Apply a promo code to the current cart | `code` |
| `promotion.remove` | Remove a specific promo code | `code` |
| `promotion.clear` | Remove all coupon promotions from the cart | — |


## cart.clone

Clones an existing cart's eligible items into a brand-new cart and makes that new cart the current cart. This is useful for re-order flows and quote duplication. Cart cloning is a developer feature, it is not exposed as a button in the default webstore theme.


```liquid

{% action "cart.clone", cart_identifier: order.cart.sfid %}
```


### Requirements

- **A logged-in shopper is required.** The action reads the current login to set the new cart's contact and account. If there is no current login, the clone is skipped and an error is added to the session.
- **The source cart must belong to the current store.** The cart is looked up on the current store by Salesforce ID or SC ID.

### Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `cart_identifier` | Yes | The Salesforce ID or SC ID of the source cart to clone. |

### What gets copied

A new web cart is created against the logged-in shopper's contact and account, and each eligible item from the source cart is added to it. An item is **excluded** from the clone when any of the following is true:

- The product is neither purchasable nor quote-requestable.
- There is not enough inventory to cover the item's quantity.
- The product is bookable (for example, an appointment or class).
- The item is part of a bundle (bundle products are not currently cloned).

### Result

- **Some or all items copied** — the new cart becomes the current cart. Any excluded items are simply left out of the new cart.
- **No items could be copied** — the action fails, an error is added to the session, and the original current cart is left unchanged.

:::warning
When only some items are excluded, the clone still succeeds and the excluded items are omitted silently — the shopper is not automatically shown which items were dropped. If you need to inform the shopper, compare the source cart and the new cart in your Liquid and render your own message.
:::

## Description

The `action` tag runs the named server-side operation and updates session state (such as the current cart) accordingly. Errors and warnings raised by an action are added to the session and can be surfaced through your theme's flash or notice handling.

See [Manage multiple carts per customer](manage-multiple-carts-per-customer) for the shopper-facing context around cart selection and cloning.

---

## Follow StoreConnect

- [Email Newsletter](https://getstoreconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://getstoreconnect.com/partners)
- [News](https://getstoreconnect.com/articles/news)
- [Events](https://getstoreconnect.com/articles/events)
- [Feature Comparison](https://getstoreconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://getstoreconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

---

StoreConnect Support — https://support.storeconnect.com/articles/action-tag-reference