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.1.1"); | |
| try { | |
| var rowsArr = [ | |
| {EmailAddress:"[email protected]",FirstName:"Mary",LastName:"Gold"}, | |
| {EmailAddress:"[email protected]",FirstName:"Andrew",LastName:"Pink"}, | |
| {EmailAddress:"[email protected]",FirstName:"John",LastName:"Smith"} | |
| ]; |
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 @FirstName = 'Karma' | |
| SET @LastName = 'Dorjee' | |
| /* Use below line of code to print when debugging */ | |
| Output(Concat("My first name is ", @FirstName, "<br>")) | |
| ]%% | |
| /* Use below line of code to print in the email message or SMS message or Push message or CloudPage */ |
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
| var @headerKey, @headerVal, @payload, @response, @unsubscribeURL | |
| set @headerKey = "authorization" | |
| set @headerVal = "<MyApi_Token>" | |
| set @myLongURL = "https://mylongUrlDomain.com/?q=some_lenghty_query_param_value" | |
| set @payload = Concat('{ | |
| "allowDuplicates": false, | |
| "domain": "my.customdomain.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"> | |
| var subkey = '100' | |
| var firstName = Platform.Function.Lookup('Data_Extension_Name','First_Name','SubscriberKey',subkey) | |
| Write(firstName); | |
| </script> |
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 @subKey = '100' | |
| SET @firstName = Lookup("Data_Extension_Name","First_Name","SubscriberKey", @SubsKey) | |
| ]%% | |
| %%=v(@firstName)=%% |
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 ID, FirstName, LastName, EmailAddress FROM CustomerMaster | |
| WHERE EmailAddress NOT LIKE '%_@__%.__%' |
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
| updatePublicationList(12345, "003X123456789", "Unsubscribed") | |
| function updatePublicationList(listId, subscriberKey, status) { | |
| /* | |
| status = Unsubscribed or status = Active | |
| */ | |
| var subArr = { | |
| "SubscriberKey": subscriberKey, | |
| "Lists": [] | |
| }; |
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.1.1"); | |
| var customerName = "Dorjee"; | |
| </script> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Page Title</title> | |
| </head> |
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
| function clearDataExtension(externalKey) | |
| { | |
| var prox = new Script.Util.WSProxy(); | |
| var action = "ClearData"; | |
| var props = { CustomerKey: externalKey }; | |
| var data = prox.performItem("DataExtension", props, action); | |
| } |
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.1.1"); | |
| try { | |
| var qd = QueryDefinition.Init("SQL_Query_External_Key"); | |
| var campaignId = 'WINTER SALE' | |
| var sql = "SELECT SubscriberKey, EmailAddress, FirstName, Status FROM MasterCustomer WHERE Status = '" + campaignId + "' FROM CampaignMaster"; | |
| var status = qd.Update({ | |
| Name : "SQL_Query_Name", |