Redirecting from Customer Account UI Extension to Online Store with correct Market prefix

Hi everyone,

I am building a Customer Account UI Extension and need to provide a link/redirect back to a specific page on the Online Store.

Our store uses Shopify Markets with subfolders (e.g., /en-ca, /fr-fr). When a customer is in their account portal and clicks a link to go back to the storefront, we need to ensure they land on the URL with their specific market prefix attached.

The Issue:
We haven’t found a documented way within the ui-extensions API to:

  1. Dynamically retrieve the current customer’s Market subfolderSuffix or Storefront URL including the subfolder.

  2. Programmatically trigger a redirect that respects these localized routes.

What we’ve tried:

  • Hardcoding the root URL (loses the market context).

  • Checking the Localization API, but it primarily offers currency/country codes rather than the URL subfolder path.

Is there a standard way to get the “Current Market Storefront Root” from within a Customer Account extension, or a recommended method to handle this navigation?

Thanks!