Skip to content

Cookbook

Short, copy-paste recipes for common integrations. Each recipe names the surfaces it uses, the scopes it needs, and the errors to handle.

RecipeWhat you get
A ‘your quiz picked this’ marker on the product pageRemember what the quiz showed this shopper and badge those products, variant-aware, on the product page they open next.
A B2B quote from a quizTurn 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 orderSend 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 storePost 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 picksA 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 answersShow 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 warehouseBuild a filtered people export, be told by webhook when it is ready, and load the gzipped CSV into a warehouse.
A printable routine cardTurn 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 answersShow 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 formulaTurn 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 buySize 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 pageSearch 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 pickWhen 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 publishTake 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 dropsPost a Slack alert when a quiz’s completion rate drops week over week, plus a daily digest.
An editable kit with a live totalLet 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 voiceLet a shopper answer choice questions by speaking, with the browser’s Web Speech API feeding prefill() and navigate().
Auto-advance an in-store kiosk quizMove 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 finishCelebrate 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 finishesCreate or update a Shopify customer from a quiz.finished webhook, with answers as metafields and consent respected.
Make the page react to the quizChange the storefront’s background, header or music as the shopper moves through the quiz pages, from page.viewed.
Offer help when a shopper is stuckAfter 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 intentKeep 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 boughtFind 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 resultTag 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 anotherCarry 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 youFill 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 orderPut a quiz result and its choice answers on the Shopify cart so the order carries them.
Recommended products that are out of stockList 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 finishesSend the shopper to a page of your choice the moment a quiz finishes, from the storefront JS API.
Send every finished quiz to your CRMA 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 managerForward every storefront quiz event but identity.captured to a tag manager without personal data.
Show the quiz discount as a QR codeRender 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 signatureA complete webhook receiver that verifies the Standard Webhooks signature and deduplicates deliveries.