Theme customizer doesn't support view as specific (B2B) customer

Short description of issue

When viewing the theme customizer, you can’t view the store as if you were logged in as a specific user.

Reproduction steps

Create a section that depends on some specific customer data, such as a metafield value.
View that section in the customizer and see that you can’t use the context of a specific customer.
Following the account login link just takes you to the checkout customizer, where there is no way to log in as an actual customer.
It seems the only way to preview customizations is to save them, and view in the browser, but this isn’t appropriate for changes to the live theme.

Additional info

There are also issues with authentication state when developing theme app blocks; see related: Theme app extensions for logged in customers - #3 by Nic_Oliver

What type of topic is this

Bug report

1 Like

Hey @Nic_Oliver - thanks for flagging this, I’ve reached out to some folks internally to see if we can offer a workaround and look into this further. I’ll loop back with you once I have more info on my end :slight_smile:

Hey @Nic_Oliver , following up here again :waving_hand:

Right now, this behaviour is expected, but if you’re not already doing so, the best workaround at the moment would be to use our CLI to develop the theme locally. The B2B behaviour should function as expected this way:

https://shopify.dev/docs/api/shopify-cli/theme

That said, I’m happy to log a feature request for you on this so that we can make the in-browser editor more equal in feature parity to the CLI. Let me know if I can can help out any further, thanks again for reaching out.

Hi Alan,

Thanks for the reply. To clarify, the specific issue is in the context of the theme editor, where a merchant may be configuring theme sections that rely on customer-specific metadata. In this workflow, they need to see what the section looks like to a logged in a user (in this case, likely the user that is doing the editing).

Example use cases are: B2B specific content, Membership / Pro stores, Dashboards, etc.

Using the CLI is fine for me when developing, but for a non-technical content editor, this is not feasible. They should be able to see what the section will look like in the theme editor when logged in.

Happy to provide more details if needed.

Hi @Nic_Oliver, no worries, happy to help where I can, even if it’s just logging a feature request. Wanted to follow up with you here to close the loop and let you know I’ve sent the feature request up to our product team for you. I’ll mark this thread as closed for now, but let me know if I can help out further.