Add the #DF24 Developer Keynote to your agenda. Join us in-person on 9/19 at 2:30 p.m. PT or on Salesforce+ at 5 p.m. PT for the must-see session built just for developers.

AddObjectArrayItem()

Adds an object to an array in a Marketing Cloud Engagement API object.

The AddObjectArrayItem() function has three parameters:

  • apiObject (API Object): Required. The API object that contains the array that you want to modify.
  • arrayProperty (string): Required. The array property to receive the new item.
  • itemToAdd (string): Required. The item to add to the array.

This example adds the attribute myNewAttribute to the Attributes array on the mySubscriber API object.