I have a customer portal that generates a unique URL that contains the Subscriber Key of my record (mdmid). The customer would click on the URL and brought to a CloudPage. On the CloudPage would just be a simple Smart Capture form asking the customer to verify or update their email and phone number. On the Smart Capture form, the Email and Phone fields would pre-populate with the data.
I can get this working in an email, but am having trouble getting this to work on an actual CloudPage.
I have a CRM data extension that contains all of the data I need. A mdmid, the phone number, and the email address. On this data extension the mdmid relates to the Subscriber Key.
The url structure that goes to the CloudPage would be something like cloud.website.com/update-info?mdmid='123456'
My AMPscript on my CloudPage is this:
%%[
var @SubscriberKey, @Email, @Phone, @mdmid
set @mdmid = RequestParameter('mdmid')
set @SubscriberKey = AttributeValue('_subscriberkey')
set @Email = Lookup('CRM','EMAIL','mdmid',@SubscriberKey)
set @Phone = Lookup('CRM','PHONE','mdmid',@SubscriberKey)
]%%
I can get the CloudPage to pull the parameter from the URL and get it to paste the mdmid as text on the page, but I cannot get it to paste the SubbscriberKey, Email, or Phone. Which is also not letting me pre-populate the email and phone fields on the SmartCapture form.
Looking for advice on how I can get the CloudPage to recognize these variables and paste the value of them to the page.