-
-
Save katydorjee/c22a487be885003e979f39e484d224e2 to your computer and use it in GitHub Desktop.
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 = Attribute.GetValue("_subscriberkey"); | |
var jid = Attribute.GetValue("jobid"); | |
var lid = Attribute.GetValue("listid"); | |
var bid = Attribute.GetValue("_JobSubscriberBatchID"); | |
var prox = new Script.Util.WSProxy(); | |
var props = [ | |
{ Name: "SubscriberKey", Value: subkey }, | |
{ Name: "JobID", Value: jid }, | |
{ Name: "ListID", Value: lid }, | |
{ Name: "BatchID", Value: bid }, | |
{ Name: "Reason", Value: "WSProxy one click unsubscribe" } | |
]; | |
try{ | |
var data = prox.execute(props, "LogUnsubEvent"); | |
Write(Stringify(data)); | |
}catch(e){ | |
Write(Stringify(e)); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment