Trigger Custom Zephyr Script Examples

Please see below for examples of custom Zephyr scripts for Triggers. Please contact Support if you have questions.


{* this is a comment *} <– This is a comment in Zephyr

Example Scripts

Send Trigger Email if Subscriber Has Not Opened or Clicked (on the initial email)

1. Update the trigger information as below:

2. In the Zephyr field, include a custom script:

{if message.click_time}
{else if message.open_time}


In the example above, a template called “followup_on_noclick_email” will be sent as a trigger (transactional) if the subscriber does not click or open within 1 day.


Set a Variable on a Subscriber (1 minute after the initial email is sent)

In the example above, a new variable called “received_welcome_time” would be posted to the user profile one minute after the host transactional is sent. The value of that variable would be a timestamp, using the time function.

In addition, you could then check against that variable for future sends. You could use the assert function to check that variable and if it returns false, another transactional email would not be sent.

For example, in the template editor of that other transactional email, you could include assert in the Advanced tab under the Setup field:

If the subscriber has a value/timestamp on the variable “received_welcome_time” on their profile (assert is true), the transactional will send. If assert evaluates to false (no timestamp), the transactional would not be sent.


Follow Up to an Incomplete Purchase

After an incomplete purchase, send a follow-up if user still has an incomplete purchase the next day, or if they have purchased send a different email. See our doc on the profile object.

{if profile.incomplete_purchase}
{else if profile.purchase}