Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Spriggs wvpv

View GitHub Profile
@wvpv
wvpv / sfmc-ssjs-retrieve-automation-with-wsproxy-results.json
Created Sep 4, 2020
SFMC SSJS Retrieve Automation with WSProxy - Results
View sfmc-ssjs-retrieve-automation-with-wsproxy-results.json
{
"Status": "OK",
"RequestID": "40ff6f0d-5f64-4201-b441-671d70a49279",
"Results": [
{
"Schedule": null,
"AutomationTasks": [
null,
null,
null,
@wvpv
wvpv / sfmc-ssjs-retrieve-automation-with-wsproxy.js
Created Sep 4, 2020
SFMC SSJS Retrieve Automation with WSProxy
View sfmc-ssjs-retrieve-automation-with-wsproxy.js
<script runat="server">
Platform.Load("Core","1");
var prox = new Script.Util.WSProxy();
try {
var cols = ['*'];
var filter = {
Property: "Name",
@wvpv
wvpv / sfmc-send-soap-object-de-schema.csv
Created Jun 27, 2020
SFMC Send SOAP Object Data Extension Schema
View sfmc-send-soap-object-de-schema.csv
Name Data Type Length Precision Scale Primary Key Required Default Value
ID Number 1 1
SendDate Date 0 0
EmailName Text 100 0 0
Subject Text 200 0 0
Status Text 15 0 0
Additional Text 50 0 0
BCCEmail EmailAddress 0 0
Client_ID Number 0 0
Client_PartnerClientKey Text 64 0 0
@wvpv
wvpv / sfmc-send-soap-object-retrieve-to-de.js
Last active Aug 24, 2020
Retrieve Send SOAP Object data and write to a Data Extension
View sfmc-send-soap-object-retrieve-to-de.js
<script runat="server">
Platform.Load("core","1");
var debug = false;
try {
var prox = new Script.Util.WSProxy();
// DESCRIBE - SEND
@wvpv
wvpv / sfmc-automation-status-across-business-units.html
Created Apr 7, 2020
SFMC Automation Status across Business Units
View sfmc-automation-status-across-business-units.html
<html>
<head>
<style>
body, a, input, td, th {font-family:sans-serif; font-size:12px;}
</style>
</head>
<body style="font-family:sans-serif;">
<script runat="server">
@wvpv
wvpv / SFMC-AMPscript-exclusion-script-content-block.amp
Created Feb 27, 2020
Exclusion Script Content Block - Prevent duplicates
View SFMC-AMPscript-exclusion-script-content-block.amp
%%[
var @contextInsertDate
set @contextInsertDate = AttributeValue("YOUR_TSD_DE_INSERT_DATE")
set @contextInsertDate = format(@contextInsertDate,"yyyyMMddhhmmss")
var @exclude
set @exclude = 0
@wvpv
wvpv / SFMC-AMPscript-exclusion-script.amp
Last active Feb 27, 2020
Content Block based Exclusion Script
View SFMC-AMPscript-exclusion-script.amp
TreatAsContent(contentblockbyKey("YOUR_EMAIL_EXCLUSION_SCRIPT_CONTENT_BLOCK"))==1
@wvpv
wvpv / sfmc-dynamic-brand-email-with-impression-region.html
Last active Feb 20, 2020
Dynamic brand email with impression region
View sfmc-dynamic-brand-email-with-impression-region.html
%%[
/* init block - read the send context and prep you dynamic content here */
/* set this to 0 to disable the debugging output below */
var @debug
set @debug = 1
/* get the brand code from the sending data extension (aka the send context) */
var @brandCode
@wvpv
wvpv / sfmc-bulletproof-email-background.html
Last active Jan 31, 2020
SFMC bulleproof email background
View sfmc-bulletproof-email-background.html
%%[
/* via https://backgrounds.cm/ */
var @cellBGImage
set @cellBGImage = "https://media.giphy.com/media/87xihBthJ1DkA/giphy.gif"
]%%
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
@wvpv
wvpv / sublime-text-search-replace-regex.txt
Last active Jan 27, 2020
Sublime Text Search/Replace RegEx Patterns
View sublime-text-search-replace-regex.txt
search: <(table|tr|td|p|div)(.*?)>
replace: \n<\1\2>\n
search: <\/(table|tr|td|p|div)>
replace: \n<\/\1>
You can’t perform that action at this time.