Build

Links, notifications, shortcuts

Bring people back to the right page of your app: links that open it at a path, notifications from your server, and an icon on the home screen.

Last updated: November 7, 2026 · Browser SDK 1.6.0 · Bridge protocol 1.2

LinkOpens
salopha://launch/<appId>Your app's start page
salopha://launch/<appId>?path=/orders/A12Your app at /orders/A12
https://salopha.com/l/launch/<appId>/orders/A12The same, shareable on the web. Android opens SALOPHA directly; elsewhere the page offers the app.
salopha://app/<appId>/<type>/<id>A shared object card from shareObject()

Your page receives the path as ctx.entryDeepLink from initialize(), and where it came from as getLaunchContext().source (services, chat, notification, shortcut, link or other). Accept only paths that start with /.

const ctx = await app.initialize();
if (ctx.entryDeepLink?.startsWith("/")) router.replace(ctx.entryDeepLink);

Notifications#

Your server notifies a user by sub (scope notifications.service). The notification appears in SALOPHA's notification inbox and as a push; tapping it opens your app at path. While your app is open, the page gets a notificationReceived event instead, so you can refresh in place.

await platform.notify({
  sub: user.sub,
  title: "Your order is ready",        // at most 120 characters
  body: "Order A12 is on its way.",    // at most 300 characters
  path: "/orders/A12",
  dedupeKey: "order:A12:ready",        // the same key is delivered once
  collapseKey: "order:A12",            // newer replaces older on the device
});

app.on("notificationReceived", ({ path }) => { if (path) refresh(path); });
  • Send to one user with sub or up to 500 with subs.
  • Each item answers sent, no_consent, unknown_subject or rate_limited (20 per user, per app, per hour).
  • no_consent and unknown_subject are final. Retry the others with backoff, from an outbox table, reusing the same dedupeKey.
  • Ask for permission in context with requestNotifications(); check with getNotificationStatus().

Home-screen shortcuts#

On Android, createShortcut({ path?, label? }) pins your app's own icon (branding.iconUrl on your brand colour) to the home screen. It opens through the normal launch, so the same user is signed in. Users can also add it from the host's menu or your details page.

  • Needs shortcut.create and the manifest switch runtime.allowShortcut.
  • canCreateShortcut() tells you whether it is possible; iOS has no API for it and answers { supported: false, reason: "ios_not_permitted" }.

Messaging a merchant#

Customers message a store, restaurant or agency through SALOPHA's business chat: never WhatsApp, a phone number alone or a chat of your own. Each merchant in your app is connected to a SALOPHA business with its inbox, staff, automatic replies and transaction cards.

  1. Connect (in your merchant console, signed in through SALOPHA): platform.businesses(userToken) lists the businesses the merchant manages. platform.bindMerchant({ sub, providerExternalId, businessId }) connects one, or platform.bindMerchant({ sub, providerExternalId, create: { name, categoryIds, phones, address, logo… } }) creates the business from the merchant's data and connects it. Needs the server scope business.binding.manage. Official apps and trusted developers are active at once; others after SALOPHA's review. One business per merchant.
  2. Know who is reachable (your server): platform.bindings() returns { providerExternalId, status, chatAvailable, businessName } per merchant. Cache it and expose chatAvailable in your API.
  3. Message (your page): app.openChat({ providerExternalId: "store-1", draftText: "About order A12" }). It rejects with unavailable when the merchant isn't connected.

Orders and bookings you publish to the transaction hub with the business id show up as cards in that same chat.