Articles on: Notifications

Insert Merge Tags in Tracking Notifications

Plans: All plans Platforms: All platforms


Overview


AfterShip Tracking enables you to send personalized delivery notifications to customers via emails, SMS, and Facebook Messenger. You can customize AfterShip Tracking's pre-built notification templates using merge tags, for example, |TRACKING_URL|. Merge Tags are short-codes that you can insert in delivery notification messages to send personalized order updates.


What you'll learn


In this tutorial, we'll discuss:



How do the merge tags work


Merge tags incorporate essential details such as customer information, order updates, tracking data, and store specifics into the delivery notification for the triggered shipment. You have the flexibility to select the specific information to include in your delivery notifications.


List of AfterShip merge tags


Here is a list of AfterShip's supported merge tags along with their descriptions:


Merge Tag

Description

ORGANIZATION_NAME

Display ’organization name‘ of organization setting.

ORGANIZATION_URL

Display ’website‘ of organization setting.

SENT_FROM_EMAIL

Gives your store's contact email address.

TO_EMAIL

Displays customer's email address.

EMAILS

Lists all of the customer's emails.

TITLE

Displays the order's title (e.g., Order #1004).

TRACKING_NUMBER

Gives the shipment's tracking number.

TRACKING_LINK

Adds URL to your AfterShip branded tracking page. It is an HTML element. <a href="{{TRACKING_URL}}">{{TRACKING_URL}}</a>

TRACKING_URL

URL to your AfterShip branded tracking page.

STATUS

Displays shipment's delivery status (e.g., delivered).

DETAILED_STATUS

Adds details about the order's delivery status.

LOCATION

Gives the current location of the shipment.

LAST_UPDATE_TIME

Gives the time when the order status was last updated.

LAST_UPDATE_TIME_US

Gives the time when the order status was last updated in US format.

COURIER

Displays the courier's name.

COURIER_CONTACT

Gives courier's contact information.

ORDER_ID

Adds the order identifier (e.g., #1004).

ORDER_PATH

Gives URL that customers can click to view their order on your eCommerce store.

CUSTOMER_NAME

Adds the customer's name to the delivery notification.

FIRST_NAME

Inserts the customer's first name.

SIGNED_BY

Displays the package receiver's information.

EXPECTED_DELIVERY_US

Gives the estimated date on which a package is expected to reach the customer in US format (e.g., Jan 05, 2020).

EXPECTED_DELIVERY

Gives the estimated date on which a package is expected to reach the customer. (e.g., 05 Jan 2020).

SHIPMENT_TYPE

Displays shipment's service type (e.g., UPS Express Saver®).

DELIVERY_PROOF_URL

Directs user to the picture proof of delivery. The URL will be expired in days subject to the carrier availability. *This tag will only appear in Delivered notifications. If the email receiver is not the buyer or recipient of the order, they will need to enter the email or phone number used to place the order.

NOTE

Displays additional notes (if any).

DIRECT_TRACKING_LINK

Gives a hyperlink to the courier's tracking page.

COURIER_REDIRECT_URL

The courier’s URL where end customer can redirect their parcel

DIRECT_TRACKING_URL

The Courier's tracking page URL

SHIPPING_ADDRESS

The destination address of the shipment

BILLING_ADDRESS

Display customer's shipping address

PICKUP_LOCATION

The location from where the customer can pick up their package

ORDER_URL

Displays customer the order tracking page in which all shipments are listed. It shows the default tracking page, or a variation based on any segmentation rules.

ORDER_NUMBER

A number identifying a purchase or order placed by a customer on an eCommerce platform.

ORDER_STATUS_URL

The order status page of an eCommerce platform

ORDER_DATE

The date when the order is placed

PICKUP_TIME

Estimated pickup time or pickup deadline time for in-store pickup orders

PICKUP_LOCATION_NAME

The location name of in-store pickup location

PICKUP_ADDRESS

The location address of in-store pickup location

PICKUP_LOCATION_PHONE_NUMBER

The contact phone number of in-store pickup location

PICKUP_LOCATION_OPENING_HOUR

The opening hours of in-store pickup location

PICKUP_INSTRUCTION

The instruction for picking up order at the pickup location

Custom field

User-described fields created via API, CSV, or in the Admin. Customize notifications using custom fields (merge tags). For example, if you created “store_name” as a custom field, you can use it in notifications like “Your order from `*

STORE_NAME

*` is on the way.”


Merge tags should be in uppercase letters and enclosed by asterisks (*) on both sides, with an en dash (_) between each word.


Example: |TRACKING_URL|


How to add merge tags in emails


  1. Log into your AfterShip account.
  2. Navigate to Notifications > Flows.
  3. Edit the template for the events you wish to notify customers about.
  4. Customize the template with merge tags in sections you want and save your changes.



Where can you insert merge tags


There are several places in your email where you can insert merge tags to auto-populate relevant customer, order, and shipment related information based on the editor you've selected.


Notification type

Editor type

Editor tab

Section name

Block name

Location

Tracking Email notification

Drag-and-drop

Settings

Email subject

Email subject line

Tracking Email notification

Drag-and-drop

Content

Header

Organization name and URL

Tracking Email notification

Drag-and-drop

Image with text

Title, Description, Button text

Tracking Email notification

Drag-and-drop

Text

Description

Tracking Email notification

Drag-and-drop

Shipment items

Product and price info > Link product images to URL

Tracking Email notification

Drag-and-drop

Layout

Image with text

Title, Description, Button text

Tracking Email notification

Drag-and-drop

Text

Description

Tracking Email notification

Drag-and-drop

Hero

Text

Description

Tracking Email notification

Drag-and-drop

Product recommendations

Text title and description

Tracking Email notification

Drag-and-drop

Product documents

Title, Description, Button text

Tracking Email notification

Drag-and-drop

Footer

Title, Description, Button text

Tracking Email notification

HTML

Settings

Email subject

Email subject line

Tracking Email notification

HTML

Content

HTML

Email content

Tracking SMS notification

Text content


For any further questions or help, please contact our chat support team.

Updated on: 07/03/2025