Push command examples
Ready strings for common campaigns. Copy the one you need, substitute your
identifiers and paste it into the tap action field in the cabinet, or into
Additional Data, key command, in the push service.
After editing, always send yourself a test push: a typo in a command raises no error, the app simply opens and goes nowhere.
Cheat sheet
| Task | Command |
|---|---|
| Open a product card |
catalog.openProduct('123') |
| Open a catalogue section |
catalog.openSection('12', 'New in') |
| Open a section of discounted products |
catalog.openSectionFiltered({"id":"12","title":"On sale","filter":{"sale":"Y"}}) |
| Show search results |
catalog.search('coffee') |
| Open the catalogue home |
catalog.openHome |
| Open the loyalty card |
loyalty.openCard |
| Show a campaign page inside the app |
webview.openModal({"url":"https://example.com/promo","title":"Campaign"}) |
| Open an external page in the browser |
openURL('https://example.com/rules') |
A discount on one product
A one-off campaign about a single product: "Headphones 30% off, today only".
catalog.openProduct('123')
Replace 123 with the product identifier: the number from its card address,
/products/item/123.
The same command suits the "Price drop" and "Back in stock" triggers when the campaign is about a single product.
New items in a section
The "New in the catalogue" trigger or an announcement of a new collection.
catalog.openSection('12', 'New in')
The first value is the section identifier from /categories/item/12. The second
is the heading the shopper sees on the screen that opens. The heading may be
omitted: catalog.openSection('12').
A sale: a section with a filter
Opens a section with a filter already applied, so the shopper sees only the discounted products.
catalog.openSectionFiltered({"id":"12","title":"On sale","filter":{"sale":"Y"}})
Here the values are passed as an object, because filter is nested data. Inside
the object use double quotes. The set of conditions in filter depends on your
catalogue's properties.
A seasonal selection through search
When there is no separate section but there is an obvious query.
catalog.search('coffee')
The app opens the product list for that query, as if the shopper had typed it.
Bonuses
The "Bonuses accrued" and "Bonuses expiring soon" triggers naturally lead to the loyalty card.
loyalty.openCard
The command has no parameters, so no brackets are needed. It only works if the loyalty card is enabled in the app and available on your plan.
Reactivation
The "Returning shopper" trigger, for somebody who has not been in for a while. Send them to the catalogue rather than to a particular product.
catalog.openHome
A campaign page inside the app
Opens your web page over the app without throwing the shopper into a browser. Convenient for campaign rules, a sale landing page or delivery terms.
webview.openModal({"url":"https://example.com/promo","title":"Black Friday"})
Replace the address with your own. title is the window heading.
An external page in the browser
If a page has to open in the browser itself, a form on a third-party service for example.
openURL('https://example.com/rules')
When no command is needed
Leave the field empty if the push is informational and no navigation is needed. The app simply opens where the shopper left off.
That suits two triggers well:
- Abandoned basket. The shopper returns to the app with their basket already assembled.
- Order statuses, "Order paid" and "Order status change". The notification text is usually enough.
What next
- Command reference: the full list of commands, including basket and favourites work
- Push tap actions: where to set a command and how to test it