6

So... let's come to a topic i do not seem to fully understand: The function AttributeValue, especially in combination with the cloudpagesurl function.

I will present three scenarios, two are working and one is not working as expected. Both use the CloudPagesUrl function inside an Email to pass variables to the encrypted cloudpages qs parameter. The DataExtension used for sending the email contains colums named "country", "language" and an id which name is "area". We do not have SubscriberAttributes that are named this way, because we handle everything over dataextensions.

Not working scenario, all variables presented in this case are working and contain correct values inside the newsletter.

Inside the e-Mail:

set @href = RedirectTo(CloudPagesURL(404,'param1',@country,'param2',@language ,'area',@area))

Inside the Cloudpage:

set @country = AttributeValue('param1')
set @language = AttributeValue('param2')
set @area = AttributeValue('area')

Output on the cloudpage for debug purposes:

@country is empty (does not display a value)

@language is empty (does not display a value)

@area is filled correctly



Working scenario1:

Inside the e-Mail:

set @href = RedirectTo(CloudPagesURL(404,'country',@country,'language',@language ,'area',@area))

Inside the Cloudpage:

set @country = AttributeValue('country')
set @language = AttributeValue('language')
set @area = AttributeValue('area')

Output for debug purposes on the cloudpage:

@country is filled correctly

@language is filled correctly

@area is filled correctly



Working scenario2:

Inside the e-Mail:

set @href = RedirectTo(CloudPagesURL(404))

Inside the Cloudpage:

set @country = AttributeValue('country')
set @language = AttributeValue('language')
set @area = AttributeValue('area')

Output for debug purposes on the cloudpage:

@country is filled correctly

@language is filled correctly

@area is filled correctly



Now i got several Questions:

  • Do the parameters with the AttributeValue function have to be exactly named like the columns in the sending dataextension to be retrieved via AttributeValue when using the CloudpagesUrl function?
  • Does the CloudPagesURL function actually encrypts all attributes from the sending dataextension to the qs parameter by default?
  • Does the AttributeValue function actually needs the parameter attachments from the CloudPagesURL call? (it seems not)
  • Is the AttributeValue function bound to the dataextension column names?
  • Does the AttributeValue function still work when the sending dataextensions records get overwritten, updated or deleted?
    • Should you better switch to usual parameters to be more failsafe?
  • Why does the first (not working) scenario not populate any fields that are not dataextension column names? reference documentation
    • Do you actually have to use RequestParameter in this scenario to retrieve the data, because the column names are not matching the sending dataextension and the AttributeValue function will actually not be able to retrieve any data?


Thanks for reading any help is greatly appreciated. If you have more documentation to share please attach it ;)

1
  • You must have the fields as ''param1" and "param2" in your TARGET data extension to use the following code in cloudpage.........```set @country = AttributeValue('param1') set @language = AttributeValue('param2') Nov 19, 2019 at 9:09

1 Answer 1

7

AttributeValue() only works on defined in sendable data, which is why your 3rd option still worked. The second option also worked because of this, not because of the passed values.

Your first one failed because all values added to the cloudpagesurl() function are parameters and are separate from the associated attributes. This is why param1 returned null as there is no attribute named param1. Essentially it is just adding ?param1=value to the url.

To get these values you will need to use the requestparameter() function.

2
  • Do you know if the AttributeValue('parametername') function actually does a LookUp gainst a dataextension or just holds the key to decrypt the qs parameter and then requests the particular value of the parametername in its function call? Since i do want to make a failsafe solution on a cloudpage i am currently not sure wether to take attributevalue, because it works natively, or the requestparameter function (with adding the parameters to the cloudpagesurl call). Is there even a difference between requestparameter and attributevalue? Could i retrieve all qs parameters with requestparameter?thx Nov 19, 2019 at 14:07
  • 3
    AttributeValue() looks at the data snapshot that is taken prior to send queue. It does not lookup directly in the DE. Basically, once an email job is activated (scheduled or immediate send) it takes a snapshot of the email as well as the sendable data associated with it (similar to 'journey data') and those are what is used for personalization strings, etc. inside the content processing part of the send process. Nov 19, 2019 at 14:20

You must log in to answer this question.

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