Skip to main content

Export and import your product matching with a spreadsheet

Download the products, variants and collections connected to every answer as a CSV file, edit them in Excel or Google Sheets, and import them into the same quiz or another one.

Written by Traian

Product matching is how your quiz knows what to recommend: each answer is connected to the products, variants and collections it should recommend or exclude. Product Matching explains how it works.

With a big catalog, setting this up answer by answer takes a long time. You can export the whole quiz's product matching to a spreadsheet, edit it in Excel or Google Sheets, and import it back. The same file also copies your product matching from one quiz to another.

Export your product matching

  1. Open your quiz in the Quiz Builder and go to the Products step.

  2. In the Spreadsheet card on the left, click Export.

A CSV file named after your quiz is downloaded. It has one row for every answer in the quiz, with everything connected to that answer.

If a product, variant or collection connected to an answer no longer exists in your store, it's left out of the file, and a message tells you how many were left out.

What's in the file

The first row holds the column names. Each row after it is one answer:

  • Question: the question's text.

  • Type: single, multiple, dropdown or dropdown multiple. It's only used when you create new questions from the file (see the last section).

  • Answer: the answer's text.

  • Products: the products this answer recommends, by their handle. The handle is the last part of the product's web address: for yourstore.com/products/night-cream, it's night-cream. When you type products in yourself, a SKU or the whole product page URL works too.

  • Variants: the variants this answer recommends, by their SKU. A variant without a SKU is written as its product's handle followed by ?variant= and the variant's number, for example night-cream?variant=4412345678. How to Recommend the Correct Product Variant explains when to connect variants instead of products.

  • Collections: the collections this answer recommends, by their handle. Can I link entire collections to my quiz? explains how collections work in a quiz.

  • Match all products: yes when the answer has Match All turned on, so it matches every product. How does the match all feature work? has the details.

  • Excluded products, Excluded variants and Excluded collections: what this answer removes from the results, written the same way as the three columns above. What are Excluded Products? explains exclusions.

  • Exclude all products: yes when the answer has Exclude All Other turned on.

  • Weight: how strongly this answer counts toward its products, a whole number from 0 to 10000. 100 is the default. What are answer weights? explains how weights change the order of your results.

When an answer has more than one product, variant or collection, they're separated by a | (vertical bar), for example night-cream | day-cream.

If you've turned on separate recommendations for returning customers, those aren't part of the file. Set them up on the Products page.

Edit the file

Open the file in Excel or Google Sheets and change what you need. When you import it, Lantern finds each question and answer in your quiz by its text, so keep the Question and Answer columns exactly as they are in the quiz. Upper and lower case don't matter.

  • To remove everything from one list, empty the cell. For example, an empty Excluded products cell removes all excluded products from that answer.

  • To leave a part of your product matching alone, delete its whole column. A file with only Question, Answer and Products changes the products and nothing else.

  • To leave an answer alone, delete its row. Answers that aren't in the file keep their product matching.

  • An empty Weight cell keeps the answer's current weight.

When you're done, save the file as CSV. In Excel, choose File > Save As and pick CSV UTF-8. In Google Sheets, choose File > Download > Comma-separated values (.csv).

Import the file

  1. Open your quiz in the Quiz Builder and go to the Products step.

  2. In the Spreadsheet card, click Import.

  3. Click Choose a CSV file, or drop the file onto the box.

  4. Check the preview, then click Update answers. The button shows how many answers will change.

Like every change in the Quiz Builder, the new product matching is saved to your draft. Publish the quiz to make it live.

Check the preview

Nothing changes in your quiz until you click Update answers. The preview tells you how many answers in how many questions will be updated, and warns you about:

  • Things that weren't found in your store: no product, variant or collection has that handle or SKU. The answers are still updated, without them. A SKU that's on two variants can't be told apart, so use the ?variant= form for those.

  • Rows that don't match your quiz: the quiz has no question or answer with that text. The warning gives the row number as it appears in your spreadsheet.

  • Questions with the same text: if two questions in your quiz have exactly the same text, Lantern can't tell which one a row is for, so those rows are skipped. Make the questions' text different, or set them up on the Products page.

  • Values that couldn't be read: a Match all or Exclude all cell that isn't yes or no, or a weight that isn't a whole number from 0 to 10000. That setting stays as it is.

Copy product matching to another quiz

  1. Export the product matching from the quiz you want to copy.

  2. Open the other quiz, go to the Products step and import the same file.

This works when the other quiz has questions and answers with the same text, for example a copy of the first quiz made with Duplicate Quiz.

If the other quiz doesn't have those questions yet, the same file can create them: in the Quiz Builder, click Add Page, select Import from a Spreadsheet and choose the file. The questions are added with all their product matching. Import questions and answers from a spreadsheet explains that import step by step.

To copy a whole quiz, design included, to another store, use Import-Export Quizzes instead. If you do import a product matching file into another store, its products, variants and collections are found by handle and SKU, so they need the same handles and SKUs there. Variants written with ?variant= only work in the store they came from.

If you have any questions, contact our support team and we'll be happy to help!

Did this answer your question?