Trigger

Overview

A trigger, more specifically a transactional trigger, allows you to execute an action in Sailthru after a specific user action takes place as a result of a sent template. Sending a transactional email with an associated trigger allows automatic updating of lists, sending of transactional emails, and even the execution of custom Zephyr scripts, all which can be set to occur upon send, open, click, or purchase.

For now, a maximum of 5 triggers can be created for a template.

Creating a Trigger

Creating a transactional trigger is simple, as the function is included in the standard template editor.

  1. Create a template or open an existing one
  2. Go to the Trigger tab and click the New trigger button.

In the above screen shot, the trigger will be executed when a transactional email is sent using the given template.

Explanation of Screen Shot Example: If a message is sent using this template at Sept. 19, 2011 at 4:00 PM EDT, the trigger will be executed on or around Sept. 19, 2011 at 4:05 PM EDT. Upon execution of that trigger, a follow up email using template "api_send_hello" will be sent to same email address.

Trigger Options

  • Event: Currently there are 4 events upon which trigger can be executed: send, open, click, purchase
  • Time: Numeric value of a given unit of time
  • Time Unit: Unit of time can be: minutes, hours, or days
  • Action: What action to take upon trigger execution. From the site UI, you can send email to followup template, add that email to another list, or execute a custom Zephyr script. Using Zephyr is the most powerful way to utilize Triggers.

Trigger API

Trigger is available via our API (Beta).

Custom Zephyr Script

Trigger actions such as "send followup email" or "add to list" can also be written using Zephyr. Trigger's possibilities are immensely increased when used with Zephyr. There are 2 special functions you can use with Trigger:

Making use of profile and message objects along with zephyr can be quite powerful.

Example:

{if message.open_time && !message.click_time}
    {api_send('template_hasnt_clicked_X_email', email, {'extra_vars' => 'Extra vars value'})}
{/if}
{if message.open_time && time("+2 days", message.send_time) < message.open} <!--  message is opened after 2 days of send ->
    {api_set_email({'lists': {'list-late-open': 1}})}
{/if}
 
/var/www/docs.sailthru.com/htdocs/data/pages/trigger.txt · Last modified: 2012/04/13 15:42 by Praj Tuladhar
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki