user9064103
user9064103

Reputation: 313

Marketo REST API - increment field

If i have a custom object with an integer field, is there a way to send a request to increment this field by 1? Or would i have to get that field's value, increment it and send it back?

Upvotes: 1

Views: 137

Answers (1)

dferenc
dferenc

Reputation: 8126

Unfortunately, you cannot increment such a value with a single API call, so you either have to

  • keep track of your records outside of Marketo too, and update Marketo with the current value;
  • or you have to use two API calls: one to fetch the record, and a second one to send back the updated value.

Note:
While it is possible to increment/decrement the Score field type (which is also an integer field) with integer values, it is only possible to do so through the Change Score flow step within Marketo. Besides that, the Score type is not available for custom objects.

To be sure, I just have tried to increment an integer value via the API by setting “+1” as a sent value, but it was recorded as plain “1”, so the original record has been overwritten.

Upvotes: 1

Related Questions