Syntax

Platform.Function.InvokePerform(apiObject, method, status, options)
4 arguments

Parameters

Name Type Required Description
apiObject object Yes SOAP object built with CreateObject and configured with SetObjectProperty
method string Yes Method to perform on the object
status array Yes Array that receives the status, error code, and perform response of the API call (e.g. [0, 0, 0])
options object Yes API configure options to include in the call. Can contain a null value.

Examples

var sendDef = Platform.Function.CreateObject("TriggeredSendDefinition");
Platform.Function.SetObjectProperty(sendDef, "CustomerKey", "WelcomeEmail_TSD");

var StatusAndRequestID = [0, 0, 0];
var result = Platform.Function.InvokePerform(sendDef, "start", StatusAndRequestID, null);
var statusMessage = StatusAndRequestID[0];
var errorCode = StatusAndRequestID[1];
var performResponse = StatusAndRequestID[2];

WSProxy is recommended over InvokePerform for most use cases — it is simpler, uses native JS objects, and handles serialization automatically.

See Also