Skip to main content
A scheduled automation runs a query on a schedule to select a set of profiles (or records), then runs its actions on each match. The query is chosen with the automation’s query field and tuned with its arguments. This page lists the available queries and what every argument does.

How an automation is set up

FieldMeaning
nameA label for the automation.
queryWhich rule to run, the query name, for example dailySpend (see the reference below).
argumentsSettings that tune the query (see Argument format).
typescheduled for a recurring automation, or date for a one-off on a specific day.
slotFor scheduled: the time of day it runs, as a slot handle, for example AU-MEL-7 (07:00 Melbourne time).
dateFor date: the day it should run (YYYY-MM-DD).
frequencyHow often a scheduled automation runs: daily (default), weekly, fortnightly, or monthly.
run_atPairs with frequency: day of the month (monthly) or day of the week (weekly/fortnightly).
taskableHow matches are processed (see Processing mode).
is_activeOnly active automations run.
descriptionOptional free text.
actionsWhat to do for each match. See Reactions overview.

Processing mode (taskable)

By default (taskable is false) an automation processes every match in a single run, dispatching the actions as it goes. Set taskable to true to instead queue each match and process it individually in the background. This mode suits large audiences and is safe to re-run: if the same run happens again, or a missed run is caught up later, the same profile is not processed twice for that run. Use it when an automation may match a very large number of profiles, or where reliable, no-duplicate processing matters.

Argument format

Each query is tuned with a set of named arguments. The examples below use a shorthand of name: value, for example:
{
  "min_spend": 100,
  "max_spend": 500
}
Only the arguments listed for a query have any effect. Time-based automations always work relative to the day they run.

What the action receives

For most automations the action runs against the matched profile. Some queries also pass extra data the action can use:
  • Spend totals (dailySpendTotalByItem, dailySpendTotalByItemProduct) pass the calculated spend value, so you can give a reward proportional to spend.
  • Returns (dailyReturnAmountByItem) pass the calculated return value.
  • Stock changes (lastStockChangeList) pass the products that changed.
  • List items (unpurchasedListItems) pass the items not yet bought.
  • Connected birthday (upcomingConnectedBirthMonth) runs against the profile’s linked primary account (for example a parent for a dependant).
  • Expired reservations (expiredReservations) run against the reservation itself, including its profile and item.

Query reference

Each entry gives the query name (the value for the query field), what it targets, an argument table, any behaviour worth noting, and an example. In filter arguments, set type to include or exclude (for discount_reason_filter, allow or block).

Spend and transactions

dailySpend

Targets profiles whose total spend yesterday reached min_spend (and, optionally, no more than max_spend). The classic “spend $X, get a reward” automation.
ArgumentRequiredTypeDefaultWhat it does
min_spendYesnumbernoneMinimum total spend yesterday.
max_spendNonumbernoneOptional upper limit on yesterday’s spend.
delayNonumber3Grace window (days) so transactions recorded a little late are still counted.
timezoneNotextAustralia/MelbourneSets what counts as “yesterday” for the automation.
location_filterNoobjectnoneOnly (or never) count transactions at the given location IDs. Shape: { type, ids }.
dateNoYYYY-MM-DDnoneOnly run on this exact date; leave blank for normal recurring runs.
A profile that already received a spend reward that day is not matched again.
{
  "min_spend": 100,
  "max_spend": 500,
  "timezone": "Australia/Melbourne"
}

dailySpendByItem

Like dailySpend, but spend is counted from the individual items bought, so you can target spend on particular products, SKUs, or discount conditions.
ArgumentRequiredTypeDefaultWhat it does
min_spendYesnumbernoneMinimum item spend yesterday.
max_spendNonumbernoneOptional upper limit.
delayNonumber3Grace window (days) for late-recorded transactions.
timezoneNotextAustralia/MelbourneSets what counts as “yesterday”.
location_filterNoobjectnoneOnly (or never) count transactions at the given location IDs. Shape: { type, ids }.
sku_filterNoobjectnoneOnly (or never) count the given product SKUs. Shape: { type, values }.
discount_filterNoobjectnoneLimit to discounted or full-price products. Shape: { type }, where include is discounted only and exclude is full-price only.
discount_reason_filterNoobjectnoneFilter by discount reason. Shape: { type, keyword }, where allow counts an item only if every discount reason mentions the keyword and block skips an item if any does.
exclude_discountNotrue/falsenoneIgnore items that were discounted at the register.
dateNoYYYY-MM-DDnoneOnly run on this exact date; leave blank for normal recurring runs.
A profile that already received a spend reward that day is not matched again.
{
  "min_spend": 50,
  "sku_filter": {
    "type": "include",
    "values": ["SKU-1", "SKU-2"]
  }
}

dailySpendTotalByItem

Same targeting as dailySpendByItem, and it also calculates each profile’s exact qualifying spend and passes it to the action, for rewards proportional to spend.
ArgumentRequiredTypeDefaultWhat it does
min_spendYesnumbernoneMinimum item spend.
convert_rateNonumber1Multiplier applied to the calculated spend before it is passed to the action (for example dollars to points).
exclude_returnNotrue/falsenoneIgnore returned items when totalling.
delayNonumber3Grace window (days) for late-recorded transactions.
timezoneNotextAustralia/MelbourneSets what counts as “yesterday”.
location_filterNoobjectnoneOnly (or never) count transactions at the given location IDs. Shape: { type, ids }.
sku_filterNoobjectnoneOnly (or never) count the given product SKUs. Shape: { type, values }.
discount_filterNoobjectnoneLimit to discounted or full-price products. Shape: { type }.
discount_reason_filterNoobjectnoneFilter by discount reason. Shape: { type, keyword }, allow or block as above.
exclude_discountNotrue/falsenoneIgnore items discounted at the register.
staff_discount_filterNotextnoneIgnore items whose discount mentions this keyword (for example a staff discount).
dateNoYYYY-MM-DDnoneOnly run on this exact date.
start_dateNoYYYY-MM-DD HH:MM:SSnoneOnly count transactions on or after this point (for totals running from a launch date).
Unlike the other spend automations, this one does not prevent matching a profile twice in the same day. Use a date setting or idempotent actions if same-day re-runs are possible.
{
  "min_spend": 100,
  "convert_rate": 0.1,
  "exclude_return": true
}

dailySpendTotalByItemProduct

The most filterable spend automation: everything dailySpendTotalByItem does, plus product-tag targeting and a configurable per-day reward cap.
ArgumentRequiredTypeDefaultWhat it does
min_spendYesnumbernoneMinimum item spend.
convert_rateNonumber1Multiplier applied to the calculated spend before it is passed to the action.
exclude_returnNotrue/falsenoneIgnore returned items.
max_reward_issuedNonumber (min 1)1Skip a profile only once they have already received this many spend rewards today.
product_tags_filterNoobjectnoneOnly (or never) count products with the given tag IDs. Shape: { type, ids }.
delayNonumber3Grace window (days) for late-recorded transactions.
timezoneNotextAustralia/MelbourneSets what counts as “yesterday”.
location_filterNoobjectnoneOnly (or never) count transactions at the given location IDs. Shape: { type, ids }.
sku_filterNoobjectnoneOnly (or never) count the given product SKUs. Shape: { type, values }.
discount_filterNoobjectnoneLimit to discounted or full-price products. Shape: { type }.
discount_reason_filterNoobjectnoneFilter by discount reason. Shape: { type, keyword }, allow or block as above.
exclude_discountNotrue/falsenoneIgnore items discounted at the register.
staff_discount_filterNotextnoneIgnore items whose discount mentions this keyword.
dateNoYYYY-MM-DDnoneOnly run on this exact date.
start_dateNoYYYY-MM-DD HH:MM:SSnoneOnly count transactions on or after this point.
{
  "min_spend": 80,
  "product_tags_filter": {
    "type": "include",
    "ids": [10, 11]
  },
  "max_reward_issued": 2
}

bigShop

Targets profiles who spent over min_spend on a single day, a “big basket” trigger. Profiles who changed tier around that time are excluded, so it does not fire just because someone was upgraded.
ArgumentRequiredTypeDefaultWhat it does
min_spendYesnumbernoneMinimum spend on the day evaluated.
delayNonumber3Which recent day to evaluate (how many days back).
{
  "min_spend": 300,
  "delay": 3
}

firstShop

Targets profiles who made their first transaction yesterday, for welcome and first-transaction journeys.
ArgumentRequiredTypeDefaultWhat it does
max_spendNonumbernoneOptional cap on the first transaction total.
channelNoweb or posnoneOnly count a first transaction made through this channel.
{
  "channel": "pos",
  "max_spend": 200
}

Returns

dailyReturnAmountByItem

Targets profiles who returned at least min_return worth of items yesterday. The calculated return value is passed to the action.
ArgumentRequiredTypeDefaultWhat it does
min_returnYesnumbernoneMinimum returned value.
convert_rateNonumber1Multiplier applied to the calculated return value before it is passed to the action.
reward_definition_typeNotextnoneOnly profiles who were issued a reward of this type today.
reward_definition_handleNotextnoneOr of this specific reward definition (takes priority over type).
achievement_definition_idNonumbernoneIf set, the profile’s achievement progress is passed to the action.
delayNonumber3Grace window (days) for late-recorded returns.
timezoneNotextAustralia/MelbourneSets what counts as “yesterday”.
location_filterNoobjectnoneOnly (or never) count returns at the given location IDs. Shape: { type, ids }.
sku_filterNoobjectnoneOnly (or never) count the given product SKUs. Shape: { type, values }.
dateNoYYYY-MM-DDnoneOnly run on this exact date.
start_dateNoYYYY-MM-DD HH:MM:SSnoneOnly count returns on or after this point.
The return value passed to the action is negative (returns reduce value).
{
  "min_return": 50,
  "reward_definition_type": "spend"
}

Lifecycle and recency

lapsed

Targets profiles whose last transaction was exactly N days ago, for win-back at a fixed point.
ArgumentRequiredTypeDefaultWhat it does
daysYesnumbernoneExact number of days since the last transaction.
tierNotext (tier handle)noneLimit to a tier.
This is an exact match, not “N days or more”, so choose the single day to fire on.
{
  "days": 30,
  "tier": "gold"
}

inactiveProfiles

Targets long-inactive profiles, based on how long ago they joined and (optionally) how long since their last transaction, with extra filters.
ArgumentRequiredTypeDefaultWhat it does
join_unitYesdays/weeks/months/yearsnoneUnit for “joined at least ago”.
join_valueYesnumbernoneQuantity for join_unit.
last_shop_unitNodays/weeks/months/yearsnoneIf set, require the last transaction to be older than this. If left out, require no transactions at all.
last_shop_valueNonumbernoneQuantity for last_shop_unit.
comms_operatorNoand or ornoneHow to combine comms_filter conditions.
comms_filterNoobjectnoneMatch on the profile’s communication preferences.
status_filterNoobjectnoneOnly (or never) include profiles with the given status handles. Shape: { type, handles }.
timezoneNotextAustralia/MelbourneSets the day boundary for the windows.
{
  "join_unit": "months",
  "join_value": 6,
  "last_shop_unit": "months",
  "last_shop_value": 3
}

joinDate

Targets profiles who joined exactly a set time ago, for timed onboarding messages. Supports an hourly option as well as days/weeks/months/years.
ArgumentRequiredTypeDefaultWhat it does
unitYeshours/days/weeks/months/yearsnoneWindow unit.
valueYesnumbernoneQuantity for unit.
delay_hourNonumbernoneExtra hour offset (only used with unit of hours).
no_transactionNotrue/falsenoneOnly profiles who have never transacted.
no_orderNotrue/falsenoneOnly profiles who have never ordered.
timezoneNotextAustralia/MelbourneSets the day boundary for the window.
{
  "unit": "days",
  "value": 7,
  "no_transaction": true
}

lastShop

Targets profiles whose last transaction date was exactly N units ago, optionally only if they have not already received a given reward since.
ArgumentRequiredTypeDefaultWhat it does
unitYesdays/weeks/months/yearsnoneWindow unit.
valueYesnumbernoneQuantity for unit.
rewardNotext (reward handle)noneSkip profiles already given this reward since the target date.
timezoneNotextAustralia/MelbourneSets the day boundary for the window.
{
  "unit": "weeks",
  "value": 6,
  "reward": "weve-missed-you"
}

Dates and anniversaries

joinAnniversary

Targets profiles whose join anniversary (same day and month, in a later year) is today.
ArgumentRequiredTypeDefaultWhat it does
tierNotext (tier handle)noneLimit to a tier.
It never fires in the year the profile joined, only on later anniversaries.
{
  "tier": "platinum"
}

upcomingBirthdays

Targets profiles with a birthday today, or a set number of days away, who have not already had this year’s birthday reward or benefit.
ArgumentRequiredTypeDefaultWhat it does
same_dayNotrue/falsefalseMatch today’s birthdays instead of a future lead day.
daysNonumber (max 60)7How many days ahead to look (ignored when same_day is true).
tierNotext (tier handle)noneLimit to a tier.
typeNoreward or benefitrewardWhich previous gift to check against, so profiles are not gifted twice.
definitionNotextnoneFor type of benefit: which benefit to check against.
last_shop_daysNonumbernoneOnly profiles who transacted within the last N days.
{
  "same_day": false,
  "days": 14,
  "last_shop_days": 365
}

upcomingConnectedBirthMonth

Targets profiles whose birth month is the current month, and runs the action against their linked primary account, for example to notify a parent about a dependant’s birthday month.
ArgumentRequiredTypeDefaultWhat it does
profile_typeYestextnoneWhich profile type to match (for example dependant, active).
typeNoreward or benefitrewardWhich previous gift to check against.
definitionNotextnoneWhich benefit to check against (for type of benefit).
last_transaction_itemNoobjectnoneRequire a recent matching transaction detail. Shape: { namespace, handle, days }.
Profiles without a linked primary account are skipped.
{
  "profile_type": "dependant",
  "type": "benefit",
  "definition": "birthday-gift"
}

upcomingTierAnniversary

Targets profiles whose tier anniversary is a set period away, for renewal reminders.
ArgumentRequiredTypeDefaultWhat it does
countYesnumbernoneHow many units ahead the anniversary is.
unitYesdays/weeks/monthsnoneLead-time unit.
tier_handleNolist of textnoneLimit to these tiers.
{
  "count": 1,
  "unit": "months",
  "tier_handle": ["gold", "platinum"]
}

Tier, status and points

profileTier

Targets all profiles currently in a given tier.
ArgumentRequiredTypeDefaultWhat it does
tierYestext (tier handle)noneThe tier to match.
{
  "tier": "gold"
}

tierAchieved

Targets profiles who newly reached one of the given tiers on a target day (genuine upgrades, not renewals), optionally only if they also transacted that day.
ArgumentRequiredTypeDefaultWhat it does
tiersYeslist of tier handlesnoneTiers to match.
countYesnumbernoneHow many units ago the upgrade happened.
unitYesdays/weeks/monthsnoneOffset unit.
check_spendNotrue/falsenoneAlso require a transaction that day.
{
  "tiers": ["gold"],
  "count": 1,
  "unit": "days",
  "check_spend": true
}

profileStatuses

Targets profiles who have held one of the given statuses for at least N days.
ArgumentRequiredTypeDefaultWhat it does
statusesYeslist of status handlesnoneStatuses to match.
daysYesnumbernoneMinimum days since the status was applied.
timezoneNotextAustralia/MelbourneSets the day boundary for the window.
{
  "statuses": ["vip"],
  "days": 30
}

magasinVIPStatuses

Targets profiles holding a benefit whose definition carries a given tag, optionally split by whether the benefit has been used.
ArgumentRequiredTypeDefaultWhat it does
benefit_definition_tagYestext (tag handle)noneThe tag on the benefit definition.
has_redemptionNotrue/falsefalseOnly benefits that have been redeemed.
no_redemptionNotrue/falsefalseOnly benefits that have not been redeemed.
{
  "benefit_definition_tag": "vip",
  "no_redemption": true
}

pointBalance

Targets profiles whose remaining points balance for a given point definition is at least min, for “use your points” reminders.
ArgumentRequiredTypeDefaultWhat it does
minYesnumbernoneMinimum remaining balance.
point_definition_handleYestextnoneWhich point definition to total.
statusesNolist of status handlesnoneLimit to these statuses.
day_of_weekNonumbernoneMeasure the balance as at this day of the previous week.
timezoneNotextnoneTimezone for day_of_week.
{
  "min": 500,
  "point_definition_handle": "points"
}

Achievements

achievementProgress

Settles a recurring achievement: finalises the previous period’s progress and rewards profiles who completed it.
ArgumentRequiredTypeDefaultWhat it does
achievement_handleYestextnoneWhich achievement to settle.
periodYestextnoneThe period being settled (weekly, monthly, or yearly).
min_triggerYesnumbernoneThe entry-level threshold.
batch_sizeYesnumbernoneHow many profiles to process at a time.
This is a heavier, batch-style automation, so set it up with care.
{
  "achievement_handle": "monthly-spend",
  "period": "monthly",
  "min_trigger": 100,
  "batch_size": 500
}

Lists and inventory

unpurchasedListItems

Targets profiles with list items they have saved but not yet bought, updated recently. The unbought items are passed to the action.
ArgumentRequiredTypeDefaultWhat it does
countYesnumbernoneHow far back to look for updated items.
unitYesdays/weeks/monthsnoneUnit for count.
list_definition_handleNotextnoneLimit to lists of this definition.
custom_fields_filterNoobjectnoneOnly lists whose custom field passes the given condition. Shape: { namespace, handle, logic }.
require_purchased_itemNotrue/falsenoneOnly profiles who have bought at least one list item in the window.
{
  "count": 14,
  "unit": "days",
  "list_definition_handle": "wishlist"
}

lastStockChangeList

Targets profiles whose listed products recently changed (back in stock, sold out, price drop, selling fast, or low stock) and are available now. The matching products are passed to the action.
ArgumentRequiredTypeDefaultWhat it does
countYesnumbernoneHow far back to look for the change.
unitYesdays/weeks/monthsnoneUnit for count.
typeYestextnoneChange to detect: in_stock, out_stock, drop_price, selling_fast, or low_stock.
list_handleNotextnoneLimit to lists with this handle.
filterNoobjectnoneExtra “no other change since” condition. Shape: { attribute, count, unit }.
Only products that are currently in stock are included.
{
  "count": 1,
  "unit": "days",
  "type": "in_stock",
  "list_handle": "wishlist"
}

expiredReservations

Targets product reservations older than N days, for expiry cleanup or follow-up. The action runs against the reservation, including its profile and item.
ArgumentRequiredTypeDefaultWhat it does
daysYesnumber (min 1)noneReservation age threshold.
exclude_transaction_itemNotrue/falsefalseSkip reservations already linked to a transaction.
timezoneNotextclient defaultDay boundary for the threshold.
{
  "days": 7,
  "exclude_transaction_item": true
}

Advanced

profileAggregation

Targets profiles by a stored aggregate value, optionally filtered by status, for flexible segmentation.
ArgumentRequiredTypeDefaultWhat it does
aggregator_nameYestextnoneThe aggregate field to test.
aggregator_valuesYeslistnoneAcceptable values for that field.
statusesNolist of status handlesnoneLimit to these statuses.
{
  "aggregator_name": "spend_band",
  "aggregator_values": ["high", "very_high"]
}

storeProcedure

Runs a predefined server-side routine by name. This is for bespoke logic that does not fit the other queries; the routine must already exist on the platform.
ArgumentRequiredTypeDefaultWhat it does
nameYestextnoneThe name of the routine to run.
{
  "name": "recalculate_tiers"
}