Variables & Functions

AMPscript variables or inline functions are not supported in syndicated content URLs. The URL should be a constant. To set the URL based on a logical condition, use if and elseif statements to output the respective content syndication string.

NOTE: A Subscriber’s email address and email send job identifier can included in the syndicated content URL. Refer to Content Syndication Variables.

Example

%%[

var @tier
set @tier = AttributeValue("Tier")

if @tier == "gold" then
]%%
  %%httpget "https://httpbin.org/html?tier=gold"%%
%%[ elseif @tier == "silver" then ]%%
  %%httpget "https://httpbin.org/html?tier=silver"%%
%%[ else ]%%
  %%httpget "https://httpbin.org/html?tier=bronze"%%
%%[ endif ]%%

Output

If the ‘Tier’ value for a Subscriber is gold within a contextual data source, the email will retrieve content from the following URL:

https://httpbin.org/html?tier=gold

Syndicated content URLs can include an email job identifier or Subscriber’s email address as a variable, by including a [jobid] or [email address] string in the URL. Other variables are not supported.

This feature is useful for logging email sends in external platforms, or retrieving personalized content.

Example 1

The following string is included in an email and is requested once the email has been sent:

%%After;HTTPGet "https://limedash.com/webhook/sent?id=[jobid]"%%

Output

An HTTP GET request is made to the URL once the email has been sent. For an email Job ID of 5678, the following URL will be requested:

https://limedash.com/webhook/sent?id=5678

Example 2


Not a subscriber? Subscribe now.