Solved

Generate URL to Order Page in Shopify Flow

mike5554
Visitor
2 1 7

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!

 

Accepted Solution (1)

mike5554
Visitor
2 1 7

This is an accepted solution.

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}}

View solution in original post

Replies 2 (2)

mike5554
Visitor
2 1 7

This is an accepted solution.

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}}

AnotherDF
Visitor
2 0 4

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:
<a href="https://STORENAME.myshopify.com/admin/customers/{{customer.legacyResourceId}}">{{customer.legacyResourceId}}</a>