# Discovery sets

Chapter 9 of the Decant user guide.

A discovery set lets a shopper choose scents from a rack of paper strips and buy them together at one price. Picking a scent dips its strip in its family's tint, and a vial fills on the tray beside it. The tray says how many are left to choose, and shows the exact words that will go in the bag. On phones the tray becomes a short dock at the bottom of the section.

The set is one product with a variant for each size, priced per set, so no discount app is needed.

## Set it up

1. **Create the product.** Add a product such as "Discovery set". Add an option called **Size** with values `Set of 3`, `Set of 5` and `Set of 8`, and give each variant its price. The set size is the first whole number in the value, so keep the count first: `Set of 5`, or `5 scents`.
2. **Tag it** `discovery-set`, or the tag you've chosen in **Theme settings › Discovery set**.
3. **Give it the template.** Set its **Theme template** to `product.discovery-set`.
4. **Make a collection of the scents to choose from.** The rack leaves out sets and anything on `product.goods`, so **all products** works if everything that isn't a scent is on that template. A collection of scents is tidier, and it sets the order of the rack.
5. **Open the template.** In the theme editor, open the set's product page, select the **Discovery set** section and choose your collection in **Scents to choose from**.

A product with the tag shows no size line and no price per ml anywhere, so a set is never described in millilitres. If you call the option something other than Size, type its name in **Set size option name**.

To put the builder on your home page or another page too, add a **Discovery set** section there and choose your product as the **Set product**. The presets' home page sections need this: with no **Set product**, shoppers see nothing there.

## Settings

| Setting | Default | What it does |
| --- | --- | --- |
| Eyebrow | "Discovery set" | |
| Heading | "Pick the scents, we fill the vials" | |
| Intro | "Three, five or eight 1 ml samples in one box, one price…" | Rewrite this to match your sizes |
| Set product | | Blank on a product template uses that product |
| Set size option name | Size | The option that holds the set sizes. With no match, the first option is used. |
| Scents to choose from | | The collection, in its own order |
| Scents to show | 12 | 6 to 24 |
| Most of one scent | 2 | 1 to 3. 1 turns each stepper into add and remove. |
| Show scent images | On | Uses each product's first image. Turn off for plain paper strips. A scent with no image keeps the plain strip. |
| Cart property name | Samples | The label on the bag line, at checkout and on the order |
| Credit line | | A line under the button. See below. |
| Background | Panel | **Page**, **Panel** or **Surface** |

## How it behaves

* **Stock is counted on the set, not on the scents.** Selling a Set of 5 reduces the set variant's stock and doesn't touch the five scents. Track the set's stock, and keep an eye on what's in your vials yourself.
* **Each scent's name** links to its product page, in a new tab, so a shopper can read about it without losing their picks.
* **Images** are hidden on phones narrower than 360px, where they would squeeze the names. The small strips in the bag use the scents' images either way.
* **Sold-out scents** show "Sold out", a greyed strip and no stepper. If every scent is sold out, the section says "All scents are sold out for now."
* The set itself, any other product with the tag and anything on the `product.goods` template are left out of the rack. If that leaves nothing, shoppers don't see the section, and the theme editor shows the sample and says why.
* **Add to bag** is disabled until the set is exactly full, and its label tells the shopper what's left: "Add 2 more", then "Add set to bag · $28.00".
* **Switching to a smaller set** keeps the shopper's choices and asks them to take some out: "6 of 5. Take out 1 to fit this set."

## What you get on the order

The set is one line in the bag and on the order, with the scents as a line property:

`Samples: Fig Leaf · 2× Smoked Vetiver · Tonka Smoke`

Fill the order from that line. In the bag the line also shows up to eight small strips with the scents' images.

## The tag and the gate

**The tag is what keeps an empty set out of the bag.** A set added without the section would have no scents on it, so a product with the tag can only be bought from the Discovery set section. Everywhere else it's a link or it doesn't show:

| Where | What a tagged product does |
| --- | --- |
| Its own product page | No variant picker, no sticky bar and no accelerated checkout. The buy box shows a **Choose your scents** button that jumps to the section. |
| Product cards | A link to its page, with no quick add or quick view |
| Quick view | A link to its page |
| Layering sets | A link to its page |
| Quick order list | Not shown |

If the tag is missing, the section warns you in the theme editor, because the product's own page and cards could then sell the set with no scents on it. If a tagged product has no working section on its page, because it isn't on the template or no collection is chosen, shoppers see "This set can't be filled on this page yet. Get in touch and we'll take your order.", with a link to your contact page if you have one at `/pages/contact`. So check the page once you've set it up.

## The credit line and your discount code

**Credit line** prints a sentence under the button, such as "Your set price comes off your first full bottle." It's only words. **The theme doesn't create a code, send a code or take anything off an order. If you make that offer, you must create the discount yourself** and get the code to each buyer. Don't turn the line on until you have.

Here's a recipe that works within Shopify's rules. Amount-off codes hold one fixed amount, and your sets cost different amounts, so **create one code for each set size**. In Shopify admin, for each size:

1. Go to **Discounts**, click **Create discount** and choose **Amount off products**.
2. Under **Method**, choose **Discount code**, and use **Generate code** for one that's hard to guess.
3. Under **Value**, choose **Fixed amount** and enter that set's price, such as `28.00`.
4. Under **Applies to**, choose **Specific products** and select **only the full-bottle variants**, not whole products or a collection. Your 1 ml and your 50 ml are variants of one product, so a whole product or a collection would also discount the sample, and a $28 credit would make a $6 sample free. Shopify lets a code apply to specific variants.
5. Check **Only apply discount once per order**. Without it, the amount comes off every eligible item, so two bottles would get double the credit.
6. Under **Eligibility**, choose **Customer segments** and add a segment of customers who've bought the set. Create it first under **Customers › Segments**, with the products purchased filter and your set product. Without this, anyone who has the code can use it.
7. Under **Maximum discount uses**, check **Limit to one per customer**. Shopify tracks this by email address or phone number.
8. Under **Combinations**, leave everything unticked unless you want the credit to stack with other discounts.
9. Under **Active dates**, set an end date if your offer has one, and say so in the credit line. With no end date, the code doesn't expire.
10. Click **Save**, then test it: try the code with a sample in the bag, where it shouldn't apply, and then with a full bottle.

Then get the right code to each buyer. The simplest way is a printed card in the parcel, which suits a shop that packs by hand. You can also email it, or add it to the order confirmation in **Settings › Notifications**.

Know these limits before you promise anything:

* **Segments work by product, not by variant.** All three codes can go to the same segment, but it can't tell a Set of 3 buyer from a Set of 8 buyer. Give each buyer only their own code.
* **Segment discounts need an existing customer.** A shopper is only in the segment after their set order is complete, and at checkout they're identified by a valid email address or phone number, so they must use the one from their set order.
* **Fixed amounts are created in your store's default currency** and converted at checkout at the current rate. A shopper in another market gets close to what they paid, not always the same figure. You can limit a code to one market under **Eligibility** instead, but a discount has one eligibility type, so then it can't also use a segment.
* **Codes are entered at checkout,** not in the bag. A shopper using Shop Pay must log in to Shop Pay before the discount field appears.
* **Keep the credit below your bottle prices.** An order can't go below zero, so any amount above the bottle's price is lost.

If that's more than you want to manage, make a simpler promise: one code for one flat amount, such as your cheapest set's price, and a line that says so: "$18 off your first full bottle." Or leave **Credit line** empty, and nothing shows.
