Cookbook
Short, copy-paste recipes for common integrations. Each recipe names the surfaces it uses, the scopes it needs, and the errors to handle.
| Recipe | What you get |
|---|---|
| A ‘your quiz picked this’ marker on the product page | Remember what the quiz showed this shopper and badge those products, variant-aware, on the product page they open next. |
| A B2B quote from a quiz | Turn a wholesale buyer’s quiz answers into a Shopify draft order for their company location, priced by their contract, ready to send as an invoice. |
| A check-in quiz after the order | Send a short follow-up quiz two weeks after an order, prefilled with the routine the shopper bought, and route the answers to support or a refill. |
| A daily digest of the whole store | Post yesterday’s views, starts, completions, orders and revenue for every quiz, the quizzes that earned the most and the products they sold, to Slack. |
| A discount on exactly the quiz’s picks | A Shopify Discount Function that takes a percentage off only the products the quiz recommended to this shopper, with no code to share. |
| A discount that grows as the shopper answers | Show a reward counter that fills as the quiz progresses and apply the code the quiz issued to the cart on the finish, with page.viewed, discount.issued and quiz.finished. |
| A filtered people file for your warehouse | Build a filtered people export, be told by webhook when it is ready, and load the gzipped CSV into a warehouse. |
| A printable routine card | Turn the result page’s products, choice answers and formulas into a clean card the shopper can print, from quiz.finished. |
| A running match score while the shopper answers | Show a live ’% match’ on each product of the page as the quiz’s dimension points grow, from getState().points and a dimension-to-product map you define. |
| A subscription interval from the quiz’s formula | Turn a quiz formula such as ‘your bag lasts 24 days’ into the matching selling plan in the Shopify cart, with the shopper’s say-so. |
| A VIP file of top scorers who buy | Size a cohort of people who scored high on one dimension and have an order, then export them as a CSV with their points and spend. |
| A win-back list of the people who left at one page | Search for the people who abandoned a quiz on a given page and left an email with consent, and write them to a CSV for a win-back campaign. |
| Add a companion product with a quiz pick | When the shopper adds a product the quiz recommended, put its companion in the cart too, from cart.add_requested and a map you define. |
| Alert when a page loses shoppers after a publish | Take a funnel snapshot when quiz.published arrives, then compare each page’s drop-off after the publish with the week before and alert on the page that got worse. |
| Alert when completion drops | Post a Slack alert when a quiz’s completion rate drops week over week, plus a daily digest. |
| An editable kit with a live total | Let the shopper drop or swap the products the quiz picked, watch the total, and add the kit to the cart in one call, from quiz.finished.products. |
| Answer the quiz by voice | Let a shopper answer choice questions by speaking, with the browser’s Web Speech API feeding prefill() and navigate(). |
| Auto-advance an in-store kiosk quiz | Move an idle kiosk quiz forward on its own with navigate(‘next’) and navigate(‘skip’), and start over with a reload when nobody is left. |
| Confetti and a share card on finish | Celebrate the finish with a confetti burst and hand the shopper an image of their result to share, from quiz.finished. |
| Create a Shopify customer when a quiz finishes | Create or update a Shopify customer from a quiz.finished webhook, with answers as metafields and consent respected. |
| Make the page react to the quiz | Change the storefront’s background, header or music as the shopper moves through the quiz pages, from page.viewed. |
| Offer help when a shopper is stuck | After a page refuses the shopper twice, show an ask-an-expert control that opens a helpdesk ticket with the quiz, the page and the fields that failed. |
| Open a fullscreen quiz after a delay or on exit intent | Keep a fullscreen quiz hidden until the shopper has been on the page for a while or moves to leave, with close() and open(). |
| People who answered X but never bought | Find the people whose latest quiz result says one thing and who have no order linked to it, count them against the buyers, and page through the ones you may write to. |
| Pick the packing insert from the quiz result | Tag each new order with the insert its quiz result calls for, from the order’s quiz attribute or from the person’s last result, so the packing app puts the right card in the box. |
| Prefill one quiz from another | Carry a shopper’s answers from a quiz on one page into a second quiz on another page, with quiz.finished, sessionStorage and prefill(). |
| Prefill what the shopper already told you | Fill quiz answers in from the page URL, the signed-in Shopify customer, or the person’s last quiz run, so nobody types the same thing twice. |
| Put the quiz result on the order | Put a quiz result and its choice answers on the Shopify cart so the order carries them. |
| Recommended products that are out of stock | List the products your quizzes recommend most that shoppers cannot buy right now: gone from the store, or sold out in Shopify. |
| Redirect after a quiz finishes | Send the shopper to a page of your choice the moment a quiz finishes, from the storefront JS API. |
| Send every finished quiz to your CRM | A server-to-server feed from the quiz.finished webhook into Salesforce or any CRM: one lead per finished session, upserted by session id, with the answers as fields. |
| Send quiz events to a tag manager | Forward every storefront quiz event but identity.captured to a tag manager without personal data. |
| Show the quiz discount as a QR code | Render the discount code a quiz issued as a QR on the results page, so a shopper can redeem it in the store. |
| Verify a webhook signature | A complete webhook receiver that verifies the Standard Webhooks signature and deduplicates deliveries. |
