Last active
December 3, 2020 07:55
-
-
Save zuzannamj/ee137068c437cb29d1eea5eb4d325fca 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") | |
var prox = new Script.Util.WSProxy(); | |
var tsExKey = '12345'; //pass Triggered Send External Key | |
var EmailAddress = 'example@example.com'; //pass Email Address | |
var SubscriberKey = 'example@example.com'; //pass Subscriber Key | |
var firstName = 'Zuzanna'; //pass First Name | |
var tsDef = { | |
TriggeredSendDefinition: { | |
CustomerKey: tsExKey | |
}, | |
Subscribers: [{ | |
EmailAddress: EmailAddress, | |
SubscriberKey: SubscriberKey, | |
Attributes: [{ | |
Name: 'firstName', | |
Value: firstName | |
}] | |
}] | |
}; | |
var res = prox.createItem('TriggeredSend', tsDef); | |
Write(Stringify(res)); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment