The openProduct action navigates the user directly to a product detail page (PDP) within the app.
It allows you to open any Shopify product programmatically — for example, from a banner, recommendation widget, or upsell section — without using manual routing or deep links.
Use valid identifiers: Always ensure productId or handle exists in Shopify to prevent navigation errors.
Combine with getProduct: You can preview product data (price, title, image) before calling openProduct.
Use for cross-selling: Integrate in carousels, recommendation sliders, or custom blocks for smoother UX.
Avoid hardcoding IDs: Dynamically fetch or store product handles for better maintainability.
Handle async results: Use .then() or await to log or trigger analytics after navigation.
Caveats
Shopify product dependency: The product must exist and be published; otherwise, navigation will fail silently.
App context required: Works only within the Superfans mobile app environment — not the web SDK.
No callback from PDP: Once the product page opens, no event is fired automatically (use variantChange or cartUpdated listeners for interaction tracking).
Deep links unsupported: This action is for internal navigation, not external URL handling.