Shopify

The Bolrach Push app for Shopify connects a store to a Push app. Orders, checkouts left behind, price changes and restocks arrive as events, the shop recipes act on them, and a theme embed adds web push to the storefront.

Where it stands

The Shopify app is waiting for its listing. Until it is approved, the connect call answers 503 shopify_not_configured. You can build against WooCommerce or your own events today, and the events are the same.

Connecting a store

  1. Ask Push for the approval link with the app id and the store's myshopify.com domain: POST /integrations/shopify/connect. The link is good for 15 minutes.
  2. The merchant approves on Shopify, which sends them back to Push. We store the store's token encrypted.
  3. In the theme editor, under App embeds, the merchant turns on Bolrach Push and pastes the Push app id. That adds the web SDK and the service worker, served through the store's app proxy.
curl -X POST "https://api.bolrach.com/push/v1/integrations/shopify/connect" -H "Authorization: Bearer $BOLRACH_PUSH_KEY" \
  -H "Content-Type: application/json" -d '{"app_id":"YOUR_APP_ID","shop":"example-store.myshopify.com"}'
# -> { "authorize_url": "https://example-store.myshopify.com/admin/oauth/authorize?...", "expires_in": 900 }

GET /integrations/shopify/connections lists the stores linked to your apps, and DELETE /integrations/shopify/connections/{id} disconnects one.

What becomes an event

In the storePush event
An order is createdorder.placed
It is paidorder.paid
It is fulfilled, goes out for delivery, is deliveredorder.shipped, order.out_for_delivery, order.delivered
A refundorder.refunded
A checkout is created or changedcart.updated
A product's price falls below the last one we sawcatalog.price_changed
A variant comes back in stock, or sells outcatalog.restocked, catalog.out_of_stock

A signed-in customer is the Push user shopify:<customer id>, and the embed signs the shopper in with the same id. For a guest, the embed writes the browser's anonymous id onto the cart, so a checkout left before signing in still reaches that browser.

Customer privacy

Shopify's privacy webhooks are verified and recorded. A shop that uninstalls the app has its connection and catalog watch deleted. To erase one customer's Push profile, call POST /apps/{id}/users/{user}:forget with shopify:<customer id> within Shopify's 30 days.

Machine-readable: openapi.json. Console: bolrach.com/push.