Function ID Changes after each deployment?

I’ve created an discount linked to a function using discountAutomaticAppCreate mutation.

Prior to the dev platform migration, my discount extension ID was stored as an env variable, and referenced within my query.

After migrating to the new dev platform, I’ve encountered several issues:

  1. The Extension ID shown in the dev platform does not reflect the actual function ID (compare IDs shown in the two screenshots):

  1. After upgrading to the dev platform, the function ID now changes each time I deploy the function, meaning the discount linked to the previously used function ID no longer works after deploying the function.

Why is this / how do I get the correct extension id, and how do I ensure the discount continues running after a function update?

Hi @Saul

The first issue is as expected, and described here:

The second is not necessarily expected. You are seeing a different ID in the shopifyFunctions query, for the same function, each time you run deploy? How about with dev? Does your extension.toml have the same uid and handle each time you deploy? (Again this uid will be a different ID, but it is what should be used to match the extension during deployment).

If #2 is still an issue for you, could you DM me your app ID? I’ll start a message.

-Nick