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 @systemDate, @utcDate | |
set @systemDate = Now() | |
set @utcDate = DateParse(@systemDate,1) | |
]%% | |
UTC Date: %%=v(@utcDate)=%% |
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
<script runat="server"> | |
Platform.Load("Core","1.1.1"); | |
var autoSuppressionExternalKey = "AutoSuppressionExternalKey"; | |
var SubscriberstoRemoveFromAutoSuppressionList = "Data_Extension_ExternalKey"; | |
var deleteRecords = DataExtension.Init(SubscriberstoRemoveFromAutoSuppressionList); | |
var data = deleteRecords.Rows.Retrieve(); | |
for (var i=0; i < data.length; i++) { | |
var emailAddress = data[i].Email; | |
var deleteRow = Platform.Function.DeleteData(autoSuppressionExternalKey,['Email Address'],[emailAddress]); |
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
/* | |
##To initiate an automation from one child business unit (BU) to another or from a child BU to a parent BU. | |
#1. Run the following Script in the parent BU and obtain the ObjectID of the automation in the child BU. | |
*/ | |
<script runat="server"> | |
Platform.Load("core","1.1.1"); | |
var prox = new Script.Util.WSProxy(); | |
var MID = 10000000000; |
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 status, [Date Added], [Email Address] from [Global Suppression List] | |
/* ------------ | |
You can find the Auto-Suppression list in: | |
--Email Studio > Email > Admin > Send Management > Auto-Suppression list > [Your list name] | |
In above query [Global Suppression List] is an example of list created in Auto-Suppression list | |
*/ |
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
<script runat="server"> | |
var isDebug = true; | |
try { | |
var a = 1; | |
var b = "six"; | |
var result = 1 / b; | |
if(isDebug) | |
Write('<script>console.log("result: ' + result + '")</script>'); | |
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
<script runat="server"> | |
Platform.Load("Core","1.1.1"); | |
try { | |
var rowsArr = [ | |
{EmailAddress:"mgold@example.com1",FirstName:"Mary",LastName:"Gold"}, | |
{EmailAddress:"apink@example.com1",FirstName:"Andrew",LastName:"Pink"}, | |
{EmailAddress:"jsmith@example.com1",FirstName:"John",LastName:"Smith"} | |
]; |
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 @FirstName = 'Karma' | |
SET @LastName = 'Dorjee' | |
/* Use below line of code to print when debugging */ | |
Output(Concat("My first name is ", @FirstName, "<br>")) | |
]%% | |
/* Use below line of code to print in the email message or SMS message or Push message or CloudPage */ |
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 @headerKey, @headerVal, @payload, @response, @unsubscribeURL | |
set @headerKey = "authorization" | |
set @headerVal = "<MyApi_Token>" | |
set @myLongURL = "https://mylongUrlDomain.com/?q=some_lenghty_query_param_value" | |
set @payload = Concat('{ | |
"allowDuplicates": false, | |
"domain": "my.customdomain.com", |
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
<script runat="server"> | |
var subkey = '100' | |
var firstName = Platform.Function.Lookup('Data_Extension_Name','First_Name','SubscriberKey',subkey) | |
Write(firstName); | |
</script> |
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 @subKey = '100' | |
SET @firstName = Lookup("Data_Extension_Name","First_Name","SubscriberKey", @SubsKey) | |
]%% | |
%%=v(@firstName)=%% |
NewerOlder