API Call: trigger

This API call is still in beta phase. To learn more, please email support@sailthru.com

Overview

Create a transactional trigger for a valid template that is automatically executed in response to certain events on a given time

Currently, only 5 triggers per template are allowed. This is subject to increase in the future.

Specification

Base URL

https://api.sailthru.com/trigger

GET mode

Conditional Required Parameters: template, executed, scheduled
Parameter Description Example
template Name of the template welcome-new-york-template
Optional Parameters
Parameter Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000

When template parameter is used, all corresponding trigger(s) associated that template will be returned

Return Value
Field Description Example
template Name of the template welcome-new-york-template
triggers List of trigger Items

Each trigger item has following structure

Field Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000
time Trigger time something like 10 mins 2 days 75 minutes
event Event click or open or send or purchase
zephyr Zephyr Syntax {api_send("template_name")}
Required Parameters
Parameter Description Example
executed Show executed triggers 1
Optional Parameters
Parameter Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000

When executed parameter is used, all executed triggers will be returned.

Return Value
Field Description Example
triggers List of trigger Items

Each trigger item has following structure

Field Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000
profile_id Profile Id of a user 4e40c53f030ed9876ee2f012
scheduled_time When that trigger was scheduled Thu, 06 Jan 2011 16:20:55 -0500
executed_time When that trigger was executed Thu, 06 Jan 2011 17:20:55 -0500
zephyr Zephyr Syntax {api_send("template_name")}
Required Parameters
Parameter Description Example
scheduled Show scheduled triggers 1

When scheduled parameter is used, all scheduled triggers will be returned.

Optional Parameters
Parameter Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000
Return Value
Field Description Example
triggers List of trigger Items

Each trigger item has following structure

Field Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000
profile_id Profile Id of a user 4e40c53f030ed9876ee2f012
scheduled_time When that trigger was scheduled Thu, 06 Jan 2011 16:20:55 -0500
zephyr Zephyr Syntax {api_send("template_name")}

POST mode

Create a trigger

Required Parameters
Parameter Description Example
template Name of the template welcome-new-york-template
time Trigger time, must be integer value 10
time_unit Trigger time unit minutes or hours or days
event Event click or open or send or purchase
zephyr Zephyr Syntax {api_send("template_name")}
Return Value

Same as of GET mode

DELETE mode

Delete existing single trigger or all triggers for a template

Parameter Description Example
template Name of the template welcome-new-york-template
Optional Parameters
Parameter Description Example
trigger_id Trigger ID 4e2f17e46803fa2847000000

if trigger_id parameter is not present, all triggers associated with the template will be deleted

Return Value

Same as of GET mode

 
/var/www/docs.sailthru.com/htdocs/data/pages/api/trigger.txt · Last modified: 2011/10/27 14:10 by David Studinski
 
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