Create via WSProxy
To create a single item or several items of the same type in a single call, use the createItem()
and createBatch()
methods.
- For the first parameter, specify the object type to perform the action on, such as
Email
orDataExtension
. - The second parameter is an object that represents the fields and values to set on the object. For batch operations, the second parameter is an Array of objects rather than a single object.
- The third parameter is optional and includes any properties to set using the
CreateOptions
object.
This example creates a simple DataExtension object that contains an ID
and a Name
field.
This example creates two similar data extensions using the createBatch
function.
In both single and batch operations, the results contain three properties: Status
, RequestID
, and Results
. The createItem()
method returns one item, and the createBatch()
method returns the same number of items that were passed into the method.
This example creates an automation activity and includes the Raw SOAP Wrapper which corresponds with the WSProxy call.
The response includes information about the Automation Activity.