Functions ability to preview, test, and publish changes

With Scripts, we can easily preview a draft script and see how it impacts the shopping experience as well as test in the Script Editor different cart scenarios. There does not appear to be a similar experience available for Functions. What is the recommended process for previewing and testing functions so that we can see the behavior in the production shop without affecting the current customer experience? If there are functions currently active, how would the preview functions interact with the live/active functions? That isn’t an issue when previewing scripts since the active script is disabled while in preview mode.

With Scripts, as only one script can be published at a time all the active script based discount campaigns are by definition then grouped together and published like a batch which makes it very simple to manage promotion changes. For example when switching on our Labor Day or Black Friday sales it is as simple as publishing a single script or even using Launchpad to schedule the script to publish at a certain time. With Functions, it sounds like we may need multiple separate functions to achieve what we are doing now with a single script so how can we handle publishing them and disabling the ones they are replacing in a coordinated way like we can now with Scripts?

Is there a single dashboard where we can see all Functions that are published and active for a shop and what they are doing and when they are having issues? We ran into a scenario already where a shipping app installed its own function that modified shipping rates and was unintentionally modifying rates not associated with the app which broke the customer experience and it was very difficult to track down where the problem was coming from.

@Jesse_Meyers I put together this documentation on some strategies you can use as your migrating over Scripts to Functions. One of the approaches I see commonly used today is to leverage customer tags as a way of selectively applying the output of a Function so you can test it for a specific user while not impacting the rest of the store.

One other strategy I’ve seen people use for coordinating across multiple surfaces and functions is to store configuration in a shop based metafield that can be accessed as part of the input for multiple functions.

There is no single dashboard where you can see all published and active Functions for a shop, you’d have to go to the appropriate locations in Shopify admin (Discounts, Settings) and on each surface when a Function is having issues they’ll show up inline.