Support API
App Bridge isn't versioned with Polaris. App Bridge APIs and web components are identical in every App Home reference version.
App Bridge isn't versioned with Polaris. App Bridge APIs and web components are identical in every App Home reference version.
The Support API lets you register a custom handler when merchants request support through App Bridge. This handler is triggered when a merchant clicks the support button at the top of the app, allowing you to provide in-app support such as opening a live chat widget.
To register a custom support callback, you must define a Support link extension that points to a page within your app. Without this extension, the support callback is ignored.
To register a custom support callback, you must define a Support link extension that points to a page within your app. Without this extension, the support callback is ignored.
Anchor to Use casesUse cases
- Custom support flows: Register a handler to customize what happens when merchants click the support button.
- In-app help: Redirect support requests to your app's custom help system or knowledge base.
- Support routing: Route support requests based on context, like the current page or merchant plan.
- Integrated assistance: Provide integrated support experiences without leaving the app.
Anchor to MethodsMethods
The support object provides a method that registers a callback function to run when support is requested.
- Anchor to registerHandlerregister
Handlerregister Handler (callback: SupportCallback) => Promise<void>(callback: SupportCallback) => Promise<void> Registers a callback function to run when the merchant clicks the support button. Pass
nullto unregister a previously registered handler.
SupportCallback
A callback function that runs when support is requested.
void | Promise<void>js
Examples
Description
Register a support handler. This example registers a callback function that runs when the merchant clicks the support button. Use this to open a live chat widget, display a contact form, or trigger any custom support flow.
js
// Define the callback function const handler = () => { // implement your custom functionality openLiveChat(); }; // Register the callback shopify.support.registerHandler(handler);