I want to create a field in Admin UI, that would allow the merchant to Copy the URL of his Customer Accounts App page, he can use in emails or send to customers to quickly get to the page…
Example:
https://shopify.com/{123456789}/account/pages/{handle}
To build such URL, I need to get the {my-page} value (the handle), but it is an UUID for app extension (can NOT customise it).
The GraphQL response is such:
{
"node": {
"id": "gid://shopify/CustomerAccountPage/123456789",
"title": "My App",
"handle": "000a00b0-0000-00cd-0b00-0000000e00f0",
"defaultCursor": "asJsaW1pdCI6MSwib3JkZXIiOiJpZCBhc2MiLCJsYXN0X2lkIjo4MzA1NzY3MjQxOCwibGFzdF9YWx==",
"appExtensionUuid": "000a00b0-0000-00cd-0b00-0000000e00f0"
}
}
How can I get the handle of my app? It is same as the appExtensionUuid, but it will be always different per merchant. The merchant can also change the title, so I can not grep by it. And there can be two apps installed, not knowing which is mine from the response.
What would be the go to approach, to construct the link?