InvokeConfigure
→ objectInvokes the SOAP API Configure method on a fully configured API object. Used for configuration-type operations on SOAP objects.
Available in:
Email
CloudPage
Automation
Triggered Send
Syntax
Platform.Function.InvokeConfigure(apiObject, method, status, options)
4 arguments
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiObject |
object | Yes | SOAP API object built with CreateObject and configured with SetObjectProperty |
method |
string | Yes | Configure action to perform on the object |
status |
array | Yes | Array that receives the status and request ID of the API call (e.g. [0, 0]) |
options |
object | Yes | Additional API options to include in the call. Can contain a null value. |
Examples
var configObj = Platform.Function.CreateObject("DataRetentionPolicyConfiguration");
Platform.Function.SetObjectProperty(configObj, "CustomerKey", "MyDE");
Platform.Function.SetObjectProperty(configObj, "DataRetentionPeriod", "6");
Platform.Function.SetObjectProperty(configObj, "DataRetentionPeriodLength", "Months");
var StatusAndRequestID = [0, 0];
var result = Platform.Function.InvokeConfigure(configObj, "create", StatusAndRequestID, null);
var status = StatusAndRequestID[0];
var requestID = StatusAndRequestID[1];
WSProxy is the recommended approach for most SOAP API interactions. Use InvokeConfigure only when the Configure SOAP verb is specifically required.