Memoized / Cached Function Values in Discount UI

Seeing an odd issue in discount functions that leverage the Discount UI. Data from one discount is being cached/memoized into subsequent discounts.

Steps to reproduce:

  1. Create a discount that leverages the Discount UI
  2. Open that discount in tab 1 - keep it open.
  3. Open a new tab and go to create a new discount of the same type
  4. When clicking ‘Create’, that new discount will be pre-populated with the same values from Discount 1 in tab 1

I can also intermittently get this to happen even when tab 1 is closed down and the only active tab is the one creating the new discount.

Discount UI Extension:

api_version = "2025-04"

Discount Function:

api_version = "2025-04"

We are seeing the same problem with our discount UI.
The issue also occurs when opening an existing discount, navigating back, and then opening another discount. The input value is carried over from the first discount.

For us, this happens on api_version = "2024-10".

Hey @Lewis

I wasn’t able to reproduce this, is there any chance you could share a video of this?