Postscript integrates with Stay Ai, allowing you to share information between the two solutions. Stay Ai is a comprehensive subscription platform that allows merchants to acquire subscribers, increase customer lifetime value, and reduce churn. With our Stay Ai integration, merchants can keep subscribers up-to-date on orders via SMS.
In this article, we'll walk you through setting up the integration. We'll also define each available Stay Ai trigger event and guide you through building an automation employing Stay Ai trigger events.
Create a Postscript API Key
- Select your Shop Name in the side menu of your Postscript dashboard, then select API.
- Select Create Security Key Pair on the right side of the page, then confirm your action by selecting Yes.
- Add a label to your API key so you can track where this API key is being used.
- Select Show in the Private Key column to reveal your API key. Copy this key or write it down—you'll need to enter it in Stay Ai later.
Configure Postscript in Stay Ai
1. From your Stay Ai merchant portal, select the Settings option on the left-side navigation panel. Then select Integrations.
2. Under Postscript, select the + Integrate with Stay Ai button.
3. Enter the Private API key you generated in the previous section of this help article, then select the Validate button to confirm that the authentication is secure.
4. If the connection is validated, you will see a green checkmark next to Postscript. Then select the Finish Installation button.
Create a Stay Ai-Specific Automation
- From your Postscript Dashboard, select Messages; then select Automations.
- Select Create Automation in the upper-right corner. Select Create Automation Flow.
- Select Create a new automation, then Create flow.
- Name your automation. Be sure to use a name that will allow you to easily identify and track this automation in the future.
- Select the dropdown menu under Add a subscriber when, then choose your Stay Ai trigger. These will be labeled in the following format: Alloy_Automation - Stay Ai [CUSTOMER EVENT].
- Continue customizing your automation flow by dragging and dropping actions into your flow, customizing your message, and adding merge tags.
- When you're ready to send your flow, select Schedule or Activate in the top-right corner of the page. You have two options when sending a flow:
- Activate immediately: This option will immediately begin the flow, allowing subscribers to enter the automation based on the selected properties.
- Activate at a scheduled time and date: Choose when you'd like the flow to begin, allowing subscribers to enter.
Understanding Stay Ai-Specific Automation Triggers
For an event to initiate an automation in Postscript, real subscriber activity (or test actions) must occur. Below are the trigger events Stay Ai can send to Postscript.
| Trigger Name | Definition |
| A Subscription has started | The subscriber has successfully created a new subscription. |
| An order is purchased | A subscription order has been processed. |
| A billing attempt was processed | The order was processed and payment was received. |
| An order is upcoming | This trigger will notify a subscriber 5 days before an upcoming order is processed. |
| A subscription order is canceled | The subscriber has successfully canceled their subscription. |
| A subscription order is paused | The subscriber has successfully paused their subscription. |
| A subscription order is skipped | The subscriber has successfully skipped their upcoming subscription order. |
| A billing attempt is failed | The subscriber’s card on file was declined. |
| An item is out of stock | The product the customer is subscribed to is currently out of stock. |
When customizing the messages sent after an event is triggered, merchants can add the following variables to include dynamic information from the subscriber's profile.
| Variable | Definition |
| city | City on Customer's shipping address |
| country | Country on Customer's shipping address |
| createdAt | Date the subscription was created |
| discountedPrice | Price on subscription including the discount |
| Email on the subscription | |
| firstName | First Name of Customer |
| lastName | Last Name of Customer |
| loginLink | magic link for the customer portal |
| nextBillingDate | Next scheduled billing date for the subscription |
| orderId | Shopify Order ID |
| orderIntervalFrequency | Amount of time in between shipments |
| orderIntervalUnit | Unit of time in between shipments (weeks, months, years) |
| orderNumber | Order cycle number for the. upcoming shipment on the subscription |
| phone | Phone number for the Customer |
| price | Price of the subscription |
| province | Province (if applicable) on the Customer's shipping address |
| stayActiveSubscriber | Pulls in Yes or No value for active subscribers |
| stayActiveSubscriptionCount | Amount of active subscriptions for the customer |
| stayActiveSubscriptionVariantIds | Pulls in Variant IDs on the Subscription |
| stayActiveSubscriptionChargeCount | Amount of charges for the subscriber on Stay |
| stayCancelledSubscriptionCount | Amount of cancelled subscriptions for the customer |
| stayExternalCustomerId | Customer ID on Stay |
| stayFirstChargeProcessedAt | Date of first subscription charge on Stay |
| stayOrderId | Order ID on Stay |
| staySubscriptionId | Subscription ID on Stay |
| staySubscriptions | Pulls the product names on the subscription |
| subscriptionContractID | Contract ID on Stay |
Get Support
Have questions? Please feel free to reach out to our wonderful Support team at support@postscript.io or via live chat. You can also submit a support request here!
Need ongoing channel strategy guidance? Please fill out this form and we'll connect you to one of our certified partners.