This file contains 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
%%[ | |
IF RequestParameter("submitted") == true THEN | |
/* check if lead already exists */ | |
SET @subscriberRows = RetrieveSalesforceObjects( | |
"Lead", | |
"Id,Email", | |
"Email", "=", RequestParameter("email") | |
) | |
This file contains 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
<table style="padding: 20px;"><tr><td> | |
<h2>Please fill in the form:</h2> | |
<form action="%%=RequestParameter('PAGEURL')=%%" method="post"> | |
<label>First name: </label><input type="text" name="firstname" required=""><br> | |
<label>Last name: </label><input type="text" name="lastname" required=""><br> | |
<label>Company: </label><input type="text" name="company" required=""><br> | |
<label>Email: </label><input type="text" name="email" required=""><br> | |
<input name="submitted" type="hidden" value="true"><br> | |
<input type="submit" value="Submit"> | |
</form> |
This file contains 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
%%[ | |
IF RequestParameter("submitted") == true THEN | |
/* create a new lead */ | |
SET @leadId = CreateSalesforceObject( | |
"Lead", 4, | |
"FirstName", RequestParameter("firstname"), | |
"LastName", RequestParameter("lastname"), | |
"Company", RequestParameter("company"), | |
"Email", RequestParameter("email") |
This file contains 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
%%[ | |
IF RequestParameter("submitted") == true THEN | |
/* check if lead already exists */ | |
SET @subscriberRows = RetrieveSalesforceObjects( | |
"Lead", | |
"Id,Email", | |
"Email", "=", RequestParameter("email") | |
) |
This file contains 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
%%[ | |
IF RequestParameter("submitted") == true THEN | |
/* check if lead already exists */ | |
SET @subscriberRows = RetrieveSalesforceObjects( | |
"Lead", | |
"Id,Email", | |
"Email", "=", RequestParameter("email") | |
) | |
This file contains 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 DISTINCT | |
s.SubscriberKey, | |
j.EmailName | |
FROM _Sent s | |
LEFT JOIN _Job j | |
ON s.JobID = j.JobID | |
LEFT JOIN _Open o | |
ON s.JobID = o.JobID AND s.ListID = o.ListID AND s.BatchID = o.BatchID AND s.SubscriberID = o.SubscriberID AND o.IsUnique = 1 | |
LEFT JOIN _Click c | |
ON s.JobID = c.JobID AND s.ListID = c.ListID AND s.BatchID = c.BatchID AND s.SubscriberID = c.SubscriberID AND c.IsUnique = 1 |
This file contains 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 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 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 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) |
OlderNewer