Support
The Support API allows you to optionally register a custom handler when support requests are made directly through App Bridge. This interaction is triggered when a merchant clicks the get support button at the top of the app.
Tip
To register a custom support callback, you must define a Support link extension and the link extension must point to a page within your app. This is to ensure consistent behavior when a merchant clicks a support button outside of the app. Without a support link extension, the support callback will be ignored.
Anchor to supportSupport
The Support API provides a registerHandler method that registers a handler to call when support is requested. It allows you to provide bespoke, in-app support such as opening a live chat widget.
- Anchor to registerHandlerregisterHandler(callback: ) => Promise<void>
SupportApi
- registerHandler
(callback: SupportCallback) => Promise<void>
export interface SupportApi {
registerHandler?: (callback: SupportCallback | null) => Promise<void>;
}
SupportCallback
void | Promise<void>
() => void | Promise<void>
Was this section helpful?
Register support handle
// Define the callback function
const handler = () => {
// implement your custom functionality
openLiveChat();
};
// Register the callback
shopify.support.registerHandler(handler);
examples
Register support handle
// Define the callback function const handler = () => { // implement your custom functionality openLiveChat(); }; // Register the callback shopify.support.registerHandler(handler);