This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
o.SubscriberKey, | |
ea.Gender | |
FROM _Open o | |
INNER JOIN ENT._EnterpriseAttribute ea ON o.SubscriberID = ea._SubscriberID | |
WHERE ea.Gender = 'Female' | |
AND o.EventDate > dateadd(d,-7,getdate()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @email, @skey | |
set @skey = AttributeValue("_subscriberkey") | |
set @email = Lookup("_Subscribers","EmailAddress","SubscriberKey", @skey) | |
]%% | |
Email Address: %%=v(@email)=%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
VAR @subscriberkey, @email, @firstname, @lastname | |
SET @subscriberkey = _subscriberkey | |
IF NOT EMPTY(@subscriberkey) THEN | |
SET @rs= RetrieveSalesforceObjects("Contact", "Id, FirstName,LastName,Email", "Id", "=", @subscriberkey) | |
SET @rowCount = rowcount(@rs) | |
IF @rowCount > 0 THEN | |
SET @row = row(@rs,1) | |
SET @email = field(@row,"Email") | |
SET @firstname = field(@row,"FirstName") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
VAR @subscriberkey, @email, @firstname, @lastname | |
SET @subscriberkey = _subscriberkey | |
IF NOT EMPTY(@subscriberkey) THEN | |
IF Substring(@subscriberkey, 1,3) == "00Q" THEN | |
/* Lead */ | |
SET @rs= RetrieveSalesforceObjects("Lead", "Id, FirstName,LastName,Email", "Id", "=", @subscriberkey) | |
SET @rowCount = rowcount(@rs) | |
IF @rowCount > 0 THEN | |
SET @row = row(@rs,1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" name="FirstName" | |
data-field-type="Text" value="%%=v(@firstname)=%%"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @apikey, @url, @response | |
set @apikey = Lookup("NASAapi","apikey","id","apod") // keep your apikey in a Data Extension | |
set @apikey = "7Apb3QN7qVsXPuPDcSZBKAPf8twca03C5w4Oxuyc" // or hardcode it into your CloudPage | |
set @url = concat('https://api.nasa.gov/planetary/apod?api_key=',@apikey) | |
set @response = HTTPGET(@url,false,0,@CallStatus) | |
]%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @apikey, @url, @response | |
set @apikey = Lookup("NASAapi","apikey","id","apod") // keep your apikey in a Data Extension | |
set @apikey = "7Apb3QN7qVsXPuPDcSZBKAPf8twca03C5w4Oxuyc" // or hardcode it into your CloudPage | |
set @url = concat('https://api.nasa.gov/planetary/apod?api_key=',@apikey) | |
set @response = HTTPGET(@url,false,0,@CallStatus) | |
]%% | |
@response: %%=v(@response)=%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server" language="javascript"> | |
Platform.Load("Core","1"); | |
//Get the @response variable from AMPscript | |
var response = Variable.GetValue("@response"); | |
//Parse JSON | |
var json = Platform.Function.ParseJSON(response); | |
//Set the @hdurl variable to be accessible in AMPscript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img style="height:100vh" src="%%=v(@hdurl)=%%"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @apikey, @url, @response | |
set @apikey = Lookup("NASAapi","apikey","id","apod") // keep your apikey in a Data Extension | |
set @apikey = "7Apb3QN7qVsXPuPDcSZBKAPf8twca03C5w4Oxuyc" // or hardcode it into your CloudPage | |
set @url = concat('https://api.nasa.gov/planetary/apod?api_key=',@apikey) | |
set @response = HTTPGET(@url,false,0,@CallStatus) | |
]%% | |
<script runat="server" language="javascript"> | |
Platform.Load("Core","1"); |