1

I'm using HTTPGet to generate a dynamic subject line which works fine when I use this code:

 %%=HTTPGet("http://sandbox.site.com/newsletters/daily_subject.php")=%%

But the following does not work. Actually, it works in the preview but not when the email is sent:

 %%before; httpget; 1 "http://sandbox.site.com/newsletters/daily_subject.php"%%

I would prefer to use the second because I only want to make one http request. Any ideas?

2
  • Where in Salesforce are you doing this?
    – mkorman
    Dec 19, 2015 at 12:42
  • Marketing Cloud / email
    – ok1ha
    Dec 19, 2015 at 14:45

2 Answers 2

2

When using HTTPGET() function in AMPScript, if the URL is static, it will cache the value so it won't be calling it uniquely for each subscriber.

3
  • How to you mean a static URL? Meaning the page that it directs you to is static? Or that no variables are passed in the URL?
    – ok1ha
    Jan 6, 2016 at 15:19
  • 1
    No variables are passed in the URL.
    – Mac
    Jan 6, 2016 at 22:56
  • We tested and it worked great. Thank you for your help.
    – ok1ha
    Jan 9, 2016 at 4:30
2

You may have to have httpgetwrap enabled by SFMC Support for your second scenario to work.

I believe they call it WRAP HTTPGET URLS.

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.