Recipe Options

Param Type Description
name string The recipe name. This will not be displayed to the user.
context dictionary An object describing one or more context components that collectively determine when the recipe is triggered. See “Context Options” below.
type “all” | “any” Recipe type. If “all”, all context components must be true before the recipe is triggered. If “any”, the recipe will be triggered if any context component is true
delay 0 | 5 | 15 | 30 | 60 | 300 | 900 | 1800 | 3600 Number of seconds to delay the triggering of a recipe.
limit {
count: number,
inPastInterval: number
}
Limits the triggering of attached notifications to a total count in the given past interval (sec) on a per user basis. inPastInterval is optional. When omitted, count is considered across all time.

Context Options

Param Type Description
tracked {
event: string,
conditions: Condition[]
}
Event tracked by the Set SDK. Use with count type Conditions to build interesting contexts around user in-app behavior. conditions are optional.
arrivedAt {
type: PlaceType,
conditions: Condition[]
}
User has arrived at a place. See “PlaceType” and “Condition” Options below. conditions are optional.
departedFrom {
type: PlaceType,
conditions: Condition[]
}
User has departed a place. See “PlaceType” and “Condition” Options below. conditions are optional.
atPlace {
type: PlaceType,
conditions: Condition[]
}
User is at a place. See “PlaceType” and “Condition” Options below. conditions are optional.
notAtPlace {
type: PlaceType
}
User is not at a place. See “PlaceType” Options below. conditions are optional.
onTrip {
type: TripType,
from: PlaceType,
to: PlaceType
}
User is on a trip. See “TripType” and “PlaceType” Options below.
onWifi boolean User is connected to a WiFi network
pluggedIn boolean User has their phone plugged in
moving boolean User is moving
walking boolean User is walking
running boolean User is running
cycling boolean User is cycling
automotive boolean User is driving / riding in a car, bus, or train
weekend boolean It’s a weekend for the user
morning boolean It’s morning for the user
afternoon boolean It’s afternoon for the user
evening boolean It’s evening for the user
night boolean It’s night for the user
foreground boolean The client app is foregrounded
background boolean The client app is backgrounded

PlaceType Options

Value (string / object) Description
"home" The user’s learned home place
"work" The user’s learned workplace
"any" Any place
{ location: [number, number] } A place at the provided [longitude, latitude]

TripType Options

Value (string) Description
"walking" The user is walking
"running" The user is running
"cycling" The user is cycling
"automotive" The user is driving / riding in a car, bus, or train
"any" Any of the above

Condition Options

Value (string / object) Description
"anyTime" Constrains context component to any time (default)
"normalTime" Constrains context component to a normal time as determined by history
"earlierThanNormal" Constrains context component to a time that’s earlier than normal as determined by history
"laterThanNormal" Constrains context component to a time that’s later than normal as determined by history
"anyDuration" Constrains context component to any duration (default)
"normalDuration" Constrains context component to a normal duration as determined by history
"longerThanNormal" Constrains context component to a duration that’s longer than normal as determined by history
"anyFrequency" Constrains context component to any frequency of occurrence (default)
"lowFrequency" Constrains context component to a frequency of occurrence that’s low as determined by history
"mediumFrequency" Constrains context component to a frequency of occurrence that’s medium as determined by history
"highFrequency" Constrains context component to a frequency of occurrence that’s high as determined by history
{
lessThanCount: number,
inPastInterval: number
}
Restrict the context to less than an occurrence count in a past interval (seconds). If inPastInterval is omitted, all of history is considered.
{
lessThanOrEqualToCount: number,
inPastInterval: number
}
Restrict the context to less than or equal to an occurrence count in a past interval (seconds). If inPastInterval is omitted, all of history is considered.
{
greaterThanCount: number,
inPastInterval: number
}
Restrict the context to greater than an occurrence count in a past interval (seconds). If inPastInterval is omitted, all of history is considered.
{
greaterThanOrEqualToCount: number,
inPastInterval: number
}
Restrict the context to greater than or equal to an occurrence count in a past interval (seconds). If inPastInterval is omitted, all of history is considered.
{
equalToCount: number,
inPastInterval: number
}
Restrict the context to equal to an occurrence count in a past interval (seconds). If inPastInterval is omitted, all of history is considered.

Get in touch

  • If you need help, shoot us a message at support@set.gl or ping us on our Slack community.
  • If found a bug, or have a feature request, add an Issue on the SetSDK Repo.
  • Follow us on Twitter for product updates: @everyset

results matching ""

    No results matching ""