InvokeUpdate()

Invokes the Update method on an API object.

The InvokeUpdate() function has four parameters:

  • apiObject (API object): Required. The API object to update.
  • statusMessage (AMPscript variable): An AMPscript variable that stores the API status message.
  • errorCode (AMPscript variable): An AMPscript variable that stores the response error code (if one occurs).
  • updateOptions (API object): An UpdateOptions API object.

This example creates a new Subscriber object and sets the EmailAddress and SubscriberKey values. Next, it creates a new ClientId object, sets the value of ID, and associates the ClientId object with the Subscriber object. After that, it calls the InvokeUpdate() function to perform the update operation.

If the function executes successfully, the output includes a status message and an error code of 0.