I have a email template from wher we have a custom link for a cloud page(Unsubscribe Page). We are using cloudpageUrl() function to open a cloud page and page value to it. It works fine when we just pass a value like :- %%=RedirectTo(CloudPagesURL(1623))=%%

And when we pass a hardcore value in the Parameters, then Also it works well, like :- %%=RedirectTo(CloudPagesURL(3961,'ObjId','abcd'))=%%

but when we pass a dynamic value from the DataExtention to which this email is sent then it shows an error and the method is :- %%=RedirectTo(CloudPagesURL(6238,'ObjId',%%Id%%))=%% ,

where ObjId is the parameter name and %%Id%% is one of the property from Data Extention.

How can we resolve this and pass a dynamic value to the cloudpage from the DataExtention and what wrong are we doing here?

  • within an ampscript function, you wouldn't use 'nested' %%. so it would be %%=RedirectTo(CloudPagesURL(6238,'ObjId',Id))=%% – EazyE Dec 14 '20 at 20:58

As @EasyE commented, you should not include %% delimiters in AMPscript arguments. However, you don't actually need to pass attributes as query string parameters. Simply include the following on your CloudPage which will retrieve the value based on the context (i.e. the field from the sendable Data Extension):

var @objId
set @objId = AttributeValue('Id')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.