Skip to content

Instantly share code, notes, and snippets.

@angrycider
Created March 27, 2017 21:48
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 angrycider/f8377566cb8846b1842da15786b7fd59 to your computer and use it in GitHub Desktop.
Save angrycider/f8377566cb8846b1842da15786b7fd59 to your computer and use it in GitHub Desktop.
6. Upsert Subscriber Record
//UPSERT SUBSCRIBER
var co = {
"SubscriberKey": "test@fakeemail.com",
"EmailAddress": "test@fakeemail.com",
"Attributes":[{"Name":"Favorite Color","Value":"purple3"}]
};
var uo = {
SaveOptions: [{"SaveOption":{PropertyName:"*",SaveAction:"UpdateAdd"}}]
};
SoapClient.create('Subscriber',co, uo, function(err, response){
if(err){
console.log(err);
}
else{
console.log(response.body.Results);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment