Strange Customer ID Issue with Custom Form on Logged-In Customers

I’m encountering a weird issue with a custom form I created for my store (Shopify Plus). This form is visible only to logged-in customers, and it’s supposed to pull the customer’s information using Liquid code like this:

{% if customer %}
{{ customer.id }}
{% else %}
preview
{% endif %}

The form has been working correctly for months, and I have 875 successful submissions with no issues. However, I recently had two submissions from the same customer that returned an incorrect customer ID, which does not match any customer in our store. Instead of matching the expected customer ID for the email, we got a completely different one (7682370666559).

Here’s what I know:

  • The form is accessible only to logged-in customers.
  • The customer email and name matched an existing customer in our store, but the customer ID didn’t.
  • This issue repeated for two applications submitted by the same customer within minutes.
  • All other customer submissions (including those for logged-in customers) have worked as expected.
  • This specific customer was added to our account 5 years ago when she came into the store and placed an order with our POS. We added her and her phone number, but this was the only info added to her account, and I do not even think she had a password. We sent her a classic account invite and are waiting for her to finish it. Could she have been logged in somehow with that account that was created 5 years ago from our POS, even though there was no email associated with the account?
  • The ID for this account does not match the one submitted.

I’m wondering if anyone has seen anything like this before or has suggestions for where to look next. Could it be a caching issue, or is it possible that something else is going on with how Shopify assigns customer IDs in this context?

Any help or insights would be appreciated!

Thanks, Andrew