Hi, I currently use Shopify Scripts together with Launchpad to schedule and manage sales events. When a sale starts (via Launchpad), two scripts are activated:
-
A line item script that blocks discount codes during the sale and displays a checkout message to customers explaining that discount codes aren’t available.
-
A shipping script that hides certain shipping methods (e.g. “express”).
I’ve started experimenting with Functions:
-
For line items, I successfully limited quantities (max 10 per product), but I couldn’t find a way to show a message or explanation to the customer. The Function silently enforces the limit without feedback in the side cart or checkout.
-
For shipping, I can hide methods, but I can’t schedule or automate this with Launchpad—I need to toggle it manually.
My concerns are:
-
With Functions, how can we provide clear feedback to customers when rules are applied (e.g. quantity limit, discount codes blocked)?
-
Is there any way to schedule or automate Functions so they activate/deactivate with events (like Launchpad does with Scripts)?
Any guidance or best practices for these use cases would be greatly appreciated!
Thank you,
Cecilia