Created
March 27, 2017 21:48
-
-
Save angrycider/f8377566cb8846b1842da15786b7fd59 to your computer and use it in GitHub Desktop.
6. Upsert Subscriber Record
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
//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