Hello, I am trying to use Shopify Flow to create a message which contains a link to the order page. The backend order page, not the customer-facing order page.
Here is what I am using that I thought should work:
https://XXXX.myshopify.com/admin/orders/{{order.id}}
But this is returning:
https://XXX.myshopify.com/admin/orders/gid://shopify/Order/4472173920411
Is there a way to get just the order id without the leading “gid://shopify/Order/”? Otherwise, is there a way to strip that section so it just returns the numerical order id?
Thanks!
1 Like
Figured it out. Posting for future reference. Use {{order.legacyResourceId}} if you want to avoid the extra GID text.
https://XXXX.myshopify.com/admin/orders/{{order.legacyResourceId}}
11 Likes
For future references, the same happen with customer.id in Shopify Flow Email.
{{customer.id}} -> gid://shopify/Customer/6877777....
Use instead:
{{customer.legacyResourceId}} -> 678.....
For better use:
[{{customer.legacyResourceId}}](https://STORENAME.myshopify.com/admin/customers/{{customer.legacyResourceId}})
2 Likes
Just posting this for anyone else thats out there, but i was getting the same issue when trying to link to a product from the flows.
It works using the same logic, but replacing order with product = {{product.legacyResourceId}}
1 Like