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 su.emailaddress, | |
| su.subscriberkey AS ContactKey, | |
| j.journeyname,j.versionnumber,ja.activityname AS EmailName, | |
| s.eventdate AS SendTime, s.jobid, s.listid, | |
| b.eventdate AS BounceTime, b.BounceType,b.SMTPBounceReason, b.SMTPMessage, b.SMTPCode | |
| FROM [_sent] AS s | |
| INNER JOIN [_journeyactivity] AS ja | |
| ON s.triggerersenddefinitionobjectid = ja.journeyactivityobjectid | |
| INNER JOIN [_journey] AS j | |
| ON ja.versionid = j.versionid |
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"> | |
| Platform.Load("core","1.1.1"); | |
| var subkey = "SubscriberKey" | |
| var email = "[email protected]" | |
| var api = new Script.Util.WSProxy(); | |
| var sub = [ | |
| { | |
| SubscriberKey: subkey, | |
| EmailAddress: 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
| <script runat="server"> | |
| Platform.Load("core","1.1"); | |
| var prox = new Script.Util.WSProxy(); | |
| var de = DataExtension.Init("my_data_extension"); | |
| var data = de.Rows.Retrieve(); | |
| for (var i = 0; i < data.length; i++) { | |
| var row = data[i]; | |
| try { | |
| var subscriber = { |
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"> | |
| Platform.Load("core", "1"); | |
| try { | |
| var de = DataExtension.Init("DataExtensionExkey"); | |
| var payload = { |
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 | |
| CASE | |
| /* Check if the current date is between the first Sunday of October and the first Sunday of April (AEDT period) */ | |
| WHEN GETDATE() >= | |
| /* First Sunday in October */ | |
| DATEADD(DAY, 1 - DATEPART(WEEKDAY, DATEFROMPARTS(YEAR(GETDATE()), 10, 1)) + 7 * (1), DATEFROMPARTS(YEAR(GETDATE()), 10, 1)) | |
| AND GETDATE() < | |
| /* First Sunday in April */ | |
| DATEADD(DAY, 1 - DATEPART(WEEKDAY, DATEFROMPARTS(YEAR(GETDATE()), 4, 1)) + 7 * (1), DATEFROMPARTS(YEAR(GETDATE()), 4, 1)) | |
| THEN DATEADD(HOUR, 17, GETDATE()) /* AEDT (UTC+11) */ |
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 @systemDate, @utcDate | |
| set @systemDate = Now() | |
| set @utcDate = DateParse(@systemDate,1) | |
| ]%% | |
| UTC Date: %%=v(@utcDate)=%% |
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"> | |
| 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 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
| /* | |
| ##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 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 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 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"> | |
| var isDebug = true; | |
| try { | |
| var a = 1; | |
| var b = "six"; | |
| var result = 1 / b; | |
| if(isDebug) | |
| Write('<script>console.log("result: ' + result + '")</script>'); | |
NewerOlder