I'm still new to ampscript, particular when trying to reference a two data extensions for my CloudPage. The use case is we send an email to our customers which contains their email address and a store ID assignment to the record. We want to be able to display the store information to each customer when they visit our landing page, using a content block to house the information.

Within the email I have the following ampscript;

%%[/* AMPScript Email Content initialization <div style="display:none"> */

SET @Debug = false


SET @Store_Properties = 'Store_Properties'

/*Content fields*/

SET @Store_label = "Store"
SET @Address_label = "Address"
SET @Phone_label = "Phone"
SET @OpeningHours_label = "OpeningHours"
SET @OpeningDays_label = "OpeningDays"


SET @EmailLookUpRow = LookupRows("Store_Properties","Store_label", Store)

SET @EmailRowCountLookUp = rowcount(@EmailLookUpRow)

SET @Row = Row(@EmailLookUpRow,1)

/*Expose values to variables*/

SET @Store = Field(@row, "Store_label")
SET @Address = Field(@row, "Address_label")
SET @Phone = Field(@row, "Phone_label")
SET @OpeningHours = Field(@row, "OpeningHours_label")
SET @OpeningDays = Field(@row, "OpeningDays_label")




This works fine in the content block of the email.

I then have a link to my CloudPage within the email as per http://myURL/%%EmailAddress%%.

I have tried multiple ways of pulling in the information from the send data extension into the CloudPage but haven't been able to generate the correct store information, only the fallback content.

The send data extension is different to Store_Properties. For instance, we send to "recent purchasers".

The logic that I think I need to follow is set the store from the send DE and then reference this when retrieving the store information from my other DE.

Has anyone successfully used two DE's to pull information into a CloudPage?

Thanks in advance. Bevan

  • 1
    try like this set @link = ConCat('URL?Email=', "emailaddr") – pkharries Nov 23 '18 at 6:53
  • 1
    My first suggestion would be using subscriberkey on the link, instead of using an email address. You can use pkharries' method to create the link - but you should do that for storeID- and then you get that information on your landing page with "RequestParameter("StoreID")". When you get their email address or subscriberkey via the link into landing page, you can use IF ELSE to generate data. For more information: salesforce.stackexchange.com/questions/93183/… – Selim Sevim Nov 23 '18 at 13:08
  • Thanks for your help, I've used a combination of ?emailaddress=emailaddress within the email for my PURL and SET @ EmailAddress = RequestParameter("emailaddress") SET @ Store = LookUp("TEST DE", "Store", "EmailAddress", @ EmailAddress) to pull through the store name within my URL. Next step is to pull through the opening hours, address etc using the @ store which I'll attempt now. – Bevan Connelly Nov 26 '18 at 2:23

Your Answer

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

Browse other questions tagged or ask your own question.