Postscript
Postscript is an SMS marketing platform for ecommerce brands. Datafly Signal delivers your events server-side to Postscript’s Custom Events API, where they trigger Flows (automations) such as abandoned-cart, browse-abandonment, and post-purchase journeys. Because delivery is server-to-server, events reach Postscript even when a browser blocks third-party scripts.
Prerequisites
- A Postscript account with SMS subscribers.
- A Postscript Private API Key (
sk_...). Generate it in the Postscript dashboard under Account > API (app.postscript.io/account/api). Use the Private key, never the Public key, and never expose it in client-side code. - At least one of phone, email, or a Postscript subscriber ID flowing through your Signal events so Postscript can resolve the subscriber.
Configuration
In your Postscript dashboard:
- Go to Account > API.
- Copy the Private API Key (
sk_...).
Configure in Signal
- In the Signal management UI, open Integrations and add Postscript.
- Paste your Private API Key into the API Key field.
- Attach the Postscript integration to the pipeline that carries the events you want to trigger Flows.
- Save and publish. New events on that pipeline now deliver to Postscript.
API Endpoint
Signal delivers events to Postscript’s Custom Events API:
POST https://api.postscript.io/api/v2/events
Authorization: Bearer <Private API Key>
Content-Type: application/jsonA successful request returns 202 Accepted. The event name (type) is automatically prefixed with your shop name in Postscript, so an order_completed event appears in Flows as [Your Shop] - order_completed.
Identity Signals
Postscript resolves the subscriber from one or more identifiers on each event. Unlike ad-platform conversion APIs, Postscript matches on the raw value, not a hash:
| Signal source | Postscript field | Notes |
|---|---|---|
$traits.phone | phone | Normalised to E.164 (recommended by Postscript). |
$traits.email | email | Trimmed and lowercased. |
user_id | subscriber_id | Use only if you store the Postscript subscriber ID. |
If none of these are present, Postscript cannot attach the event to a subscriber and the request is rejected. Make sure your identity setup surfaces at least a phone or email for converting visitors.
Event Mapping
Signal uses GA4-style event names. The default Postscript blueprint maps them as follows:
| Signal event | Postscript type |
|---|---|
page | page_view |
Product Viewed | product_viewed |
Product Added | add_to_cart |
Checkout Started | checkout_started |
Order Completed | order_completed |
Signed Up | signed_up |
Any event not in the map is dropped. Event-specific fields land inside the properties object, where they are available for Flow filtering and SMS merge tags (for example {{ event.properties.order_id }}).
Example: Order Completed
A Datafly.js call:
datafly.track("Order Completed", {
order_id: "1001",
revenue: 79.99,
currency: "USD",
tax: 6.40,
shipping: 5.00,
coupon: "WELCOME10"
});With a subscriber phone of +15551234567, Signal delivers:
{
"type": "order_completed",
"phone": "+15551234567",
"occurred_at": "2026-06-06 14:32:11.482000",
"external_id": "evt_9f2c1b7e",
"properties": {
"order_id": "1001",
"value": 79.99,
"currency": "USD",
"tax": 6.40,
"shipping": 5.00,
"coupon": "WELCOME10"
}
}external_id is sourced from the Signal event’s message ID so retried deliveries are idempotent. occurred_at is the event timestamp in UTC.
Testing
- Send a test event through your pipeline (for example, complete a test order) for a visitor whose phone or email matches an existing Postscript subscriber.
- In Postscript, open the subscriber’s profile or Flows activity and confirm the event appears as
[Your Shop] - order_completed. - Build or edit a Flow triggered by the custom event and confirm the
propertiesvalues resolve in merge tags.
Troubleshooting
- 400 Bad Request — the event had no resolvable subscriber identifier (no
phone,email, orsubscriber_id), ortypecontained characters other than letters, numbers, and underscores. Confirm identity is flowing and the event maps to a validtype. - 401 / 403 Unauthorized — the Private API Key is wrong, revoked, or you pasted the Public key. Regenerate the Private key in Account > API and update the integration.
- Event not triggering a Flow — confirm the Flow trigger matches the prefixed event name (
[Your Shop] - <type>) and that the subscriber is opted in to SMS. Postscript only sends to subscribers who have consented; the event API does not override SMS consent state. - Subscriber not matched — verify the phone is in E.164 (
+and country code). Postscript matches on the raw value, so formatting differences can prevent a match.