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 and custom fields along with their descriptions:


  1. Merge tags


Category

Merge tag name

Merge tag

Description

Mock data

Trigger

Email

SMS

ORGANIZATION

Organization name

ORGANIZATION_NAME

Display the organization name from Organization Settings.

{The organization's actual name}

All

YES

YES

Organization URL

ORGANIZATION_URL

Display the website URL from Organization Settings (e.g., https://organization.automizely.io/settings/general).

{The organization's actual website URL}

All

YES

YES

EMAIL

Emails

EMAILS

Display the customer email addresses, separated by commas (",").

email@example.com

Shipment status, EDD

YES

NO

To email

TO_EMAIL

Display the receiver’s email address for the notification.

email@example.com

Shipment status, EDD

YES

NO

Sent from email

SENT_FROM_EMAIL

Display the "Send info" email address.

{The email template's actual sender email} – "email@example.com"

Shipment status, EDD

YES

NO

SHIPMENT

Title

SHIPMENT_TITLE

Display the tracking title.

ABC123

Shipment status, EDD

YES

YES

Tracking number

TRACKING_NUMBER

Display the tracking number.

TEST9999999001

Shipment status, EDD

YES

YES

Tracking URL

TRACKING_URL

Display the AfterShip branded tracking page URL (e.g., https://example.aftership.com/1Z8E).

The organization's real tracking url of test tracking number

Shipment status, EDD

YES

YES

Tracking link

TRACKING_LINK

Display the tracking URL with hyperlink, used in the email notification (e.g., {{TRACKING_URL}}).

The organisation’s real tracking page url <a href="{https://xxx.aftership.com}/ABC123">{https://xxx.aftership.com}/ABC123</a>

Shipment status, EDD

YES

NO

Direct tracking URL

DIRECT_TRACKING_URL

Display the courier tracking page URL.

https://example.couriertrackingurl.com

Shipment status, EDD

YES

YES

Direct tracking link

DIRECT_TRACKING_LINK

Provide a hyperlink to the courier’s tracking page.

<a href="https://example.couriertrackingurl.com" > https://example.couriertrackingurl.com</a>

Shipment status, EDD

YES

NO

Shipment status

SHIPMENT_STATUS

Display the AfterShip tracking status.

"Shipment status trigger display The flow trigger name" – "In transit"

Shipment status, EDD

YES

YES

Shipment detail status

SHIPMENT_DETAILED_STATUS

Display the shipment status details.

On the Way

Shipment status, EDD

YES

YES

Location 1

SHIPMENT_LATEST_LOCATION

Display the current shipment location.

13th Street, New York, NY, 10011, USA, United States

Shipment status, EDD

YES

YES

Shipment last update time

SHIPMENT_LAST_UPDATE_TIME

Display the checkpoint time.

2024.12.31 12:59 NOTE: change the format based Settings

Shipment status, EDD

YES

YES

Expected delivery

EXPECTED_DELIVERY

Display the expected delivery date.

2024.12.31 12:59 NOTE: change the format based on Settings

Shipment status, EDD

YES

YES

Delivered date

DELIVERED_DATE

Display the actual delivery date.

2024.12.31 12:59 NOTE: change the format based on Settings

Shipment status, EDD

YES

YES

Pickup location

PICKUP_LOCATION

Display the parcel pickup location (merchant-defined value overrides carrier value).

7407 N Oak Trafficway, Mockdata City, 54467, US, United States

Shipment status, EDD

YES

YES

Signed by

SIGNED_BY

Display the recipient’s signature for the parcel.

Steve Young

Shipment status, EDD

YES

YES

Shipment type

SHIPMENT_TYPE

Display the shipment service type (e.g., UPS Express).

FedEx SmartPost

Shipment status, EDD

YES

YES

Note

SHIPMENT_NOTE

Display any additional notes (if available).

Special notes

Shipment status, EDD

YES

YES

Delivery proof URL (Not show in merge tag lists)

DELIVERY_PROOF_URL

Display the proof of delivery image URL.

https://example.deliveryproof.com

Shipment status

YES

YES

CARRIER

Courier

COURIER

Display the courier name for this checkpoint.

FedEx

Shipment status, EDD

YES

YES

Courier contact

COURIER_CONTACT

Display the courier phone number.

12223334444

Shipment status, EDD

YES

YES

Courier redirect URL

COURIER_REDIRECT_URL

Display the official link to modify delivery time.

https://example.courierredirecturl.com

Shipment status, EDD

YES

YES

Last mile tracking number

LAST_MILE_TRACKING_NUMBER

Display the last-mile tracking number.

TEST9999999001

Shipment status, EDD

YES

YES

Last mile carrier tracking URL

LAST_MILE_CARRIER_TRACKING_URL

Display the last-mile carrier tracking page URL.

https://example.lastmiledirecttrackingurl.com

Shipment status, EDD

YES

YES

Last mile carrier

LAST_MILE_CARRIER

Display the last-mile carrier name.

UPS

Shipment status, EDD

YES

YES

Last mile carrier contact

LAST_MILE_CARRIER_CONTACT

Display the last-mile carrier phone number.

15550100

Shipment status, EDD

YES

YES

Last mile carrier redirect URL

LAST_MILE_CARRIER_REDIRECT_URL

Display the URL to modify the delivery address (last-mile carrier page).

https://example.lastmilecarrierredirecturl.com

Shipment status, EDD

YES

YES

ORDER

Order number

ORDER_NUMBER

Display the order number (a unique sequence of numbers and/or letters assigned to each order).

TEST5053002020

All

YES

YES

Order ID

ORDER_ID

Display the order ID (unique identifier assigned to each order).

6845a095a27a4caeb27487806f0 58add

All

YES

YES

Order name

ORDER_NAME

Display the order name (descriptive name assigned to the order).

#1000

All

YES

YES

Order path

ORDER_PATH

Display the order page URL on your Commerce store (Tracking API order_id_path only).

https://example.orderpathofyourstore.com

All

YES

YES

Order URL

ORDER_URL

Display the order-level branded tracking page URL.

The org’s real tracking page url+{ABC123}. e.g. {https://xxx.aftership.com}/?c_token=Bxc%2BBEMERFFVUUNicUMHU3ZRShgCXwUhDAUBADIAXQ4BCFpZHjF3&tracking-number=ABC123

All

YES

YES

Order status URL

ORDER_STATUS_URL

Display the Shopify order page URL (Shopify only).

https://example.orderstatusofyourstore.com

All

YES

YES

Order date

ORDER_DATE

Display the order placement date.

2024.12.31 12:59 NOTE: Change the format based on the Settings

All

YES

YES

Pickup time

PICKUP_TIME

Display the estimated pickup time before items are ready for pickup. Display the pickup deadline after items are ready for pickup.

2024.12.31 12:59

All

YES

YES

Pickup location name

PICKUP_LOCATION_NAME

Display the in-store pickup location name.

AfterShip pickup store

In-store pickup trigger

YES

YES

Pickup address

PICKUP_ADDRESS

Display the in-store pickup location address.

13th Street, New York, NY, 10011, USA, United States

In-store pickup trigger

YES

YES

Pickup location phone number

PICKUP_LOCATION_PHONE_NUMBER

Display the in-store pickup location phone number.

(+)12223334444

In-store pickup trigger

YES

YES

Pickup opening hours

PICKUP_LOCATION_OPENING_HOUR

Display the in-store pickup location opening hours.

In-store pickup trigger

YES

YES

Pickup instruction

PICKUP_INSTRUCTION

Display the pickup instructions for the pickup location.

Bring your confirmation email when you come to collect your order.

In-store pickup trigger

YES

YES

CUSTOMER

Customer name

CONTACT_NAME

Display the full name of the notification recipient.

Steve Young

All

YES

YES

Customer First name

CONTACT_FNAME

Display the first name of the notification recipient.

Steve

All

YES

YES

Customer Last name

CONTACT_LNAME

Display the last name of the notification recipient.

Young

All

YES

YES

Ship-to name

SHIP_TO_NAME

Display the name of the order recipient.

John Doe

Shipment status, EDD, pre-shipment trigger, Split order summary

YES

YES



  1. Custom fields


Category

Custom field name

Merge tag

Example

Description

Mock data

Trigger

Email

SMS

SHIPMENT

{custom field name}

Change customer field name character to capital, and enclosed them by bars and asterisks on both sides, with an en dash ( _ ) between each word.

The custom fields that described by users and created via API, CSV or on Admin. You can customize your notification use custom field. - For example, you created "store_name" as one of the custom field in the API or CSV, what you can do is to type "You order purchased in STORE_NAME is on the way."

Shipment status, EDD

YES

YES

YES

ORDER

{custom field name}

Change customer field name character to capital, and enclosed them by bars and asterisks on both sides, with an en dash ( _ ) between each word.

The custom fields that described by users and created via Commerce API. You can customize your notification use custom field. - For example, you created "store_name" as one of the custom field in the API or CSV, what you can do is to type "You order purchased in STORE_NAME is on the way."

Custom field example

Pre-shipment trigger, In-store pickup trigger, Split order summary

YES

YES


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

Example: *|TRACKING_URL|*


How to add merge tags in emails


  1. Navigate to Notifications > Flows in your AfterShip Tracking admin.
  2. Edit the template (Email or SMS) for the events (shipment statuses) you wish to notify customers about.
  3. Customize the sections of the template where merge tags are supported depending upon what information you want to share with your customers.
  4. Save the 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

Basic email editor

Settings

Email subject

Email subject line

Tracking Email notification

Basic email editor

Layers

Header

Organization name and URL

Tracking Email notification

Basic email editor

Image with text

Title, Description, Button text

Tracking Email notification

Basic email editor

Text

Description

Tracking Email notification

Basic email editor

Shipment items

Product and price info > Link product images to URL

Tracking Email notification

Basic email editor

Layout

Image with text

Title, Description, Button text

Tracking Email notification

Basic email editor

Text

Description

Tracking Email notification

Basic email editor

Hero

Text

Description

Tracking Email notification

Basic email editor

Product documents

Title, Description, Button text

Tracking Email notification

Basic email editor

Other items in order

Product images destination URL

Tracking Email notification

Basic email editor

Footer

Description

Tracking Email notification

Advanced email editor

Blocks

Elements

Text

Description

Tracking Email notification

Advanced email editor

Blocks

Elements

Accordion

Title, Description

Tracking Email notification

Advanced email editor

Blocks

Elements

Button

Destination URL

Tracking Email notification

Advanced email editor

Blocks

Elements

Image

Destination URL

Tracking Email notification

HTML

Settings

Email subject

Email subject line

Tracking Email notification

HTML

Content

HTML

Email content

Tracking SMS notification

Text content



Additional resources



Need help?


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

Updated on: 13/02/2026