Discussing Shopify Functions development, deployment, and usage in Shopify apps.
We are working on getting Functions to do what is already possible in scripts that is going away Aug 2025.
One limitation we have found is that if we create discount codes in Klaviyo or Yotpo (or any outside marketing app) it is not "attached" to the Functions/Discount App and so the logic doesn't run when you use the Discount Code.
Is there not a way to have the Functions/Discount App to be the default for the store so it's always seen when using a Discount Code?
It sounds more like something Kaviyo / Yotpo would have to do? Something like letting users pick an existing discount (native or function based) instead of always just creating a new discount?
That's a great idea and we did feel that was needed except there is no api for this. There should be a default discount app option in Shopify so it follows the logic automatically as it does now with Shopify Scripts.
Any other solutions that don't involve waiting for Shopify to have marketing apps build functionality that doesn't exist today.
Assuming this is a Plus shop you might want to look at https://shopify.dev/docs/api/functions/reference/discounts-allocator to handle controlling "3rd party" discounts with custom logic.