Integrate Postscript with AfterShip Tracking (Advanced)
Overview
Postscript.io is a cloud-based platform designed to help eCommerce businesses enhance their marketing strategies through SMS messaging. It enables businesses to create and manage SMS marketing campaigns, allowing them to engage with customers directly on their mobile devices.
With features such as automated messaging, segmentation, and analytics, Postscript.io empowers brands to deliver personalized and timely communications. The platform integrates seamlessly with popular eCommerce platforms like Shopify, making it easy for businesses to incorporate SMS marketing into their overall marketing strategy.
The Postscript integration with AfterShip Tracking consolidates all message communications into a central portal. When order tracking statuses update in AfterShip Tracking, brands can automatically send unified tracking notifications to customers using nine key triggers, ensuring engagement, consistency, and efficiency.
What you'll learn
- Difference between Postscript Basic and Postscript Advanced
- Use cases
- Description of events and event properties
- Install Postscript on AfterShip Tracking
a. Step 1. Preparation: Create credentials on Postscript
b. Step 2. Connection: Fill in your configuration details in AfterShip
c. Step 3. Set up automation in Postscript
Difference between Postscript Basic and Postscript Advanced Integration
In this article, we refer to the integration that uses a tracking webhook as the Basic Integration, while the integration flow built officially by AfterShip is called the Advanced Integration.
If you have already set up the Basic Integration using the AfterShip Tracking Webhook method, we recommend migrating to the Advanced Integration.
Both the Basic Integration and Advanced Integration work seamessly, but itās best to choose only one to avoid sending duplicate SMS notifications through Postscript. If you decide to use the Advanced Integration, make sure to disable any automations or campaigns that you previously configured with events from the Basic Integration.
- Compared to the Basic Integration, the Advanced Integration supports more flow triggers and properties. Therefore, we recommend migrating to the Advanced Integration for a more powerful and feature-rich experience.
Object | Basic | Advanced |
Integration Method | Tracks update feed from the AfterShip webhook. | Uses official AfterShip event creation and data pulling |
Trigger Events | 4 (excludes shipment summary, pre-shipment, and EDD events). | 15 (includes shipment summary, pre-shipment, and EDD events). |
Event Filters and Properties | 18 | 40 |
Plan | Available on all plans | 9 events are available on all plans. 6 events are exclusive to Premium and Enterprise plans |
Use cases
- Shipment events from AfterShip Tracking can be synced to Postscript automatically
Fifteen standard AfterShip Tracking events are synced to Postscript. Once you finish connecting to PostScript, the data events will be automatically synced.
- Utilize the events as triggers for scheduled messaging campaigns or automation
Shipment events can be used as triggers to send key tracking notifications through Postscript, keeping shoppers updated on their package status.
- Insert event properties as merge tags in message templates
Personalization tags are used in templates to auto-populate the required customer and order information from our database according to the return request.
Description of events and event properties
We have pre-built 15 events synced to your Postscript account, and the number of events available to you depends on your AfterShip Tracking plan. Below is the table outlining the description of each event.
Event Type | Description | Plan |
AfterShip-PreShip_Order_confirmation | Notifies when an order is confirmed. | Premium, Enterprise |
AfterShip-PreShip_Fulfilled_partial_order | Indicates partial order fulfillment. (There will be separate notifications for each partial fulfillment.) | Premium, Enterprise |
AfterShip-DeliverySummary_All_Items_fulfilled | Notifies when all items in an order have been shipped. | Premium, Enterprise |
AfterShip-DeliverySummary_All_Items_Delivered | Notifies when all split order shipments have been delivered. | Premium, Enterprise |
AfterShip-DeliveryUpdates_Info_received | Notifies when a package has been shipped and is ready for courier pickup. | All |
AfterShip-DeliveryUpdates_In_transit | Notifies when a package is in transit to the customer. | All |
AfterShip-DeliveryUpdates_Out_for_delivery | Notifies when a shipment is out for delivery. | All |
AfterShip-DeliveryUpdates_Available_for_pick_up | Notifies when a shipment is available for pick-up at a designated location. | All |
AfterShip-DeliveryUpdates_Delivered | Notifies when a shipment has been delivered to the destination. | All |
AfterShip-DeliveryExceptions_General_exception | Notifies when a package is in an exception status (e.g., lost, customs delay, general delay, damaged, etc., excluding returning to sender or returned to sender). | All |
AfterShip-DeliveryExceptions_Failed_attempt | Indicates a courier's unsuccessful delivery attempt. | All |
AfterShip-DeliveryExceptions_Returning_to_sender | Notifies when a package is returning to the sender. | All |
AfterShip-DeliveryExceptions_Returned_to_sender | Notifies when a package has been returned to the sender. | All |
AfterShip-EDD_Delivery_anticipation | Notifies when a shipment is scheduled to arrive the next day. | Premium, Enterprise |
AfterShip-EDD_EDD_revised | Notifies when a shipmentās estimated delivery date is updated. | Premium, Enterprise |
Under each event, we sync the following fields (referred to as properties in Postscript).
struct
data type, which means you cannot insert order product item variables into your message templates. - Properties for delivery updates, delivery exceptions, and EDD events are within the scope of the shipment.
Category | Trigger Filters & Property | Description |
SHIPMENT | TrackingNumber | The shipment's tracking number. |
SHIPMENT | Source | The import source of AfterShip tracking. |
SHIPMENT | LatestStatus | The current delivery status of the AfterShip shipment. |
SHIPMENT | LatestSubStatus | The current sub-status of the AfterShip shipment. |
SHIPMENT | Note | Displays additional notes configured in AfterShip. |
SHIPMENT | BrandedTrackingURL | URL to your AfterShip branded tracking page with the tracking number as a pre-set parameter. |
SHIPMENT | UpdatedAt | The latest update time on the shipment from the courier. |
SHIPMENT | CourierEstimatedDeliveryDate | The estimated delivery date provided by the courier, sourced directly through AfterShipās integration with courier tracking services. This represents the courierās most accurate estimate of when the shipment is expected to be delivered. |
SHIPMENT | AIEstimatedDeliveryDate | AfterShip leverages AI and proprietary tracking data to provide the AfterShip AI Predicted Estimated Delivery Date (AIEDD), which proactively engages customers and provides EDDs with industry-leading accuracy. |
SHIPMENT | CustomEstimatedDeliveryDate | A configurable setting within AfterShip Trackingās admin dashboard, used when merchants already have a mechanism to calculate the estimated delivery date based on the shipping type, courier, and destination. |
SHIPMENT | LatestEstimatedDeliveryDate | The most up-to-date estimated delivery date, determined based on the following priority: Courier estimated delivery date > AfterShip AI predicted delivery date > Promised delivery date > Custom estimated delivery date. |
SHIPMENT | DestinationCountryRegion | The destination country of the shipment. |
SHIPMENT | DestinationState | The destination state of the shipment. |
SHIPMENT | DestinationCity | The destination city of the shipment. |
SHIPMENT | DestinationPostalCode | The destination postal code of the shipment. |
SHIPMENT | DestinationAddress | The destination address of the shipment. |
SHIPMENT | OriginCountryRegion | The origin country of the shipment. |
SHIPMENT | OriginState | The origin state of the shipment. |
SHIPMENT | OriginCity | The origin city of the shipment. |
SHIPMENT | OriginAddress | The origin address of the shipment (in ISO3 format). |
SHIPMENT | OriginPostalCode | The origin postal code of the shipment. |
SHIPMENT | DeliveryType | The type of delivery (e.g., Self Pickup). |
SHIPMENT | PickupLocation | The location from where the customer can pick up the package. |
SHIPMENT | PackageCount | The number of packages under this shipment. |
SHIPMENT | ShippedAt | The ship date of the shipment. |
SHIPMENT | TransitTime | The total time the shipment has been in transit. |
SHIPMENT | PickedUpAt | The pickup date of the shipment. |
SHIPMENT | DeliveredAt | The delivery date of the shipment. |
SHIPMENT | SignedBy | Information about the package recipient. |
COURIER | CarrierSlug | The courierās slug name. |
COURIER | CarrierShippingMethod | Displays the courierās shipping service type (e.g., UPS Express SaverĀ®). |
COURIER | CarrierRedirectURL | The URL where the customer can redirect their parcel. |
COURIER | CarrierTrackingURL | The courierās tracking page URL. |
ORDER | StoreSlug | The eCommerce store name. |
ORDER | OrderNumber | The customer-facing number identifying a purchase or order placed by a customer. |
ORDER | OrderID | The merchant-facing number identifying a purchase or order placed on the eCommerce portal. |
ORDER | OrderURL | The URL customers can click to view their order on your eCommerce store. |
ORDER | TotalShipments | The number of shipments under the order. |
CUSTOMER | CustomerName | The name of the package recipient or the buyer. |
CUSTOMER | CustomerLanguage | The language in which the customer wants to receive notifications. |
- The properties of Pre-ship and Delivery Summary events are within the scope of the order.
Category | Trigger Filters & Property | Description |
ORDER | OrderID | The internal merchant-facing number identifying a purchase or order placed by a customer on the eCommerce portal. |
ORDER | StoreSlug | The name of the eCommerce store. |
ORDER | OrderNumber | The customer-facing number identifying a purchase or order placed by a customer. |
ORDER | OrderStatus | The fulfillment status of the order. |
ORDER | OrderURL | The URL that customers can click to view their order on your eCommerce store. |
ORDER | TotalShipments | The number of shipments under the order. |
CUSTOMER | CustomerName | The name of the package recipient or the buyer of the order. |
CUSTOMER | CustomerLanguage | The language in which the customer wants to receive notifications. |
Install Postscript on AfterShip Tracking
Step 1. Preparation: Create credentials on Postscript
- 1. Create a new API key for AfterShip
- Go to your Store settings in the Postscript admin.
- Navigate to the API on the side panel.
- Click Create Security Key Pair
- Two types of keys will be displayed on the page. You need to click the Private Key to copy it for integration. The private key format will look like
sk_XXXXXX
.
Step 2. Connection: Fill in your configuration details in AfterShip
After collecting the private key from your Postscript account, fill it into the corresponding fields on the AfterShip connection page.
1. Access the Postscript integration page
- Go to Apps in the AfterShip Tracking admin.
- Click View more apps.
- Search Postscript for AfterShip Tracking. Click on it and you will land on the Postscript integration page. Click Install app.
- Select the right organization (online store) if you have multiple organizations configured in AfterShip Tracking (Optional) for which you are establishing this integration.
- You will be directed to the Postscript and AfterShip Tracking integration page.
2. Select a Shopify store
- Choose one of the Shopify stores you've connected to AfterShip Tracking. Please make sure the selected store matches the one connected to your Postscript account.
- Add the required details and click Install app.
3. Enter the API key
- Paste the API key you created in your Postscript account.
- Make sure to use the private key that begins with the prefix
sk
.
4. Send events configuration
- Phone number only: Only maps the phone number with your Postscript subscribers.
- Email only: Only maps the email to your Postscript subscribers.
- Both phone number and email:
a. For shipment-related events, both the email and phone number must match an existing Postscript subscriber.
b. For order-related events, either the phone or email can be used to match a subscriber.
- Once the details are added, click Sumbit.
Step 3: Set up automation in Postscript
1. Select the trigger event
Once the integration with AfterShip Tracking is complete, you'll see all the events supported by your plan, which weāve created in your Postscript account.
- Go to Messaging, then Automations in your Postscript admin.
- Click Create Automation, then Create an Automation Flow.
- On the Automation Flow editor, rename the flow for easy reference allowing you to understand when this flow will be triggered.
- Under Automation triggers section, select the Trigger event or property. You will see all the custom events that will be triggered by AfterShip in the dropdown.
2. [Optional] Set the trigger filter
- You can add filters based on the trigger event selected above in your automation flow. For example, if the trigger event is
Delivered Shipments
, you can apply a filter such asDestination Country Region
isUnited States
. This ensures the message is triggered only for shipments delivered to the United States.
- Click Update to select an Action for the flow.
3. Configure Action
- Select what Action do you want to get triggered once the subscriber meets the set condition or behavior of the flow like Message.
- Draft the message as per your requirements.
4. [Optional] Add merge tags using trigger event properties in your message template
Once the trigger event is bound, you can use merge tags based on the properties of the AfterShip event, such as tracking number, courier name, delivery status, and estimated delivery date to further personalize the message.
5. Click Update and Save the flow. You can schedule and activate the flow based on your requirements.
FAQs
1. Do I need to be on a specific AfterShip plan to use this integration?
The integration is available on all AfterShip plans, but the number of events you can access depends on your plan:
- All Plans: You can use 9 core delivery events, such as In-Transit, Delivered, and Failed Attempt.
- Premium and Enterprise Plans: In addition to the core events, you also get 6 advanced events, including Pre-ship Order Confirmation, Partial Fulfillment, and Revised Estimated Delivery Date (EDD).
For a detailed list of events available by plan, see the Description of events and event properties section.
2. Can I use the same Postscript API key for multiple stores in AfterShip?
No. Each store connected to AfterShip should have its own unique API key to avoid data mismatches across organizations.
3. What happens if I regenerate or revoke the API key in Postscript?
The AfterShip integration will stop sending events until the new key is updated in AfterShip. Always update the integration with the latest key.
4. What customer/order data can be inserted into SMS messages using merge tags?
- Tracking number
- Branded tracking URL
- Courier name and shipping method
- Order number and order URL
- Estimated delivery dates (courier, AI, custom)
- Customer name & delivery address
ā ļø Limitations: Postscript doesnāt support struct
data type, so you cannot insert product-level details into messages.
5. What happens if an event has no matching subscriber in Postscript?
The event is dropped. No SMS is triggered. Ensure subscriber capture flows in Postscript are properly set up.
Updated on: 01/10/2025