---
title: 'Triggered Email Messages (Macros, Regions, Samples)'
description: >-
  Learn how to use macros, region tags, and sample templates to customize
  triggered email messages for orders, shipping, and delivery in Lab 50.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Table of Contents:

[General Macros](#general-macros) | [Shipping and Delivery Macros](#shipping-and-delivery-macros) | [Order Details Macros](#order-details-macros) | [Region Macros](#region-macros) | [Sample Lab 50 Triggered Messages, HTML](#sample-lab-50-triggered-messages-html) | [Sample PDF shipping label form (copy the Google Sheet and edit, then download to pdf, send to PF)](#sample-pdf-shipping-label-form-copy-the-google-sheet-and-edit-then-download-to-pdf-send-to-pf)

For available macros, right-click in the message body when setting up your email in Lab 50.

![](/images/store-setup/triggered-email-messages-macros-regions-samples/101744760.png)

## General Macros

\{%dealer\_name%\}  
\{%dealer\_web\_site%\}  
\{%dealer\_phone%\}  
\{%dealer\_email%\}  
\{%dealer\_unsubscribe\_url%\}

\{%dealer\_logo\_header%\}  
\{%dealer\_logo\_footer%\}  
\{%dealer\_logo\_thumbnail%\}  
\{%dealer\_logo\_invoice%\}

\{%customer\_email%\}  
\{%customer\_first\_name%\}  
\{%customer\_last\_name%\}  
  
\{%billing\_address%\}  
\{%billto\_street%\}  
\{%billto\_city%\}  
\{%billto\_region%\}  
\{%billto\_postalcode%\}  
\{%billto\_country%\}  
\{%billto\_phone%\}

\{%shipping\_address%\}  
\{%shipto\_first\_name%\}  
\{%shipto\_last\_name%\}  
\{%shipto\_company%\}  
\{%shipto\_street%\}  
\{%shipto\_city%\}  
\{%shipto\_region%\}  
\{%shipto\_postalcode%\}  
\{%shipto\_country%\}  
\{%shipto\_phone%\}  
\{%shipto\_email%\}

\{%item\_name%\}  
\{%item\_description%\}  
\{%item\_quantity%\}  
\{%item\_price%\}  
\{%item\_total%\}

\{%order\_number%\}  
\{%order\_date%\}  
\{%order\_total%\}  
\{%order\_discount%\}  
\{%order\_service\_fee%\}  
\{%order\_status\_url%\} >> for subscribers to the [Shipment & Delivery Master Bundle](https://www.photofinale.com/bundles/) this links to your PF site's order status page with detailed tracking and delivery info. If you do not have this Bundle, the order status page will have a link to the carrier's website.

\{%rush\_order\_fee%\}  
\{%order\_subtotal%\}  
\{%order\_tax%\}  
\{%order\_shipping\_total%\}  
\{%order\_details%\}  
\{%order\_source%\}  
\{%shipping\_method%\}  
\{%store\_location%\}  
\{%store\_name%\}  
\{%store\_number%\}  
\{%store\_phone%\}  
\{%store\_address%\}  
\{%store\_hours%\}  
\{%apple\_wallet\_id%\}

\{%date%\}  
\{%today%\}

## Shipping and Delivery Macros

>> Go to this page for these macros [https://wiki.photofinale.com/pages/viewpage.action?pageId=159875136](/store-setup/order-completion-notifications/marketplace-bundle-notes-for-emails)

## Order Details Macros

These macros are used for the repeating section where the order details are displayed.

##### Aggregated-Items Global Macros

- \{%item\_name%\}
- \{%item\_quantity%\}
- \{%item\_baseprice%\}
- \{%item\_baseprice\_qty%\}
- \{%item\_baseprice\_subtotal%\}
- \{%item\_subtotal%\}

##### Aggregated-Item-Discount Subsection Macros

- \{%discount\_name%\}
- \{%discount\_quantity%\}
- \{%discount\_price%\}
- \{%discount\_savings%\}
- \{%discount\_subtotal%\}

##### Aggregated-Item-Personalization Subsection Macros

- \{%personalization%\}

## Region Macros

Region macros allow you to include/exclude a section of an email message based on a real-time order value.  Examples:

- If one pickup location is closed on Sundays, your Order Confirmation and Order Ready for Pickup emails could show a special "Reminder: This location is closed on Sundays" message for orders that are destined for pickup there.
- You could include a message about a special discount code for future orders in the Order Confirmation message for members only.
- You can include separate information on production times if an order contains supplier-fulfilled products that are produced offsite and shipped.

#### Syntax

A region macro requires a matching start region tag and end region tag.  The tags are matched using the *name* parameter.  The *name* is only used for matching the start and end, so it can be anything that is unique within the email message.

**Example Start & End Tags**

```xml
<!-- pf-region name="XXX" -->
      HTML CONTENT HERE
<!-- pf-region-end name="XXX" --> 
```

The start region tag also includes a *variable* parameter which indicates what variable is the comparison criteria, and a value parameter which is the value to match.  For example:

**Example OrderType Region Macro**

```xml
<!-- pf-region name="PickupOrders" variable="OrderType" value="pickup" -->
      HTML CONTENT HERE
<!-- pf-region-end name="PickupOrders" --> 
```

#### Reference Guide

The complete list of available variables and associated values:

| Variable                  | Accepted Values                                        | Description                                                                                                                                                                                                                                                                          |
|:--------------------------|:-------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| OrderType                 | pickup <br/> mail                                      |                                                                                                                                                                                                                                                                                      |
| CustomerType              | guest <br/> member                                     |                                                                                                                                                                                                                                                                                      |
| OrderSource               | web <br/> app <br/> kiosk <br/> pro                    |                                                                                                                                                                                                                                                                                      |
| ProductMix                | local <br/> supplier <br/> both <br/> supplier-or-both |                                                                                                                                                                                                                                                                                      |
| PickupLocationId          | &lt;id>                                                   | This is the PF database ID for the specified location, which can be found by going to the Store Details page on myLab and grabbing the ID from the final section of the URL.  For example "58114" if the URL was: https://mylab.photofinale.com/StoreManagement/Locations/Edit/58114 |
| PickupLocationStoreNumber | &lt;number>                                               | This is the configured value in the "Store Number (Optional)" field on the Store Details page.                                                                                                                                                                                       |
| IncludesProductTag        | &lt;tag>                                                  | If a product with the specified tag is in the order, the region will be shown.                                                                                                                                                                                                       |

#### Nested Regions

Nested Regions are supported, for example:

**Example OrderType Region Macro**

```xml
<!-- pf-region name="PickupOrders" variable="OrderType" value="pickup" -->

    <!-- pf-region name="SupplierOrders" variable="ProductMix" value="supplier" -->

        HTML CONTENT: Your order is being fulfilled by a supplier, we'll call you when your order is ready for pickup in 7-10 business days.
 
    <!-- pf-region-end name="SupplierOrders" --> 

<!-- pf-region-end name="PickupOrders" --> 
```

#### Else Statements

A region can include an "ELSE" clause, which will be shown if the region criteria is false, for example:

**Example OrderType Region Macro**

```xml
<!-- pf-region name="LongLeadTimeProducts" variable="IncludesProductTag" value="slow-products" -->

    HTML CONTENT: Your order will be ready in 7-10 days.
 
<!-- pf-region-else name="LongLeadTimeProducts" --> 

     HTML CONTENT: Your order will be ready in 3-4 days.

<!-- pf-region-end name="LongLeadTimeProducts" --> 
```

## Sample Lab 50 Triggered Messages, HTML

[lab50-emails1.zip](..\..\..\..\..\attachments\.zip)

## Sample PDF shipping label form (copy the Google Sheet and edit, then download to pdf, send to PF)

For use with this sample email:  simple\_order-confirmation-2-for-film.html

[https://docs.google.com/document/d/1-o5kRkHiOHUVZn8os7GosFSrXLJ1pTeeOx3iKfnA8u0/copy](https://docs.google.com/document/d/1-o5kRkHiOHUVZn8os7GosFSrXLJ1pTeeOx3iKfnA8u0/copy)
