Skip to content

Instantly share code, notes, and snippets.

Adam Spriggs wvpv

Block or report user

Report or block wvpv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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>
@wvpv
wvpv / sfmc-sql-pushaddress.sql
Created Dec 10, 2019
Query to pull PushAddress data
View sfmc-sql-pushaddress.sql
select
_ContactID ContactID
, _DeviceID DeviceID
, _APID APID
, _Status Status
, _Source Source
, _SourceObjectId SourceObjectId
, _Platform Platform
, _PlatformVersion PlatformVersion
, _Alias Alias
@wvpv
wvpv / SFMC-AMPscript-output-random-rows-from-a-data-extension.amp
Last active Nov 15, 2019
Output random rows from a data extension with AMPscript
View SFMC-AMPscript-output-random-rows-from-a-data-extension.amp
%%[
var @debug
set @debug = 1
var @rn
var @rows
var @rowCount
var @arr
var @max
@wvpv
wvpv / sfmc_journey_builder_log.sql
Last active Mar 27, 2020
Journey Builder Logging query
View sfmc_journey_builder_log.sql
select
s.SubscriberKey
, s.Event
, s.EventDate
, s.Journey
from Journey_Builder_Status s
/* name: Journey_Builder_Log */
/* target: Journey_Builder_Log */
/* action: Update */
@wvpv
wvpv / sfmc-update-salesforce-objects-with-ssjs.html
Last active May 27, 2020
Update Salesforce Objects with Server-Side JavaScript
View sfmc-update-salesforce-objects-with-ssjs.html
<script type="text/javascript" runat="server">
Platform.Load("core", "1");
var debug = 1;
// detect form submission
if (Request.Method == "POST") {
// retrieve the input values from the form payload
var subscriberKey = Request.GetFormField("subscriberKey");
You can’t perform that action at this time.