My email has a couple of AMPScript variables.
This email will be sent using API call. I don't want create profile attributes for these variables. Can I pass the values to these variables using the API call?


Yes, you can. They become personalization variables in the email context. So if you pass an attribute in your API call named FirstName, you can retrieve it like this:

var @firstName
set @firstName = AttributeValue("FirstName")
Dear %%=v(@firstName)=%%,

You you don't have to create a corresponding Profile Attribute in order to use it.

  • Did this work for you? If so, would you checking the check-mark beside my answer? I'd appreciate it. For more information about accepting answers, take a look at our FAQ. Jul 12 '16 at 14:14
  • Hi @Adam, can I use the same solution to capture URLs? We have a password reset email where the reset URL is being via API. Will the same solution work for capturing URLs as well?
    – Maneesh
    Jun 2 '17 at 13:12

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.