InvokeExecute()

Invokes the Execute method on a Marketing Cloud Engagement API Object and returns the API status code.

The InvokeExecute() function has three parameters:

  • apiObject (API Object): Required. The API Object to delete.
  • statusMessage (AMPscript variable): An AMPscript variable that stores the API status message.
  • requestId (AMPscript variable): An AMPscript variable that stores the request ID.

This example sets up and executes a LogUnsubEvent. The function succeeds if the operation completes, or when the specified error codes indicate the subscriber was already unsubscribed.