How can set the default Email Digest frequency for all members to 'Weekly'. At the moment, it is 'Not Subscribed'.
How can set the default Email Digest frequency for all members to 'Weekly'. At the moment, it is 'Not Subscribed'.
You would call:
$core_v2_widget.ExecuteFile('script.vm', "%{ RunAsUserName = 'mmonteleone' }")
And then in an automation attatchment, script.vm, all API calls execute as mmonteleone. It's also possible to pass parameters via ExecuteFile, but it gets kind of difficult in Velocity. Honestly, I'd recommend writing automations in the default of server-side JavaScript instead.
So you could call:
core_v2_widget.ExecuteFile('script.jsm', {
Parameters: {
'a': 1,
'b': 2
},
RunAsUserName: 'mmonteleone'
});
And then in script.jsm, access those parameters:
var paramA = core_v2_widget.GetExecutionParameterValue('a');
var paramB = core_v2_widget.GetExecutionParameterValue('b');