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> | |
%%[FOR @i = 1 TO 10 DO]%% | |
%%[IF MOD(@i,2) == 1 THEN]%% | |
<tr> | |
<td style="background-color:gray;">%%=v(@i)=%%</td> | |
</tr> | |
%%[ELSE]%% | |
<tr> | |
<td>%%=v(@i)=%%</td> | |
</tr> |
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
// Source: https://salesforce.stackexchange.com/questions/270895/use-ssjs-to-retrieve-importdefinition-results/270934 | |
<script runat="server"> | |
Platform.Load("core","1.1.1"); | |
try { | |
var prox = new Script.Util.WSProxy(); | |
var cols = [ | |
"ImportDefinitionCustomerKey", | |
"ImportType", |
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
// Source: https://salesforce.stackexchange.com/questions/268963/how-to-create-multiple-des-from-an-array-using-ssjs-via-an-automation-studio-s/268997#268997 | |
<script runat=server> | |
Platform.Load("Core", "1"); | |
var prox = new Script.Util.WSProxy(); | |
var name = ["deRed", "deGreen", "deBlue"]; | |
var desc = ["descRed", "descGreen", "descBlue"]; | |
var folder = [123, 456, 789]; |
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 | |
SubscriberKey, | |
Field1, | |
Field2, | |
Field3 | |
FROM SomeDataExtension | |
WHERE SubscriberKey NOT IN ( | |
SELECT o.SubscriberKey | |
FROM _Job j WITH (NOLOCK) | |
INNER JOIN _Open o WITH (NOLOCK) on j.JobID = o.JobID |
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
<!-- AMPscript block above <HTML> --> | |
%%[ | |
VAR @string | |
SET @string = 'PositionA1[|]PositionA2[|]PositionA3[|]PositionA4a,PositionA4b|PositionA4c,PositionA4d[^]PositionB1[|]PositionB2[|]PositionB3[|]PositionB4a,PositionB4b|PositionB4c' | |
SET @Array = BuildRowsetFromString(@string,"[^]") | |
]%% |
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
<!-- AMPscript Block --> | |
%%[ | |
var @UTMstring1 | |
set @UTMstring1 = "?utm_source=SFMC&utm_medium=email&utm_campaign" | |
var @UTMstring2 | |
set @UTMstring2 = "&utm_content=" | |
var @UTMstring3 | |
set @UTMstring3 = "&utm_subscriber=" | |
var @url1 |
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
// Was found posted by Sasa Adzip in December 2018. Source = https://success.salesforce.com/ideaView?id=08730000000cIvUAAU | |
<script runat=server> | |
Platform.Load("core","1.1.5"); | |
var deName="INSERT_DataExtensionName"; | |
var FolderScript= DataExtension.Retrieve({Property:"Name",SimpleOperator:"equals",Value:deName}); | |
//var key="INSERT_ExternalKeyOfDataExtension"; | |
//var FolderScript= DataExtension.Retrieve({Property:"CustomerKey",SimpleOperator:"equals",Value:key}); | |
var FolderID = FolderScript[0].CategoryID; |
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
%%[Set @url = concat('https://www.someurl.com?utm_source=StaticParameter1&utm_medium=StaticParameter2&utm_campaign=StaticParameter3&utm_term=',FieldName,'&utm_content=StaticParameter4')]%% | |
<a href="%%=RedirectTo(v(@url))=%%" target="_blank" style="font-size: 18px; font-family: Open Sans, Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; border-radius: 5px; background-color: #000000; padding: 15px 30px; border: 1px solid #000000; display: block;">Click Here »</a> |
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 sde.* | |
FROM SomeDataExtension sde | |
INNER JOIN _ListSubscribers l ON sde.SubKey = l.SubscriberKey | |
WHERE l.ListID = '000' | |
AND sde.SubKey = l.SubscriberKey | |
AND sde.Email = l.EmailAddress | |
AND sde.Email NOT LIKE '%string here%' |
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
function () | |
{ | |
var result = ''; | |
if(typeof(Storage) !== 'undefined') | |
{ | |
if (typeof(window.sessionStorage._enterCookieName) !== 'undefined') | |
{ | |
result = window.sessionStorage._enterCookieName + ''; |