Updating Salesforce Objects with Server-Side JavaScript

If the custom preference center in your integrated Marketing Cloud account needs to update Salesforce object attributes, you’re probably acquainted with the UpdateSingleSalesforceObject, RetrieveSalesforceObjects and CreateSalesforceObject AMPscript functions.

Well, if you’re like me and you’d rather build your custom preference center with Server-Side JavaScript (SSJS), then you’ll need a way to use these AMPscript-only functions. Here’s my general approach for wrapping the AMPscript function in SSJS:

Wanna box?

Wanna box for those, Sir?

Nah, I hate violence. Is it cool if I just pay with my card?