Maximum parseable + loggable length of a Marketo webhook response is 10,000 bytes

SanfordWhiteman
Level 10 - Community Moderator
Level 10 - Community Moderator

Something for my fellow push-it-to-the-limit Marketo pros.

 

Discovered this when sending a ton of debug info back from a custom deduplication webhook. (Not to map that info to Marketo fields, only to check the Call Webhook activity details.)

 

After 10 KB the response is truncated, meaning it becomes broken JSON overall and Response Mappings won’t work, even if the “real” fields were at the top.

 

Takeaway

Be choosy about what you return for debugging. And don’t try to debug and get production/final responses at the same time.

 

On JSON size

It’s rare to worry about the total byte size of a JSON response. Serializing to JSON is the last step — and may even be done automatically outside of your userland code. Until you serialize, you won’t know how many bytes are added by quotes, semicolons, and escapes, and how many are subtracted by removing undefined entries. You’d need to pre-serialize, check the length of the result and then go back and truncate certain values. Not fun at all!

259
0