Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save katydorjee/41104f1bc57060a3589d0853bc55cd01 to your computer and use it in GitHub Desktop.
Save katydorjee/41104f1bc57060a3589d0853bc55cd01 to your computer and use it in GitHub Desktop.
Update Marketing Cloud All Subscribers using SSJS
<script runat="server">
Platform.Load("core", "1.1.1");
var subscriber = {
SubscriberKey: "S_10001",
"Attributes": {
'First Name': "Karmab",
"Last Name": "Dorjeeb"
},
"Lists": {"ID": 101}
};
try {
var subObj = Subscriber.Init("SubKey");
var status = subObj.Update(subscriber);
Write("Response: " + Stringify(status));
} catch (ex) {
Write("catch: " + Stringify(ex));
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment