SAP Cloud Platform Open Connectors

Marketo Bulk Upsert vs Insert

When working with Marketo bulk uploads (POST/bulk/{objectName} ),  the type of upload used is dependent on the metadata passed during the upload. By default, Marketo's native bulk endpoints do an upsert. In other words, if the record already exists it updates it and if it does not already exist, it inserts. To use the native bulk APIs for Marketo and use the upsert functionality a primaryKeyName (this is the field that will be looked at to see if the particular line is unique and identify if the process will be an insert or upsert) must be included in the JSON metadata.

If you would like to do an insert (without an upsert) then the Marketo's native bulk APIs can no longer be used. We have built our element in such a way where you can still use bulk through our endpoints and we will handle making individual calls to insert into Marketo. To use this you will need to change the metadata. The metadata still needs a primaryKeyName but a bulkUploadRecordSize of 2 or greater must also be added. If this piece is included, the job only inserts brand new data and errors on duplicate records. Please note that to utilize this functionality, our system makes individual calls to Marketo for each line in the CSV. It is important to be cognizant of this difference to avoid exceeding Marketo's API limits.