0

I am implementing a Custom Profile center. I tried to follow the method suggested by Adam here: Custom Profile/subscription center But get a 500 error when trying to load the page,

So, I further narrowed it down to the Cloudpagesurl Ampascript function example here:

https://ampscript.guide/cloudpagesurl/

And still get the error.

The Landing page contains only the following code, from the example in the documentation:

%%[

var @firstName
set @firstName = Lookup("Members", "First Name", "Subscriber Key", _subscriberKey)

]%%

<!DOCTYPE html>
<html>
   <body>
      <h2>Hello %%=v(@firstName)=%%,</h2>
      <p>Welcome to your personalized landing page.</p>
   </body>
</html>

What am I doing wrong?

PS

The SFMC instance is new, MC Connect works as expected, and I have 3 email subscribers.

8
  • 2
    You're missing the opening "%%[" at the beginning of your AMPScript
    – Macca
    Apr 24, 2020 at 3:56
  • As Macca said, you are missing the opening %%[. You could also add some basic exception handling to still be able to display the CloudPage even if the data is missing: %%[ set @firstName = Lookup("Members", "First Name", "Subscriber Key", _subscriberKey) IF empty (@firstName) THEN SET @firstName = "Customer" ENDIF ]%%
    – zuzannamj
    Apr 24, 2020 at 9:29
  • You can also use an email to troubleshoot your ampscript. Simply hard code any requestparameter() values
    – EazyE
    Apr 24, 2020 at 13:31
  • @Macca thank you for jumping in on this. unfortunately I am missing it in the question only, not on the page - corrected the question. The issue is still unresoloved. Any idea?
    – LimeWeb
    Apr 24, 2020 at 17:59
  • @zuzannamj, thanks for your help. the %%[ was missing on the question only. What do you mean "the data is missing" how can subscriber key be missing from someone who got the email?
    – LimeWeb
    Apr 24, 2020 at 18:01

1 Answer 1

0

The answer is simply that Members (as appeared in the code from the documentation mentioned in the question) is not a Data Extension.

I thought Members was some kind of a Master Data Extension which holds all members. It's not.

Solution: Create 'Members', populate it. The code works.

Hopefully this saves someone time in the future. (Please Vote this answer up if it does).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .