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 language='javascript' runat='server'> | |
Platform.Load('Core', '1'); | |
// Arrays of allowed values for both Sender Address and Sender Origin | |
// Sender Address is the from address when you send an email, make sure your expected from address is included in the list | |
// Sender Origin represents the domain originating the request | |
// The Marketing Cloud origin is in place to allow testing in Subscriber Preview, update that value to match your stack | |
var isAllowed = { | |
senderAddress:[ | |
'[email protected]' |
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
<!-- {{={< >}=}} --> | |
<!doctype html> | |
<html ⚡4email data-css-strict> | |
<head> | |
<meta charset="utf-8"> | |
<script async src="https://cdn.ampproject.org/v0.js"></script> | |
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script> | |
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script> | |
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script> | |
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script> |
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 subkey = "abc123"; | |
var email = "[email protected]" | |
var prox = new Script.Util.WSProxy(); | |
// Set specific BU context if required | |
// prox.setClientId({ "ID": 7279411 }); |
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"); | |
// Example of HTTP GET/POST to SFMC REST API to retrieve HTML of an email | |
try { | |
var authBaseUrl = 'https://abcd.auth.marketingcloudapis.com'; | |
var authEndPoint = '/v1/requestToken'; | |
var restBaseUrl = 'https://abcd.rest.marketingcloudapis.com'; | |
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"); | |
/* | |
Example that handles JSON data POSTed to this page. | |
e.g '{"firstname":"Joe","lastname":"Bloggs"}' | |
*/ | |
var jsonpost, jsondata; |
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"> | |
var prox = new Script.Util.WSProxy(); | |
var tsdKey = '123'; | |
var EmailAddress = '[email protected]'; | |
var tsd = { | |
TriggeredSendDefinition: { | |
CustomerKey: tsdKey |
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 prox = new Script.Util.WSProxy(); | |
// Need to retrieve the ObjectID for the Automation, which isn't available via the SFMC interface. | |
var cols = ["Name", "ProgramID", "IsActive"]; | |
var filter = { | |
Property: "Name", | |
SimpleOperator: "equals", |
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 listid = 1234; | |
var jobid = 567; | |
var batchid = 1; | |
var mids = { | |
BU1: 123456, | |
BU2: 123457, |
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"> | |
var skey = "abc123"; | |
var prox = new Script.Util.WSProxy(); | |
// query all BUs | |
var queryAllAccounts = true; | |
// set the attributes to be retrieved | |
// note Client.ID and not ClientID | |
var cols = ["Status","Client.ID"]; |
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 de = DataExtension.Init('DE Name goes here'); | |
var data = { | |
id: Request.GetFormField("id"), | |
FirstName: Request.GetFormField("firstname"), | |
Email: Request.GetFormField("email") | |
} |
NewerOlder