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"> | |
/* | |
Ref: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_httpPost.html | |
Ref: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/validateEmail.html | |
*/ | |
Platform.Load("Core","1"); | |
try { | |
/*=== (unsafe) Plain Text API Credentials ===*/ | |
var authurl = "https://mcxxxxxxxxxxxxxxxx.auth.marketingcloudapis.com/"; |
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"> | |
Platform.Load("Core","1"); | |
try { | |
var prox = new Script.Util.WSProxy(); | |
var cols = ["Name","CustomerKey","CategoryID"]; | |
var filter = {Property: "Name",SimpleOperator: "equals",Value: "Cam DE"}; | |
var res = prox.retrieve("DataExtension",cols,filter); | |
//Write('Message: '+ Stringify(res)); | |
for (s = 0; s < res.Results.length; s++) { |
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"> | |
Platform.Load("Core","1"); | |
try { | |
//Do Functions Here | |
} | |
catch(error) { | |
Write('Message: '+ Stringify(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
%%[ | |
SET @rows = LookupRows("DENAME", "Key", "Value") | |
FOR @i = 1 to RowCount(@rows) DO | |
]%% | |
EmailAddress: %%=Field(Row(@rows,i), 'EmailAddress')=%%<br> | |
%%[ | |
NEXT @i | |
]%% |
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
%%[ | |
/* | |
Ref: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/httppost2.html | |
Ref: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/access-token-s2s.html | |
Ref: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/validateEmail.html | |
*/ | |
/*=== (Unsafe) Plain Text API Credentials ===*/ | |
SET @client_id = "xxxxxxxxxxxxxxxxxx" | |
SET @client_secret = "xxxxxxxxxxxxxxxxxx" |
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 DISTINCT | |
a.SubscriberKey | |
, a.EmailAddress | |
, j.JobID | |
, j.EmailName | |
, s.EventDate | |
, j.SendClassificationType | |
, j.SendType | |
, a.DateUnsubscribed | |
FROM _Subscribers a |
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 @json = '{"Flights": [{"Origin": "IND","Dest": "NYC","Price": 100.0},{"Origin": "IND","Dest": "LAX","Price": 200.0},{"Origin": "IND","Dest": "SEA","Price": 500.0,"PerBagSurcharge": 25}]}' | |
SET @rows = BuildRowsetFromJson(@json, '$.Flights[*]', 1) | |
]%% | |
<table border=1> | |
<tr><th>Origin</th><th>Dest</th><th>Price</th><th>PerBag Surcharge</th></tr> | |
%%[FOR @i = 1 TO Rowcount(@rows) DO]%% | |
<tr> | |
%%[FOR @c = 1 TO 4 DO]%% | |
<td>%%=Field(Row(@rows,@i),@c)=%%</td> |
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 @json = '{"menu": { | |
"id": "file", | |
"value": "File", | |
"popup": { | |
"menuitem": [ | |
{"value": "New", "onclick": "CreateDoc(a)"}, | |
{"value": "Open", "onclick": "OpenDoc(b)"}, | |
{"value": "Save", "onclick": "SaveDoc(c)"} | |
] |
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 @fname = RequestParameter('fname') | |
SET @lname = RequestParameter('lname') | |
SET @email = RequestParameter('email') | |
IF NOT EMPTY(RequestParameter('pref1')) THEN | |
SET @Cats = "true" | |
ELSE | |
SET @Cats = "false" | |
ENDIF |
OlderNewer