shopify cache

Topic summary

Issue: An external app managing eSIM orders via Shopify faces a UI state/caching problem that leads to duplicate eSIM generation.

Flow:

  • Order is placed in Shopify with no eSIM created initially.
  • Customer clicks “Activate Now” in their account; Shopify calls the external server, which generates an eSIM QR via API.
  • The generated QR code is then shown in the customer’s account area.

Problem: Due to Shopify’s caching (storing and serving previously loaded content), the “Activate Now” button appears active even after the first click, including after navigation or refresh. Users click again, and each click triggers a new QR generation, creating multiple eSIMs for a single order.

Impact: Confusion for customers and unnecessary, duplicate eSIM issuance.

Desired outcome: Ensure the button is disabled/updated immediately after the first click or manage caching/state so the page reflects the true activation status, preventing multiple generations.

Status: No resolution provided; seeking guidance on preventing repeated activations.

Summarized with AI on December 30. AI used: gpt-5.

Issue Description:

We have developed an app that integrates with Shopify to manage eSIM orders. The app, hosted on an external server, interacts with Shopify to display and manage eSIM QR codes. The flow of the app is as follows:

  1. Order Placement: When a customer places an order on Shopify, no eSIM QR code is generated at this point.
  2. Activation Process: The eSIM QR code generation is triggered when the customer clicks the “Activate Now” button on their Shopify account dashboard. This button sends a request to our external server, which in turn connects to an API to generate the eSIM QR code.
  3. QR Code Retrieval: Once generated, the QR code is sent back and displayed on Shopify in the user’s account area.

Problem Encountered:

We are experiencing an issue related to Shopify’s caching mechanism:

  • Caching Issue: After a customer clicks the “Activate Now” button and navigates away from or refreshes the eSIM page, the “Activate Now” button still appears to be active. This can lead to confusion and causes some users to click the button multiple times.
  • Multiple eSIM Generations: Each additional click on the “Activate Now” button while it remains active triggers the generation of a new eSIM QR code. This results in multiple eSIMs being created unnecessarily, leading to potential service issues and customer confusion.

Desired Outcome:

We need to find a solution to prevent the “Activate Now” button from remaining active after the initial click, or to manage the caching behavior more effectively to reflect the true state of the process. This would help in preventing the creation of multiple eSIMs for a single order.