With the Attentive integration, quiz takers who leave their email or phone number reach Attentive with their answers and a link to their results. Each completed quiz also sends a Completed Lantern Quiz event, so you can start a Journey that texts or emails each customer their recommendations. If you add a sign-up unit, customers who accept marketing are subscribed too.
Step 1: Create an API key in Attentive
Lantern connects to Attentive with the API key of a custom app you create in your own Attentive account. It only takes a minute.
1.1 Log in to Attentive, open App Marketplace and click + Create App in the top-right corner.
1.2 Give the app a name you'll recognize, like Lantern, and enter your email in Contact email. Under permissions, set these three to Write and leave the rest on No Access:
Custom Attributes
Custom Events
Subscribers
Lantern needs all three: attributes for the answers, events for your Journeys and subscribers for opt-ins.
1.3 Click Create and copy the API key right away. Attentive shows it only once. If you lose it, open the app under the Built by you tab and regenerate the key.
Step 2: Find your sign-up unit ID (optional)
Attentive only subscribes someone through a sign-up unit, which keeps a record of where the subscriber came from and the legal text they saw. If you want Lantern to subscribe the customers who accept marketing in your quiz, you need the ID of an API sign-up unit.
2.1 In Attentive, open Sign-up Units and find a unit whose sign-up method is API.
2.2 Copy the number in its ID column.
If you don't have an API sign-up unit, ask Attentive's support or your Attentive account manager to create one. You can also skip this step: without a sign-up unit Lantern still sends every quiz taker's answers and the Completed Lantern Quiz event, it just doesn't subscribe anyone.
Step 3: Connect Attentive in Lantern
3.1 In Lantern, open Integrations, find Attentive under Marketing and click Connect.
3.2 Paste your key into API Key, and your sign-up unit ID into Sign-up Unit ID if you have one.
3.3 Click Connect. Lantern checks the key with Attentive, and the card shows Connected.
That's all the setup there is. Once connected, every active quiz in your store sends quiz takers to Attentive, with no settings to change per quiz.
What Attentive receives
When a customer completes a quiz and leaves their email or phone number, either on the Optin Page or in the Email sign-up on the Results page, Lantern sends Attentive:
Answers: one custom attribute for each question with a Question Property ID (see the next section).
lantern_results_url: a custom attribute with a link to their results page, so your messages can send them back to their recommendations.
lantern_quiz: a custom attribute with the URL handle of the quiz they took, for example
skin-care-finder.The Completed Lantern Quiz event, described below.
If the customer took a quiz before, Lantern updates these attributes. Their other attributes stay as they are.
How answers become custom attributes
Every question can have a Question Property ID, a short name for its answer that you set in the question's right-hand panel in the quiz editor. Lantern saves each answer in an Attentive custom attribute with that name, and Attentive creates the attribute the first time it sees it. You can read more about Property IDs in How to use customer answers in Lantern quizzes.
Choice questions don't have a Property ID by default, so give one to every question you want in Attentive. When a customer picks several answers, they're saved as one text, for example acne, redness.
If you created an attribute with the same name in Attentive yourself and gave it a fixed list of values, Attentive only accepts those values. An answer that isn't on the list is left out, and the rest are saved.
The Completed Lantern Quiz event
Every completed quiz sends a Completed Lantern Quiz custom event. In Attentive's Journey Builder, start a Journey with this event as its trigger to text or email each customer right after the quiz. The event carries:
quiz: the URL handle of the quiz, so a Journey can be limited to one quiz.
results_url: the link to their results page.
first_name and last_name, when the Optin Page asks for them.
top_product, top_product_url and top_product_image: the first product the quiz recommended. Use these in text messages, which can't show lists.
products: every recommended product with its title, link, image and price, for emails.
Take the quiz once yourself with your own email or phone before building the Journey, so Attentive has an event to show you. Attentive only starts a Journey for an event less than 12 hours old.
Marketing consent
Lantern only subscribes customers when you added a Sign-up Unit ID on the Attentive card:
Email is subscribed when Subscribe to email marketing is on for the quiz.
Text messages are subscribed when the customer left a phone number and Subscribe to SMS marketing is on. Attentive then texts them its usual "Reply Y" confirmation, and they're subscribed once they reply.
Nobody is subscribed when the customer declined marketing. If your Optin Page shows an optional consent checkbox and the customer leaves it unticked, they aren't subscribed.
Existing subscribers are skipped, so a customer who's already subscribed never gets an "already subscribed" text from Attentive.
The switches are on the Optin Page: open Integration Settings on the right-hand side. They're on by default, and the section appears once Attentive is connected. Lantern never unsubscribes anyone. The answers and the event are sent whatever the customer chose, and Attentive only sends messages to subscribers. To set up the Optin Page and its consent checkbox, see Collect customer emails.
Disconnecting and troubleshooting
To disconnect, open Integrations, click Edit on the Attentive card and click Disconnect. Lantern stops sending customers. Your subscribers and attributes stay in Attentive.
If Lantern won't save, the key was copied incompletely or the app was deleted in Attentive. Create a new key as in step 1.
If answers or events arrive but nobody is subscribed, check that the card has a Sign-up Unit ID and that the unit's sign-up method is API. If nothing arrives at all, check that the app's three permissions are set to Write, or that the key wasn't regenerated in Attentive. To use a new key, click Edit on the Attentive card, paste it into API Key and click Update.
Good to know
Phone numbers need the country code. Attentive only accepts numbers like +14155550100. The Optin Page's phone field always saves them this way.
Sensitive answers are not shared. Answers to questions set to Don't share or Don't store are never sent to Attentive. See How Sensitive Data Controls Work.
Test submissions are included. Completing the quiz in Preview with your email or phone sends you to Attentive too, and with a sign-up unit Attentive texts you its confirmation.
Changing a quiz's URL handle changes its quiz and lantern_quiz values, so Journeys and segments that use the old handle stop getting new customers from that quiz.
Zapier still works. If you'd rather build your own automation, the Zapier integration can also send quiz takers to Attentive.



