SendGrid...Trying to create a Button in an Email template that links to a specific order

Hi All
I’m trying to create a button (or a link) in a SendGrid email that will enable the recipient of that email to go straight to that order in my app directly from their email.
I can add a Variable to the SendGrid API Workflow that contains the Unique Order Reference that identifies the order but can someone tell me how I implement that on the button in the email so that the User can jump straight to that order when they click the button/link in whatever email client they’re using? Maybe it’s just a question of knowing what URL to add so that I can append the Unique Order Reference into it?
Many thanks in advance for any help
Joe

Just add it as a query parameter in the URL (e.g. www.mysite.com/orderpage?order=uniqueID)

Or, better still, if your order page has a content type of Order (or even if it doesn’t) just include the unique ID in the path (e.g. www.mysite.com/orderpage/uniqueID)

1 Like

Many thanks Adam. Can I just ask (this seems a really silly question - apologies) does my App have to be “Live” for this to work? I keep getting a Privacy Error

NET::ERR_CERT_COMMON_NAME_INVALID

is this because I haven’t gone live with my app yet? If so, is there a way I can write the link in “test mode?”

No, your app doesn’t need to be live.

You need to add /version-test to the URL — www.mysite.com/version-test/orderpage?order=uniqueID to have it work in development.

A handy little trick is to use the Website Home URL

Many thanks both for this information. I feel I’m getting there but for some reason whatever method I use for entering the URL, “URL2335” gets inserted in front of it so it resolves to

http://url2335.mysite.com/ls/click?upn=V8dSKltldvoWGmjXhXORcuiR2TZDZRzbm5YscyRXi04zpUQjfORWGzphs4ZVRl1dtLKXYfYO-2F0nqGN-2FzzE5Nag-3D-3DIxx3_G8EZx1YYcw-2BFNxdGO-2BUXw1-2B0UMtmyJiPl9cFwCANQS4Fjlvse-2BCw8mbiLzYlZzoOIkAkO07iY9Q51OS0hw2Lol1tMEjanRYYiloi7rcn56JrEDzkmGDvpx34vAo0-2FPaL-2FK7QvwmVYELBp40jimkEZhPCM1nXRDLRfdSx582w8IWvo5V3I6oDDpLjS3dD6AnQ30VMvwafu7diTwakrPS6kH6sOdZiZpHtOsQag-2BLhrpiRgRD57dyYQwuYeQmDYH2-2FzS8KMT2JUBDU-2B6lIOsrW5Rx6N44wJV5ZcmvtvomTE13yNXoWVOPMM2CkKxv350XjlGHR-2BXzC2Rxg9xaDfI67L3oq3jrDyrM9fatrPtbqyRI-3D)

which then results in a privacy error. Any ideas on why this might be happening?