I have created a different emails in the content builder and i would like to get the unique email id of the email using ampscript in data extension which will be used to determine the specific email to be sent. I know that we have a personalization string %%emailid%% but i get the value of this when i use this in the email during preview. Is it possible to retrieve the email id of the emails using ampscript?

  • You can use Ampscript, but as far as I know you have to relate it to something, like an existing _Job or _Send. I don't know if there is a data view exposed where you can lookup all emails based on some other input. If there is, it's not listed in the documentation. What are you looking to do, specifically? – Matthew Wash Oct 26 '18 at 15:48
  • Basically we are getting a XML file with DOC codes and we have various emails in the content builder. Based on the doc code received we want to fetch the email and send the same to the customer. @MatthewWash – Abhishek Oct 30 '18 at 10:37

What you need is SET @emailid = AttributeValue(“emailid”) as described in this thread. This is the best way of fetching values from a Data Extension for use in AmpScript expressions.

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.