Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Last active November 24, 2019 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/fdef5a99a266e57f4c9371fb7c815e89 to your computer and use it in GitHub Desktop.
Save zuzannamj/fdef5a99a266e57f4c9371fb7c815e89 to your computer and use it in GitHub Desktop.
<script runat="server">
var prox = new Script.Util.WSProxy();
var tsExKey = ''; //provide Triggered Send External Key
var EmailAddress = ''; //pass Email Address
var SubscriberKey = ''; //pass Subscriber Key
var firstName = ''; //pass First Name
var lastName = ''; //pass Last Name
var tsDef = {
TriggeredSendDefinition: {
CustomerKey: tsExKey
},
Subscribers: [{
EmailAddress: EmailAddress,
SubscriberKey: SubscriberKey,
Attributes: [{
Name: 'firstName',
Value: firstName
}]
}]
};
var res = prox.createItem('TriggeredSend', tsDef);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment