Hello,
We’ve been reading up on App Sections and it seems like the new experience will be a great improvement for merchants over manually pasting in code.
One thing that wasn’t clear, though, is how we’re expected to surface merchant-specific data in the settings for these sections.
For example, imagine a calendar app that allows merchants to show upcoming events. A merchant with two physical locations might set up two calendars in the app - “New York events” and “Miami events”.
Ideally, the merchant could then go to a page in the Shopify theme editor, add a new “Calendar app” section, then choose from a dropdown menu which calendar to show (New York or Miami). In this case, the dropdown that appears in the editor would need to be populated based on a shop-specific settings blob that is made available by the app somehow.
However, the documentation for App Sections seems to indicate that the section (including settings options) is defined by a single static Liquid file that is uploaded by the developer, and which applies identically across all shops using the app. Is this really the case? If so, it seems like this is fairly restrictive in terms of integration with individual shop data.
I could also imagine a different approach where the app dynamically adds/updates sections via the Asset API. In this case the shop might end up with two separate sections available - “Calendar app: New York” and “Calendar app: Miami”, although they wouldn’t technically be “App Sections”, but regular theme sections created by the app. This seems like it might work, although it’s not clear if sections added to a theme this way can easily be re-used when switching themes.
Could anyone shed some light on what the expected workflow is for this sort of situation?
Thanks!