Skip to main content

Create a quiz and import product matching from a CSV file

Upload quiz questions, answers and product matching to Lantern using a CSV file.

Written by Traian

You can include everything in one file, or upload your questions and answers first and add product matching separately. You can also export existing product matching, edit it in Excel or Google Sheets, and import your changes.
​
Importing questions adds them to the quiz you have open, so you can use a CSV file to build a new quiz or add questions to an existing one. Your existing quiz design stays unchanged.

Step 1. Prepare your CSV file

1.1 Open your quiz in the Quiz Builder.

1.2 Click Add Page > Import from a Spreadsheet.

1.3 Click Download template.

1.4 Open the downloaded template in Excel or Google Sheets and fill in your questions, answers, and product matching.

The template contains two example questions you can replace with your own. The first row contains the column names, which can appear in any order. Each row below it contains one answer.

Questions and answers

Use these columns to create your questions:

  • Question (required): The question text. Repeat the same text for each answer belonging to that question. Rows with the same question text become one question.

  1. Type: Use single, multiple, dropdown or dropdown multiple. Leave it blank for a single-choice question. Lantern reads this value from the question’s first row.

  2. Answer (required): The answer text.

dropdown and dropdown multiple create single-choice and multiple-choice questions that show their answers in a dropdown list instead of buttons. If the same answer appears on multiple rows within a question, its matched products are combined. This lets you list one product per row if preferred.

Single-choice questions can also show their answers as stops on a slider, so customers slide to the answer that fits. Find out how in Slider answers: let customers slide between your answers.

You can include product matching in the same file. If you prefer, upload your questions and answers first, then add product matching later.

Image showing a CSV template in Google Sheets with quiz questions, answers, product matching, exclusions, and answer weights.

Product matching

Product Matching controls which products, variants and collections each answer recommends or excludes.

Use these columns to include product matching:

  • Products: Product handles, such as night-cream. A handle is the last part of a product’s URL. For example, the handle in https://yourstore.com/products/night-cream is night-cream. You can also enter a SKU or a full product URL.

  • Variants: Variant SKUs. For a variant without a SKU, use the product handle followed by ?variant= and the variant ID. For example: night-cream?variant=4412345678.

  • Collections: Collection handles.

To enter several items in one cell, separate them with a vertical bar (|):

night-cream | day-cream
​
You can also find a product’s handle in your Shopify admin: go to Products, open the product and look under Search engine listing.

A product SKU works when it identifies exactly one product in your store. If multiple products share the SKU, use their handles instead.

Excluded products, variants and collections

Use Excluded products, Excluded variants and Excluded collections to list the items an answer excludes.

Enter them in the same format as the Products, Variants and Collections columns.

See What are Excluded Products? for more information.

Match All and Exclude All Other

  • Match all products: Use yes to enable Match All, or no to turn it off.

  • Exclude all products: Use yes to enable Exclude All Other, or no to turn it off.

See How does the match all feature work? for more information.

Answer weights

The Weight column sets the answer’s weight. Enter a whole number from 0 to 10000. When creating questions, leave it blank to use the default weight of 100.

Budget questions

The Price from and Price to columns are used for budget questions.
​
Check out this article to find out more about budget questions.

Step 2: Save the file as CSV

  • Excel: Go to File → Save As and select CSV UTF-8.

  • Google Sheets: Go to File → Download → Comma-separated values (.csv).

Step 3: Import your questions and answers

3.1 Open your quiz in the Quiz Builder.

3.2 Click Add Page and select Import from a Spreadsheet.

Image showing the Lantern Quiz Builder with Add Page opened, Import from a Spreadsheet selected, and the Choose a CSV file button highlighted.

3.3 Choose your CSV file and review the preview.

Lantern shows the questions and answers it found in the file.

3.4 Click Import [X] questions.

Image showing the import preview in Lantern after a CSV file is uploaded, with the detected questions listed and the “Import 2 questions” button highlighted.


Lantern adds the new questions after your existing questions, before the opt-in page if your quiz ends with one. The Quiz Builder then opens the first imported question.

If you included product matching, it is added too.

Image showing the Lantern Products step after importing quiz questions, with matched products and answer weight displayed.


​If you uploaded only questions and answers, you can set up product matching in the Products step or import it separately.

Imported questions can be edited like any other question. Changes are saved to your draft and go live when you publish your quiz.

The CSV file does not include the quiz’s design, images, Logic Jumps or Dynamic Content Blocks. Configure these separately in the Quiz Builder.

If the import would exceed your plan’s question limit, you’ll be asked to upgrade before importing.

Check the question import preview

Nothing is added until you click Import [X] questions. The preview shows each question’s type and answers, how many products were found, and any warnings:

  • Products were not found: The answers are imported without those products. Correct the file and upload it again before importing, or connect the products afterwards.

  • Rows were skipped: Each row needs both a question and an answer. The warning identifies the spreadsheet row.

  • A question type could not be read: The question is imported as single choice.

  • An answer weight could not be read: The answer receives the default weight.

Optional: update product matching for existing questions

Steps 4–6 explain how to export, edit and reimport product matching. Use these steps if you want to change matching for questions already in your quiz.

Step 4: Export existing product matching

Exporting gives you a spreadsheet of your quiz’s current product matching. You can edit the file or use it to copy product matching to another quiz.

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

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

Image showing the Lantern Products step with the Spreadsheet section and Export button highlighted for downloading product matching as a CSV file.


Lantern downloads a CSV file named after your quiz. It contains one row for each answer, with its product matching settings.

Products, variants or collections that no longer exist in your store are left out. Lantern shows a message with the number left out.

Please note: Separate recommendations for returning customers are not included.

Step 5: Add or edit product matching in your spreadsheet

5.1 Open your CSV file in Excel or Google Sheets.
When importing product matching into existing questions, Lantern uses the Question and Answer text to find each answer. Keep this text the same as it appears in your quiz. Capitalisation doesn't matter.
​
The Type column is only used when creating questions. It is not used when updating product matching.

5.2 Edit the cells for the items you want to change.

Image showing an exported product matching CSV file in Google Sheets, with existing product matches and empty cells ready for editing.


​To remove all items from a list, clear its cell. For example, clearing an Excluded products cell removes all excluded products from that answer.

5.3 Keep existing settings that don't need modifying

  • Keep a setting unchanged: Delete its column from the file. For example, a file with only Question, Answer and Products updates only the matched products.

  • Keep an answer unchanged: Delete its row. Answers not included in the file keep their current product matching.

  • Keep an answer’s weight unchanged: Leave its Weight cell blank.

5.4 Save the edited file as CSV.

Step 6: Import new product matching into existing questions

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

6.2 In the Spreadsheet card, click Import.

6.3 Click Choose a CSV file, or drag the file into the upload box.

6.4 Review the preview and any warnings.

6.5 Click Update answers. The button shows how many answers will be updated.

Image showing the Import product matching window in Lantern, first with the Choose a CSV file button, then with a CSV file uploaded, a summary showing 5 answers in 3 questions will be updated, and the Update 5 answers button.

This updates product matching for existing answers. To create new questions and answers, use Add Page → Import from a Spreadsheet instead.

Product matching changes are saved to the quiz’s draft. Publish the quiz to apply them to the live quiz.

Check the product matching import preview

The preview shows how many questions and answers will be updated. Nothing changes until you click Update answers.


You may see the following warnings.

Products, variants or collections were not found

Lantern could not find an item using the handle or SKU in your file. The answer will still be updated, but that item will not be included.

If two variants have the same SKU, use the product handle and variant ID instead:

night-cream?variant=4412345678

A question or answer was not found

The Question or Answer text does not match anything in the quiz. The warning shows the row number from your spreadsheet.

Check the text against your quiz before importing.

Questions have the same text

If two questions have identical text, Lantern cannot tell which question the row belongs to. Those rows are skipped.

Give the questions different text, or edit their product matching directly in the Products step.

A setting could not be read

The Match all products and Exclude all products columns must contain yes or no. Weight must be a whole number from 0 to 10000.

If a value is not valid, that setting keeps its current value.

Add answers to one existing question

If you only need to add answers to a choice question, you can paste a list without importing a CSV file:

  1. Open the question and click Add answers from a list.

  2. Paste your answers, one per line. You can copy a column directly from a spreadsheet.

  3. Click the button showing how many answers will be added, such as Add 8 answers.

Blank lines and answers already on the question are skipped. New answers receive the default answer weight and have no connected products or assigned values.

Copy to another store

To copy an entire quiz, including its design, to another store, use Import-Export Quizzes.

You can also import a product matching CSV file into a quiz in another store. Products and collections must have matching handles. Variants identified by SKU must have matching SKUs.

Variants identified using ?variant= only work in the store they were exported from.

Build from a spreadsheet with Lantern MCP

If your spreadsheet also describes branching logic or personalised results, you can ask your connected Claude or ChatGPT assistant to build these using Lantern MCP. This is separate from the CSV import described above.

Follow Connect Lantern's MCP to Claude or ChatGPT, attach your file and explain what you want. For example:

Build a new quiz from this spreadsheet. Each row is an answer. Connect the products in the Products column to each answer, and send customers who answer "Beginner" straight to the last question.

The assistant saves its changes to a draft so you can review the quiz in the Quiz Builder before publishing.

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

Did this answer your question?