Set up once
- Start with the storefront: make the app in the console and paste the web snippet into the theme. Native apps get the Android and iPhone setup on top.
- Ask on the order confirmation page, right after the customer paid, with a line like Get delivery updates on this device? A stranger on the home page has no reason to say yes; someone waiting for a parcel does.
- When the customer signs in or checks out,
BolrachPush.login(customerId)ties this browser to their account, so order updates find it later. - Turn on the shop recipes, in the console under Push, Journeys, or with one call each.
Stores on Shopify skip the first step with the Shopify app, and WooCommerce stores with the plugin.
Triggers
| When this happens | Your server sends | What the customer gets |
|---|---|---|
| The cart changes | cart.updated with the whole cart: items, amount, currency, cart_url | abandoned_cart: a reminder an hour later and another a day later, cancelled the moment order.placed arrives |
| A product page is viewed | product.viewed | browse_abandonment: one nudge two hours later, at most once a day |
| An order goes through | order.placed with order_id, items, amount | order_updates: Order confirmed, and the sale is credited |
| It ships, goes out for delivery, arrives | order.shipped, order.out_for_delivery, order.delivered | order_updates: one push per stage, each replacing the last |
| A refund is issued | order.refunded with amount | refund: the amount and the order |
| A shopper saves an item | wishlist.added | wishlist_reminder three days later; the price is watched too |
| Your price falls | catalog.price_changed with no user_id, plus old_price and new_price | price_drop: everyone watching the product, once per new low |
| Stock comes back | catalog.restocked with no user_id | back_in_stock: everyone who asked, once until it sells out again |
| An order is delivered | order.delivered with review_url | review_request three days later, unless they already reviewed it |
Every event is a POST /events. The journeys guide lists the properties each one takes, and GET /event-catalog returns the same list. A shopper who taps Tell me when it is back is sent as stock_alert.created, and a price alert as price_alert.created. Both start a watch on the product, which the price drop and restock recipes read later.
POST https://api.bolrach.com/push/v1/events
{ "app_id": "YOUR_APP_ID", "name": "order.shipped", "user_id": "cust_5521", "idempotency_key": "order-8123-shipped",
"properties": { "order_id": "8123", "carrier": "UPS", "tracking_url": "https://shop.example.com/track/8123" } }Use one idempotency_key per order event, such as order-8123-shipped. Courier webhooks often fire twice. With the key in place, the customer still gets a single push for each stage of the order.
Turn the recipes on
POST https://api.bolrach.com/push/v1/apps/YOUR_APP_ID/recipes/order_updates:enable
POST https://api.bolrach.com/push/v1/apps/YOUR_APP_ID/recipes/abandoned_cart:enable
POST https://api.bolrach.com/push/v1/apps/YOUR_APP_ID/recipes/price_drop:enable
POST https://api.bolrach.com/push/v1/apps/YOUR_APP_ID/recipes/back_in_stock:enableEach call publishes a journey with defaults that suit most shops. Change the timing or the wording with params, or open it in the console builder. The journeys guide lists every recipe and its parameters.
Before launch
- Order updates and offers go under different categories, so a customer can switch off offers and keep delivery news. The preference centre shows both.
- Every event has an
idempotency_keybuilt from your own ids. order.placedcarriesamountandcurrency, so the console can show what each journey earned.- You tried the abandoned cart and restock journeys with a test customer.