Sample allowance
The first few samples in every order free, or a fixed amount off each, applied automatically at checkout. Set once in the app, shown next to every sample button and on the cart page.
A store that gives away the first few samples sells more full-size orders than one that charges for every chip. The sample allowance makes that a rule instead of a discount code: per order, the first X sample units are free, or Y off each, applied on its own at checkout as the automatic discount Sample allowance. Nothing for the shopper to type.
Setting it up
Open Samples, then Settings, and find the Sample allowance card. Tick Give customers a sample allowance at checkout, then:
- First X samples free or First X samples at a discount: the first sample units cost nothing, or a fixed amount comes off each.
- Sample units per order: how many sample units the allowance covers, counted across the whole order in cart order (up to 50).
- Amount off each sample: in the discount mode, the amount taken off each of those units.
- Trade customer tag and Trade sample units: customers carrying the tag get their own quantity. Leave the units blank for the same allowance as everyone else; enter 0 and trade customers get no free samples.
- Message: the line shown next to the sample buttons and as the discount name at checkout. Leave it blank and the app writes one from the settings ("First 3 samples free", "$2.00 off your first 3 samples").
- Sample groups that do not count: tick a sample group to leave its samples out of the allowance. Those samples stay full price.
Save. The app creates the automatic discount, or updates it, and the card reads Automatic discount active with a link to it in Discounts. Turning the allowance off deactivates the discount, and so does turning sample tracking off: the allowance needs the catalog index that marks which variants are samples.
The permission step
The allowance is a Shopify discount, so the app needs permission to write discounts. A store that installed the app before the allowance existed has not granted it yet. In that case saving shows a banner on the card, The discount needs a permission. Open the app from Shopify admin to grant it. Open the app from the Apps menu in your Shopify admin, approve the permission when Shopify asks, come back to the card and click Retry. Your settings were saved either way; the discount switches on once the permission is there, and the app also retries on its own every ten minutes. The Samples page shows the same notice until it is done.
What the shopper sees
- Next to every sample button: the allowance line under the sample button in the buy boxes and under the quick-add button on product cards: your message, or "First 3 samples free". A trade customer sees their own quantity. Each block has a Show the sample allowance line setting to turn it off.
- On the cart page: the Sample allowance banner block shows how many of the free samples the cart has used. Add it in the theme editor on the cart template. Its four lines are settings, with
{used},{left},{total}and{amount}replaced: none in the cart yet ("Add up to 3 samples free"), some used ("1 of 3 free samples used"), all used ("All 3 free samples used"), and the amount-off line ("$2.00 off each of your first 3 samples (2 in your cart)"). Pick a neutral bordered or an accent filled tone, the colours, font size and margins. It refreshes as the shopper changes quantities, and it shows nothing while the allowance is off. - At checkout: Shopify's own discount line, named with your message.
Cart drawers
The banner block goes on the cart page only; a cart drawer cannot host it. A drawer gets a paste-in with the same count instead. Open the drawer's snippet in your theme code, paste this where the banner should sit, set cpc_total to your sample units per order (the metafield namespace below is the app's own and does not change):
{%- assign cpc_total = 3 -%}
{%- assign cpc_used = 0 -%}
{%- for cpc_item in cart.items -%}
{%- if cpc_item.variant.metafields['app--440843436033--calculator'].sample_group.value != blank -%}{%- assign cpc_used = cpc_used | plus: cpc_item.quantity -%}{%- endif -%}
{%- endfor -%}
<div class="cpc-banner cpc-banner--neutral">{{ cpc_used | at_most: cpc_total }} of {{ cpc_total }} free samples used</div>It refreshes with whatever re-renders the drawer. Two limits, because a theme file cannot read the app's settings: it counts every sample in the cart, including samples from groups you excluded from the allowance, and it shows the one total you typed, not a trade customer's quantity. Keep the number in step with the app's settings when you change them.
The rules
- Counted per order, in cart order. The first units from the top of the cart are covered; a line with three of one sample uses three, and a line only partly covered gets the discount on the covered part.
- Guest checkouts get the allowance too. No account or code is needed.
- It combines with your other automatic discounts and discount codes, including the trade pricing from our B2B Onboarding & Wholesale app.
- Trade customers (the tag you set) get their own quantity. Blank means the same as everyone else; 0 means none.
- Only samples in the groups that count are eligible. A sample from an excluded group is charged at full price.
- A sample is recognised by the mark the catalog index writes on its variant, so a sample product added today becomes eligible once the next index runs (every night, or Index now on the Samples page).
Samples
Link samples to full-size products, track each shopper from the sample order to the full-size order, and write customer tags your email and SMS flows can use.
Connect Klaviyo
Send the sample journey events to Klaviyo so you can build a sample follow-up flow that stops when the shopper buys, win back lapsed samplers, and treat repeat samplers differently.