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" language="javascript"> | |
Platform.Load("core","1"); | |
Platform.Response.SetResponseHeader("Connect","Keep-Alive"); | |
Platform.Response.SetResponseHeader("Keep-Alive","timeout=40, max=200"); | |
var page = Request.GetQueryStringParameter("page"); | |
page = page ? page : 1; | |
var pageSize = Request.GetQueryStringParameter("pageSize"); | |
pageSize = pageSize ? pageSize : 20; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>DataTable</title> | |
<link href="https://cdn.datatables.net/2.3.2/css/dataTables.dataTables.min.css" rel="stylesheet" integrity="sha384-gC2LYLqCExndkNE9hTLhmEXvk8ZgIf42nRengHFbC9uaws2Ho0TW+ENGe4w15AHy" crossorigin="anonymous"> | |
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha384-NXgwF8Kv9SSAr+jemKKcbvQsz+teULH/a5UNJvZc6kP47hZgl62M1vGnw6gHQhb1" crossorigin="anonymous"></script> | |
<script src="https://cdn.datatables.net/2.3.2/js/dataTables.min.js" integrity="sha384-RZEqG156bBQSxYY9lwjUz/nKVkqYj/QNK9dEjjyJ/EVTO7ndWwk6ZWEkvaKdRm/U" crossorigin="anonymous"></script> | |
<style> |
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" language="javascript"> | |
Platform.Load("core","1"); | |
var prox = new Script.Util.WSProxy(); | |
function traverseChildFolders(parentID) { | |
var cols = ["ID","ParentFolder.ID","Name"]; | |
var filter = {Property: "ParentFolder.ID", SimpleOperator: "equals", Value: parentID}; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<s:Header> | |
<a:Action s:mustUnderstand="1">Create</a:Action> | |
<a:To s:mustUnderstand="1">{{soapEndpoint}}</a:To> | |
<fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth> | |
</s:Header> | |
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI"> | |
<Options> |
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" language="JavaScript"> | |
Platform.Load("core","1"); | |
var debug = true; | |
var prox = new Script.Util.WSProxy(); | |
var mid = Platform.Function.AuthenticatedMemberID(); | |
var publicationLists = getAllPublicationLists(); | |
if (debug) { |
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" language="JavaScript"> | |
Platform.Load("Core","1"); | |
/* adapted from https://sfmarketing.cloud/2020/02/29/create-a-cloudpages-form-with-an-image-file-upload-option/ */ | |
var results = {}; | |
results.result = {}; | |
results.debug = {}; | |
results.error = {}; |
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" language="ampscript"> | |
set @processingPageURL = "https://YOURTENANTHERE.pub.sfmc-content.com/YOURPATHHERE" | |
</script><!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> |
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
%%[ | |
set @dateToCheck = "2023-10-25" | |
set @month = datepart(@dateToCheck, "M") | |
set @day = datepart(@dateToCheck, "D") | |
set @daysOfWeek = "SunMonTueWedThuFriSat" | |
set @dayOfWeekToFind = format(@dateToCheck,"ddd") | |
set @dayOfWeekNum = divide(add(indexof(@daysOfWeek,@dayOfWeekToFind),2),3) |
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 | |
s.id JobID | |
, s.SentDate AT TIME ZONE 'Pacific Standard Time' as SentDate | |
, s.status JobStatus | |
, s.EmailName | |
, s.NumberTargeted Targeted | |
, s.NumberDelivered Delivered | |
, case | |
when isnull(s.NumberTargeted,0) = 0 then 0 | |
else cast((s.NumberDelivered) as decimal(18,4)) / cast(s.NumberTargeted as decimal(18,4)) |
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 | |
j.jobid | |
, j.emailName | |
, jn.journeyName | |
, max(jn.versionNumber) versionNumber | |
from _Job j | |
inner join ( | |
select | |
convert(varchar(36), ja0.VersionID) VersionID /* UniqueIdentifier datatype doesnt play nicely with JO-INs */ |
NewerOlder