Skip to content

Instantly share code, notes, and snippets.

@jdeblank
Created April 18, 2019 14:08
Show Gist options
  • Save jdeblank/acc4aab0ab3b726e283e8175645e6067 to your computer and use it in GitHub Desktop.
Save jdeblank/acc4aab0ab3b726e283e8175645e6067 to your computer and use it in GitHub Desktop.
<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