Skip to main content

What Alia sends to Postscript

The subscriber details, properties, and events Alia sends to Postscript, including on-site opt-in signups.

Written by Rob D

When a visitor gives their phone number in an Alia popup, Alia subscribes them in Postscript. It also saves their discount code and quiz answers on the subscriber, and sends events you can use in your automations. To connect Postscript, see Integrating Alia with Postscript.

Subscribers

When a visitor submits their phone number, Alia creates a Postscript subscriber with:

  • Phone number

  • Email, if the visitor also gave one

  • Keyword, from your Postscript settings in Alia, or a different keyword set on the popup, form, or reward

  • The tag Alia, so you can find every subscriber from Alia

Postscript only receives visitors who give a phone number. If a visitor declines SMS consent in the popup, Alia doesn't subscribe them. By default, Alia subscribes the visitor as soon as they submit the phone form. If you turn off Immediately subscribe users to CRMs on the form, Alia waits until the visitor submits another form, claims a reward, or stops interacting for a few minutes. That way their code and quiz answers are already on the subscriber when your welcome automation starts.

Subscriber properties

Property

What it holds

When it's set

aliaoffer

The discount code

When a reward is claimed

aliaoffertext

The reward's title, such as "15% off"

When a reward is claimed

aliaofferexpiration

When the code expires, as a date and time

When a reward is claimed, if the code expires

The question text

The visitor's answer

When the visitor answers a quiz or survey question

Other properties your form saves are sent too, such as properties set under When form is submitted. Popups made with Build a popup set alia_offer and alia_offer_text there, so those arrive alongside aliaoffer and aliaoffertext.

Postscript only allows letters, numbers, spaces, hyphens, and underscores in property names, so Alia removes any other characters. "What's your skin type?" arrives as Whats your skin type. For a question with more than one answer, only the first answer is saved.

Properties build up as the visitor goes through your popups. When they answer another question or claim another reward, Alia updates the subscriber with the new values.

💡 Note: Popup and campaign names aren't sent for keyword signups. To tell popups apart in Postscript, add your own property under When form is submitted, or send each popup to its own keyword.

On-site opt-in signups

With Postscript Onsite Opt-In, subscribers don't come in through a keyword. Alia tells Postscript the campaign's name as the signup source and sets 3 extra properties you can filter on instead:

Property

What it holds

alia_ooi

true

alia_opt_in_popup_name

The popup's name

alia_opt_in_popup_id

The popup's ID, shown on the Campaigns page

If a visitor subscribes by replying to Postscript's text instead of entering the code in the popup, Alia sends their email and earlier properties once Postscript confirms the opt-in.

Events

Event

Fields

When

reward_claimed

text (the reward title), shopify_code (the discount code), expires_at

When the visitor claims a reward

poll_answered

question, answer

When the visitor answers a quiz or survey question

If something happens before the visitor gives their phone number, such as answering a quiz question, Alia sends the event once they're subscribed.

Identifying visitors in the browser

If Postscript's script is on your store, Alia also tells it the visitor's phone number when they sign up. This is the Postscript checkbox under Settings > Tracking > Third-party pixels, and it's on by default.

For developers

This section is for developers who want to know exactly how Alia talks to Postscript. You don't need it to use the integration.

Server-side (Postscript API v2)

Alia calls Postscript's v2 API (https://api.postscript.io/api/v2) from its servers.

  • POST /subscribers creates a subscriber with phone_number, keyword_id, email (when collected), tags (["Alia"]), properties, and optionally shopify_customer_id.

  • PATCH /subscribers/:id updates an existing subscriber's email and properties.

  • POST /events sends the reward_claimed and poll_answered events.

Before sending, Alia removes any character from property names that isn't a letter, number, space, hyphen, or underscore.

On your storefront (Postscript script)

When Postscript's script is on your store, Alia also calls it in the browser:

  • postscript.identify({ phone }) on signup, so Postscript recognizes the visitor. This only runs while Postscript is ticked under Settings > Tracking > Third-party pixels.

  • postscript.acquisition.optIn(phoneNumber, { welcomeMessage, ... }) starts an on-site opt-in and texts the code.

  • postscript.acquisition.verify({ code, phoneNumber }) checks the code the visitor types in.

  • postscript.acquisition.resendOtp(phoneNumber) resends the code (the Send OOI code action).

  • postscript.acquisition.setAttributes(...) adds the visitor's email and the on-site opt-in properties (alia_ooi, alia_opt_in_popup_name, alia_opt_in_popup_id).

Frequently asked questions

Why is aliaoffer empty in my texts?

Alia sets aliaoffer when the visitor claims a reward. If the first text goes out before that, the property is empty. Turn off Immediately subscribe users to CRMs on the phone form, or set a backup code in Postscript. The property is spelled aliaoffer, with no underscore.

Why are my quiz answers under a slightly different name?

Postscript doesn't allow punctuation in property names, so Alia removes it. "What's your skin type?" becomes Whats your skin type.

Signups aren't entering the segment or flow I expect. What should I check?

Open the subscriber in Postscript and check their properties. If the properties are there and correct, the segment or flow settings in Postscript decide who enters, and Postscript support can help. If you filter on popup or campaign name, remember those are only sent for on-site opt-in signups.

Do email-only signups go to Postscript?

No. Postscript only receives visitors who give a phone number.

Can Alia send a custom event to Postscript?

No. Alia sends the two events listed above, reward_claimed and poll_answered, and you can't add or rename events. If you need an event on every signup, a developer can use Settings > Tracking > Execute code on signup, which runs on every successful submit, to send the signup to another tool that sends the event to Postscript.

Still have questions?

Start a chat from inside the Alia app, or use the chat in our Help Center.

Did this answer your question?