Skip to main content

Postscript integration

Send quiz takers to Postscript as a quiz completed event with their answers and results link, and sign up new SMS subscribers on your keyword.

Written by Traian

With the Postscript integration, every quiz taker who leaves a phone number or email is sent to Postscript as a CompletedLanternQuiz event with their answers and a link to their results, so a Postscript flow can text them, for example with a promo code. Quiz takers who leave a phone number and accept SMS marketing can also be signed up on one of your Postscript keywords.

Before you start: for now, Postscript lets apps connect with a store's own API key on its Enterprise plan only. On other Postscript plans Lantern can't connect yet. We've applied to Postscript's partner program, which opens the connection to every Postscript plan, and we'll update this article when that happens.

Step 1: Copy your API key in Postscript

1.1 Log in to Postscript and go to Settings, then API.

1.2 Copy your private API key. It starts with sk_. If you don't have one yet, create it on the same page.

1.3 Optionally, note the keyword you want quiz takers to sign up on, exactly as it appears in Postscript. The keyword has to exist in Postscript already, because Lantern doesn't create keywords.

Step 2: Connect Postscript in Lantern

2.1 In Lantern, open Integrations, find Postscript under Marketing and click Connect.

Image showing the Postscript card on Lantern's Integrations page with the Connect button.

2.2 Paste your key into API Key.

2.3 Optionally, enter a keyword in Keyword. Quiz takers who give a phone number and accept SMS marketing are signed up on it. Leave the field empty if you only want the quiz event, for example to text people who are already your subscribers.

Image showing the Postscript window in Lantern with the API Key field filled in and QUIZ entered in the Keyword field.

2.4 Click Connect. Lantern checks the key and the keyword with Postscript, and the card shows Connected.

Image showing the Postscript card on Lantern's Integrations page with the Connected badge and the Edit button.

That's all the setup there is. Once connected, every active quiz in your store sends quiz takers to Postscript, with no settings to change per quiz.

The quiz event

When a customer completes a quiz and leaves a phone number or email, either on the Optin Page or in the Email sign-up on the Results page, Lantern sends Postscript a CompletedLanternQuiz event. Postscript matches it to the subscriber with that phone number, or with that email if the phone doesn't match. The event carries:

  • Answers: one property for each question with a Question Property ID, named after it. A multiple choice answer is one text, with the answers separated by commas.

  • quiz: the URL handle of the quiz they took, for example skin-care-finder.

  • results_url: a link to their results page, so a text can send them back to their recommendations.

  • first_name and last_name, when the Optin Page asks for them.

  • top_product, top_product_url and top_product_image: the first recommended product's name, link and image.

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 whose answer you want in Postscript.

Starting flows

In Postscript, create a flow whose trigger is the custom event. Postscript shows it with your shop's name in front, for example Your Store - CompletedLanternQuiz. The event and its properties appear in the flow builder after the first one arrives, so complete the quiz once yourself with your own phone number first.

Inside the flow, use the event's properties to text each customer what fits their answers, for example a split on an answer, or a link with results_url. You can also use the event in a Wait for Event split. Postscript only texts people who are subscribed, so the flow reaches quiz takers who are already your subscribers or who replied Y to the sign-up text.

Signing up new SMS subscribers

When you entered a keyword on the Postscript card, Lantern signs up quiz takers on it when all of these are true:

  • They left a phone number in international format, like +14155550100. The Optin Page's phone field saves numbers this way.

  • SMS marketing is on for the quiz. On the Optin Page, open Integration Settings on the right-hand side and check Subscribe to SMS marketing. It's on by default, and the section appears once Postscript is connected.

  • The customer didn't decline marketing. If your Optin Page shows an optional consent checkbox and the customer leaves it unticked, they aren't signed up.

  • Postscript doesn't have that phone number yet. Someone who is already subscribed, or who unsubscribed, is never signed up again, so nobody gets a second sign-up text or is subscribed back.

Postscript then texts the customer its own Reply Y confirmation, and they become a subscriber once they reply. New subscribers get the tag lantern-quiz- followed by the quiz's URL handle, plus the quiz, the results link and their answers as subscriber properties (up to 20, Postscript's limit). To set up the Optin Page, its phone field and its consent checkbox, see Collect customer emails.

Disconnecting and troubleshooting

To disconnect, open Integrations, click Edit on the Postscript card and click Disconnect. Lantern stops sending events and sign-ups. Your subscribers and flows stay in Postscript.

If Lantern won't save and says Invalid API key, the key was copied incompletely or was deleted in Postscript. Copy it again as in step 1.

If Lantern says Postscript only allows this connection on its Enterprise plan for now, your Postscript plan doesn't allow apps to connect with your own key yet (see Before you start).

If Lantern says there's no keyword with this name, check the keyword's spelling in Postscript, or leave the field empty.

Good to know

  • Sensitive answers are not shared. Answers to questions set to Don't share or Don't store are never sent to Postscript. See How Sensitive Data Controls Work.

  • Test submissions are included. Completing the quiz in Preview with a phone number sends the event and, with a keyword, a sign-up text to that number.

  • Changing a quiz's URL handle changes its quiz value and its subscriber tag, so flow splits that use the old handle stop matching that quiz.

  • Postscript is for text messages. An email from the quiz is sent with the event to help Postscript find the subscriber, but Lantern doesn't subscribe anyone to email in Postscript.

Did this answer your question?