Created
April 18, 2019 14:08
-
-
Save jdeblank/acc4aab0ab3b726e283e8175645e6067 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"> | |
var prox = new Script.Util.WSProxy(); | |
var tsdKey = '123'; | |
var EmailAddress = '[email protected]'; | |
var tsd = { | |
TriggeredSendDefinition: { | |
CustomerKey: tsdKey | |
}, | |
Subscribers: [{ | |
EmailAddress: EmailAddress, | |
SubscriberKey: EmailAddress, | |
Attributes: [{ | |
Name: 'firstname', | |
Value: 'John' | |
}] | |
}] | |
}; | |
var res = prox.createItem('TriggeredSend', tsd); | |
if (res.Status != "OK") { | |
// yay | |
} else { | |
// boo | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment