1

I currently have:

  1. DataExtension
  2. TriggeredSend
  3. E-Mail template
  4. All Subscriber List

What I now want to do is the following: I want to send a TriggeredSend and insert data into the E-Mail from the DataExtension. So let's say, that I have the data

Email hash: b642b4217b34b1e8d3bd915fc65c4452

I want that hash to appear in the TriggeredSend-Email. When editing an E-Mailtemplate I can only insert data from the All Subscrber List. However, I want to also insert data from the DataExtension into the E-Mail.

How would I do that? This has to be done without using the AllSubscriberList, because the user will only be added to that list, when he confirms the email by clicking on a link that I want to generate.

1

You'll need to use AMPScript in your email to retrieve the data from the Data Extension at send time. I have several examples here on my blog.

Here's the one that's most similar to your scenario:

%%[
var @DEColumn1, @lookupValue
set @lookupValue = "whee"
set @DEColumn1 = Lookup("DataExtensionName", "ReturnColumn", "LookupColumn", @lookupValue)

]%%
DEColumn1 is %%=v(@DEColumn1)=%%

EDIT: Lookup multiple columns:

%%[
var @rows, @row, @rowCount
var @lookupValue
set @lookupValue = "whee"

set @rows = LookupRows("DataExtensionName","LookupColumn", @lookupValue)
set @rowCount = rowcount(@rows)

if @rowCount > 0 then

var @DEColumn1, @DEColumn2
set @row = row(@rows,1) /* get row #1 */
set @DEColumn1 = field(@row,"DEColumn1")
set @DEColumn2 = field(@row,"DEColumn2")

]%%

DEColumn1 is %%=v(@DEColumn1)=%%, DEColumn2 is %%=v(@DEColumn2)=%%

%%[ else ]%%

No rows found

%%[ endif ]%%
  • Hi, thanks for the answer, but, there is one problem I see here: When I'm seding a TriggeredSend, I want to get a column from the DataExtension. I see how I would achieve that with your sample code. However, how exactly would I filter it? For example: I have 2 columns. E-Mail, and E-Mailhash. Filled with the data test@example.com and bla@example.com. Now, I want to get the hash for the Email address to which I'm sending the Email. How would I do that? I can see in your code how I would get a specific column, but how would I get the value of the column for the current email recipeint? – user17980 Mar 17 '15 at 11:29
  • I updated my answer with another example from my blog post. – Adam Spriggs Mar 17 '15 at 11:33
  • Hi. The original answer was already enough information, thanks for that! :) What I mean is, that I need the lookupValue to be the Emailaddress that the TriggeredSend will be sent too. I hope you understand what I mean. I found several links help.exacttarget.com/en/documentation/exacttarget/content/… but they only describe how to set a Subscriber, and not how to retrieve the current receipeint for the email. Do you understand what I mean? I hope so. Thanks in advance for your help :) – user17980 Mar 17 '15 at 11:36
  • I just had to exchange the lookupValue with EmailAddress and it worked! Thank you very much – user17980 Mar 17 '15 at 13:20
  • There is a set of personalization strings that are available in all sends: wiki.memberlandingpages.com/en/documentation/exacttarget/… – Adam Spriggs Mar 17 '15 at 14:36

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.