query field and tuned with its arguments. This page lists the available queries and what every argument does.
How an automation is set up
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 ofname: value, for example:
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.
The same queries back dynamic groups
Queries are not exclusive to automations. A dynamic group configures its candidate query with the samequery name and the same { name, value } arguments, resolved from the same set. lapsed with days: 90 means the same thing in both places.
What differs is what the result is used for:
One constraint applies to groups but not automations: a dynamic group’s candidate query must return profiles, because group membership is a set of profiles. Most queries do. The ones that return something else,
achievementProgress, expiredReservations, lastStockChangeList, pointBalance, tierAchieved, and unpurchasedListItems, work in an automation but are rejected on a group.
Query reference
Each entry gives the query name (the value for thequery 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).
The queries that return profiles can also be used as a dynamic group’s candidate query, see above.
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.
A profile that already received a spend reward that day is not matched again.
dailySpendByItem
Like dailySpend, but spend is counted from the individual items bought, so you can target spend on particular products, SKUs, or discount conditions.
A profile that already received a spend reward that day is not matched again.
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.
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.dailySpendTotalByItemProduct
The most filterable spend automation: everything dailySpendTotalByItem does, plus product-tag targeting and a configurable per-day reward cap.
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.
firstShop
Targets profiles who made their first transaction yesterday, for welcome and first-transaction journeys.
Returns
dailyReturnAmountByItem
Targets profiles who returned at least min_return worth of items yesterday. The calculated return value is passed to the action.
The return value passed to the action is negative (returns reduce value).
Lifecycle and recency
lapsed
Targets profiles whose last transaction was exactly N days ago, for win-back at a fixed point.
This is an exact match, not “N days or more”, so choose the single day to fire on.
inactiveProfiles
Targets long-inactive profiles, based on how long ago they joined and (optionally) how long since their last transaction, with extra filters.
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.
lastShop
Targets profiles whose last transaction date was exactly N units ago, optionally only if they have not already received a given reward since.
Dates and anniversaries
joinAnniversary
Targets profiles whose join anniversary (same day and month, in a later year) is today.
It never fires in the year the profile joined, only on later anniversaries.
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.
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.
Profiles without a linked primary account are skipped.
upcomingTierAnniversary
Targets profiles whose tier anniversary is a set period away, for renewal reminders.
Tier, status and points
profileTier
Targets all profiles currently in a given tier.
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.
profileStatuses
Targets profiles who have held one of the given statuses for at least N days.
magasinVIPStatuses
Targets profiles holding a benefit whose definition carries a given tag, optionally split by whether the benefit has been used.
pointBalance
Targets profiles whose remaining points balance for a given point definition is at least min, for “use your points” reminders.
Achievements
achievementProgress
Settles a recurring achievement: finalises the previous period’s progress and rewards profiles who completed it.
This is a heavier, batch-style automation, so set it up with care.
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.
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.
Only products that are currently in stock are included.
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.
Advanced
profileAggregation
Targets profiles by a stored aggregate value, optionally filtered by status, for flexible segmentation.
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.
Testing automations with dry runs
Before enabling an automation in production, trigger a dry run to simulate what it would do without creating records or firing events. SendPOST /v3/automations/{automation}/trigger with dry_run: true. Add start_date and end_date to simulate over a date range (for example, to replay a past period).
202 Accepted. The simulation runs asynchronously. Once it completes, retrieve the per-profile results via the Automation Dry Run Results API.
Dry run constraints
Not every query or action supports dry run:- Queries that perform side effects when resolving (such as
achievementProgressandstoreProcedure) cannot be dry-run. Omneo returns a validation error if you attempt a dry run on an automation that uses them. - Actions that would otherwise write production records or fire events are simulated without persisting. The
statusfield on each result (success,failed, orskipped) shows what the action would have done.
filter[automation_id] and filter[run_at] when retrieving results to scope to a specific simulation. Delete results once reviewed.