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:
- Order Placement: When a customer places an order on Shopify, no eSIM QR code is generated at this point.
- 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.
- 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.