Promotions
On this page
Use standard promotions to give customers a discount when they enter a promo code at checkout. A promotion is built from three records: the Promotion holds the code and the schedule, one or more Promotion Actions decide what the discount does, and optional Promotion Scopes decide which products and customers qualify.
One promo code applies to each order. The discount is added to the order as a single line item that totals every reduction the code produced, using a product named StoreConnect Promotion that the managed package installs. Do not edit or delete that product.
For offers that depend on what is in the cart, such as a spend threshold or a tiered spend and save, use Promotions v2 instead.
Before you begin
- Confirm the fields below are on your page layouts. See Page layouts, profiles and permissions sets.
- Decide the scope first. A promotion with no scope records applies to every active product for every customer.
Create the promotion
- Go to the Promotions list and select New.
- Enter a Promotion Name. This name appears at checkout when the promotion applies.
- Select the Store. A promotion belongs to one store.
- Enter the Promotion Code the customer types at checkout. Codes must be unique within the store, and matching is not case sensitive, so
SPRING20andspring20are the same code. - Set Starts At to the date and time the code becomes usable. Use a time in the past to activate it immediately. A promotion with no Starts At never applies.
- (Optional) Set Expires At. Leave it blank to run the promotion until you remove it.
- (Optional) Set a Usage Limit. The limit counts orders that used the code. Leave it blank for unlimited use.
- (Optional) Select a Campaign. Contacts who use the code are added to that Salesforce campaign as members.
- Select Save.
The promotion now exists but reduces nothing until it has at least one action.
Add promotion actions
An action defines what the discount does. A promotion can have several, and their reductions add together into the single discount line.
- On the Promotion record, go to the Promotion Actions related list and select New.
-
Choose an Action.
Action What it does Apply discount to each scoped item Reduces every cart item that is in scope Apply discount to entire order if it includes a scoped item Reduces the order total once, if any item is in scope Buy one get another scoped item at discount Reduces every second occurrence of the same in-scope product Free Shipping Reduces the shipping cost to zero Discounted Shipping Reduces the shipping cost by the amount or percentage set - (Optional) Set a Qualifying Quantity to require a minimum number of in-scope items before the action applies.
-
Choose a Calculation Type, then fill in the field it needs.
Calculation Type Field to complete Discount Percentage Discount Percentage Discount Amount Discount Amount, and Discount Points Amount for a points price Dynamic Amount Dynamic Discount Amount, and Dynamic Discount Points Amount for a points price - Select Save.
Calculate an amount with Liquid
Dynamic Amount takes a Liquid expression that returns the discount value, so the reduction can vary per item or per order. The expression has promotion, promotion_action, and cart_item available. An expression that fails returns a discount of zero rather than an error.
This gives $5 off each in-scope item, or $8 off when the customer buys three or more of it:
```liquid
{% if cart_item.quantity >= 3 %}8{% else %}5{% endif %} ```
Scope the promotion
A Promotion Scope narrows who and what qualifies. Scoping works in two directions at once, so it is worth being deliberate:
- Within one scope record, every field you set must match. Setting Brand and Category on one record means products of that brand in that category.
- Across several scope records, any one matching is enough. Add a second record to widen the offer to another brand or another group of customers.
| Field | Includes |
|---|---|
| All fields empty | Every active product and every customer |
| Brand | Products whose Brand lookup is this brand |
| Category | Products in this category and all its subcategories |
| Product | This product and all of its variants |
| Price Book | Products priced in this price book |
| Membership | Contacts on accounts holding this membership |
| Account | Contacts on this account |
| Contact | This contact only |
| Conditions | Cart items matching a Liquid expression |
:::note
A validation rule named Only_One_Selected allows a single field per scope record. Deactivate it in Salesforce Setup if you need to combine fields on one record, for example a brand and a category together.
:::
Narrow a scope with Liquid
The Conditions field takes a Liquid expression evaluated per cart item, with promotion, promotion_scope, and cart_item available. Write one expression per line, and every line must be true for the item to qualify.
This restricts a promotion to items with a quantity of two or more:
```liquid
cart_item.quantity >= 2 ```
Confirm the promotion works
- Open your store in a private browser window and add a qualifying product to the cart.
- Go to checkout and enter the promo code in the Promo Codes panel.
- Confirm the code appears under Applied codes and the discount line appears in the order totals.
After an order is placed, Promotion Credit records are created on it, one per action that applied. Each records the promotion, the action, the code used, the calculation type and amount, and the total discounted, which is what usage reporting counts.
What standard promotions cannot do
- Apply without a code. Use a Promotion v2 or a discount.
- Combine two promo codes on one order.
- Change a subscription’s renewal amount. The discount is a separate order line, so renewals are charged the full period price. See Subscription products.
- Apply to products excluded from promotions. See Exclude products from price reductions.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.