- Date: <DATE - when the decision was made>
- Driver: <DRIVER - list a single person driving consenus and decision making>
- Stakeholders: <STAKEHOLDERS - list all relevant stakeholders affected by this decision>
- Status: [PROPOSED | DECIDED | SUPERSEDED]
- Categories: <CATEGORIES - use a simple grouping to help organize the set of decisions (e.g. backend, payment, user management, ...)>
- Outcome: <OUTCOME - once decided, provide a short summary of the decision outcome 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
<script runat="server"> | |
Platform.Load("Core","1.1.1"); | |
var customerName = "Dorjee"; | |
</script> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> |
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 clearDataExtension(externalKey) | |
{ | |
var prox = new Script.Util.WSProxy(); | |
var action = "ClearData"; | |
var props = { CustomerKey: externalKey }; | |
var data = prox.performItem("DataExtension", props, action); | |
} |
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 qd = QueryDefinition.Init("SQL_Query_External_Key"); | |
var campaignId = 'WINTER SALE' | |
var sql = "SELECT SubscriberKey, EmailAddress, FirstName, Status FROM MasterCustomer WHERE Status = '" + campaignId + "' FROM CampaignMaster"; | |
var status = qd.Update({ | |
Name : "SQL_Query_Name", |
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 getDataExtensionRowCount(DE_Name) { | |
if (DE_Name == '' || DE_Name == null) { | |
return null; | |
} else { | |
var ampscriptCodeLine = '%' + '%[SET @dataExtensionRowCount = DataExtensionRowCount("' + DE_Name + '")]%' + '%'; | |
Platform.Function.TreatAsContent(ampscriptCodeLine); | |
var dataExtensionRowCount = Platform.Variable.GetValue("@dataExtensionRowCount"); | |
return DataExtensionRowCount(dataExtensionRowCount); | |
} | |
} |
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
<html> | |
<head> | |
<style> | |
body, a, input, td, th {font-family:sans-serif; font-size:12px;} | |
table { | |
border-collapse: collapse; | |
width: 100%; | |
} | |
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 TOP 10 [Contact ID], | |
Email, | |
[Full Name], | |
[First Name], | |
[Last Name], | |
Mobile | |
FROM [Customer] | |
ORDER BY NEWID() |
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" language="javascript"> | |
Platform.Load("core","1.1.1"); | |
var isDebug = true; | |
var deObj = DataExtension.Init("<Data Extension Name>"); | |
var deObjRows = deObj.Rows.Retrieve(); | |
var publicationListID = "<Publication List ID>"; | |
var prox = new Script.Util.WSProxy(); | |
try { | |
var pubListArrayStr = "["; |
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"> | |
/*Author:K.T. Dorjee | |
Date:15/06/2022*/ | |
Platform.Load("Core", "1"); | |
var isDebug = false; | |
var currentDate = new Date(); | |
/* Below commented lines are for testing */ | |
/* var currentDate = new Date('12-Dec-2023'); */ | |
/* var currentDate = new Date('12-Jun-2023'); */ | |
try { |
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" language="JavaScript"> | |
Platform.Load("core","1"); | |
var debug = false; | |
// Mirrors AuditEvent REST Object data into a data extension | |
// - Audit Event Log must be configured in the account first -- Email Studio > Admin > Security Settings > Enable Audit Trail Data Collection: Yes | |
// - creates its own data extension | |
// - docs: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/getAuditEvents.html | |
// - defaults to the past 30 days of events |