Admin Action Extensions
Admin actions add a button to an admin resource page (e.g. the order detail page). When the merchant clicks it, your app opens in a modal iframe with the current resource id in the URL — perfect for “Refund this order”, “Issue gift card from order”, “Resync inventory”, or any other one-shot operation that needs your app’s UI but does not belong as an always-visible block.How Admin Actions Work
appUrl plus query
parameters describing the resource. Your app drives the UX inside the modal
and uses App Bridge to close it, show a toast, or
trigger a host redirect when work is done.
Available Targets
Admin Actions are wired at specific resource-detail action slots. The initial release ships with one target — more will be added in subsequent releases.Additional targets for product, customer, draft order, and collection
detail pages are planned next. Track the changelog for new
admin.{resource}-details.action.render targets as they ship.Extension Manifest
Declare admin actions in yourapp.json under extensions.adminActions,
or send them inline to the install pipeline. Each entry corresponds to one
button.
Inline in app.json
Schema file form
When installed through the install pipeline, each admin action is persisted as a single schema file at:Fields
Installing Admin Actions
Action manifests are deployed by the install pipeline the same way theme blocks or snippets are.POST /api/apps/install-extensions is a
server-to-server endpoint gated by the platform’s internal API key (no
CORS) — the backend calls it as part of the app install flow; it is not
called directly from a browser with a merchant access token. The endpoint
accepts an adminActions array on the extensions payload:
{handle}.schema.json file under the app’s
admin-actions/ directory. The host’s admin extension API picks it up
on the next request — /api/apps/admin-extensions?target=... returns
entries with type: "admin_action" for actions, as opposed to
type: "admin_block" for blocks.
Iframe Context
When the merchant clicks the action button, yourappUrl is loaded into
the modal iframe with these query parameters appended:
The action modal does append an
extensionId query param — same as
admin blocks. Read it from the query string and echo it in your
APP_BRIDGE_RESIZE messages, or the host ignores the resize. Resize
clamp for the modal is Math.min(height, 800), with a 400px default.Communicating with the Host
Admin actions use the standard App Bridge SDK.app.dispatch(action, payload) and app.dispatchAndWait(action, payload)
take an action string plus payload — not a {type, payload} envelope.
Close the modal when done
After your action completes, dismiss the modal so the merchant returns to the resource page:Show a toast on success
Block close while a request is in flight
LeaveConfirmation helper also dispatches the underlying
LEAVE_CONFIRMATION_ENABLE / LEAVE_CONFIRMATION_DISABLE actions for you,
and wires the browser’s beforeunload event so closing the tab triggers
the confirmation too.
Complete Example
A minimal refund helper that loads the order, takes a partial amount, and issues the refund via your app’s backend before closing the modal.Admin Actions vs Admin Blocks
See Also
- Admin Blocks — always-visible iframe panels.
- Admin Print Actions — print-template variant.
- App Bridge: Modal —
MODAL_CLOSE,MODAL_OPEN. - Sessions & Authentication — verifying calls from the iframe.