Apple Messages for Business Onboarding: business_id to Active Agent
Apple Messages for Business (AMB) is the channel where customers start a conversation with your business from iMessage — tap an entry point in Apple Maps, Spotlight search, Safari, or Siri, and the thread opens in the Messages app on an iPhone or a Mac. Every AMB conversation runs through a Messaging Service Provider (MSP) that brokers the traffic between Apple’s gateway and your platform; Orbit acts as the MSP on each conversation, so inbound messages land in your unified inbox alongside every other channel. This guide walks the full agent lifecycle: the Apple-side prerequisites, registration from the dashboard, the matching API calls, status polling until the agent is ready, and how AMB folds into commerce. It complements the conversational checkout flow, where AMB is one of the channels that contribute to a buyer’s persistent cart.1. What AMB is, and when to pick it
AMB is a conversational, customer-initiated channel. The customer starts the thread from an Apple surface; your business replies inside Apple’s 24-hour-style messaging window, and replies can carry rich content — interactive lists, forms, time pickers, rich links, and Apple Pay payment requests. How it compares to the other rich channels you may already run:
Pick AMB when support and commerce happen where Apple users already search — a store locator, a booking flow, a “pay without leaving the thread” checkout. Treat it as complementary to RCS and WhatsApp, not a replacement: an iPhone-only rich-messaging audience is the gap AMB fills.
2. Prerequisites
Before you can register an agent you need:- Apple Business Register approval. Apply at register.apple.com/business. Apple reviews the business entity behind the registration; nothing in Orbit can be done until this approval exists.
- A
business_idfor the approved business — the immutable identifier Apple issues, of the formcom.example.support. It survives renames and re-registrations, and it is the routing key for inbound webhooks. - An MSP partnership. Apple only accepts traffic brokered by an approved MSP. When Orbit operates as the MSP on your behalf, your account carries an assigned
msp_id; bring your own MSP only if you have a direct agreement, and store its id on the agent. - The HMAC secret key. Apple Business Register issues a base64-encoded HMAC-SHA256 key per business (≥ 16 bytes after decode, typically 32–64 characters before decode). The same key signs outbound JWTs to Apple’s gateway and verifies inbound webhook signatures. Keep it in a password manager — Orbit stores the encrypted form and never shows the plaintext again.
business_id. Register several only when you genuinely run several Apple-registered businesses — separate store brands, or a market-specific entity. Each agent is tenant-scoped and routable independently, so the decision is Apple’s (business_id count), not Orbit’s.
3. Register an agent from the dashboard
- In the dashboard, open Messages → Apple.
- Click Create agent.
- Fill the registration form:
- Submit. The form refuses a blank business ID or display name, and any secret shorter than 16 characters; a
422from the API names the exact field that failed.
has_secret back — the raw value never returns to the browser. If you lose the plaintext, use Rotate secret on the agent row: paste the replacement key Apple issued and the old one is discarded immediately.
4. Register, update, and delete over API
The four operations mirror the dashboard:201 with the agent record. Keep data.id — an opaque Orbit-generated UUID — because every later call addresses the agent by this id, never by the Apple business_id. The business_id stays readable on list and single-read calls; the secret itself is replaced by has_secret: true.
The same flow from the Node SDK:
business_id is the one value an update cannot move:
5. Status badges: poll until the agent is ready
The dashboard badge renders the agent’sstatus field, and every read endpoint returns it:
A fresh registration starts at
pending. To drive readiness from code, poll the list endpoint (or re-fetch the agent) until status flips to approved; poll against exponential backoff rather than a fixed short interval — the transition is Apple-side, not instant. If a status ever regresses — approved back to pending, or any agent moved to suspended — treat the agent as out of the routing set and delete or repair it before the next send; a regressed agent still occupies the tenant’s routing registry until removed.
Known statuses are humanized on the badge as In review, Approved, Suspended; an unexpected future status renders its raw value rather than throwing.
6. Run AMB inside commerce
AMB is more than a support inbox — it is one of the channels that feed the conversational checkout flow. A customer can tap into the thread from Apple Maps, add items into the persistent cart, and check out on Apple Pay without leaving Messages; the same cart is shareable across channels — an item added over WhatsApp and one over AMB land in one snapshot. When you design the commerce entry point, register the agent first (this guide), then wire the checkout capability on top: the capability scan listsamb among the channels that can take payment natively, so the checkout surface can route the pay step down the AMB thread instead of falling back to a hosted pay-by-link.