SFMC File Transfer Activity Encryption Keys
SF Documentation: https://help.salesforce.com/articleView?id=sf.mc_overview_use_a_created_key_with_file_transfer_activities.htm&type=5
SF Documentation: https://help.salesforce.com/articleView?id=sf.mc_overview_use_a_created_key_with_file_transfer_activities.htm&type=5
<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"); |
<html> | |
<head> | |
<style> | |
body, a, input {font-family:sans-serif;} | |
</style> | |
</head> | |
<body style="font-family:sans-serif"> | |
%%=now()=%% | |
<h1>JSON Parse with GTL</h1> | |
%%[ |
<script runat="server" language="JavaScript"> | |
Platform.Load("core","1"); | |
var debug = false; | |
try { | |
var prox = new Script.Util.WSProxy(); | |
var startTime = Now(); | |
var timeoutMilliseconds = 1500000; // 25 minutes |
<script runat="server" language="JavaScript"> | |
Platform.Load("core","1"); | |
var debug = false; | |
// Mirrors AuditEvent REST Object data into a data extension | |
// - Audit Event Log must be configured in the account first -- Email Studio > Admin > Security Settings > Enable Audit Trail Data Collection: Yes | |
// - creates its own data extension | |
// - docs: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/getAuditEvents.html | |
// - defaults to the past 30 days of events |
select | |
x.emailaddress | |
, x.subscriberkey | |
from ( | |
select | |
w.emailaddress | |
, w.subscriberkey | |
, w.insertDate | |
, row_number() over (partition by w.subscriberkey order by w.insertDate asc) ranking | |
from Welcome_Trigger w |
<?xml version="1.0" encoding="UTF-8"?> | |
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<s:Header> | |
<a:Action s:mustUnderstand="1">Retrieve</a:Action> | |
<a:MessageID>urn:uuid:e3f7fdfe-d225-47fb-a764-ad4f465fb724</a:MessageID> | |
<a:ReplyTo> | |
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address> | |
</a:ReplyTo> | |
<a:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To> | |
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"> |
select | |
_ContactID ContactID | |
, _DeviceID DeviceID | |
, _APID APID | |
, _Status Status | |
, _Source Source | |
, _SourceObjectId SourceObjectId | |
, _Platform Platform | |
, _PlatformVersion PlatformVersion | |
, _Alias Alias |
FieldName | DataType | Length | Precision | Scale | PrimaryKey | Required | DefaultValue | |
---|---|---|---|---|---|---|---|---|
ClientID | Number | TRUE | TRUE | |||||
SendID | Number | TRUE | TRUE | |||||
SubscriberKey | Text | 254 | TRUE | TRUE | ||||
EmailAddress | EmailAddress | FALSE | FALSE | |||||
SubscriberID | Number | TRUE | TRUE | |||||
ListID | Number | TRUE | TRUE | |||||
EventDate | Date | TRUE | TRUE | |||||
EventType | Text | 10 | FALSE | FALSE | ||||
BatchID | Number | TRUE | TRUE |
<script type="javascript" runat="server"> | |
Platform.Load("core","1.1.5"); | |
var DE = "Contacts_To_Delete"; | |
var logDE = "Contacts_To_Delete_Log"; | |
var log = DataExtension.Init(logDE); | |
var url = 'https://auth.exacttargetapis.com/v1/requestToken'; | |
var contentType = 'application/json'; |