Webhooks, Tokens and Quotation markers | Community
Skip to main content
Dan_Perrin
New Participant
December 16, 2016
Solved

Webhooks, Tokens and Quotation markers

  • December 16, 2016
  • 1 reply
  • 2396 views

Hello,

I'm new to Marketo.

I've created a webhook to our API. The webhook works as expected. However, when I include token fields, then Marketo seems to automatically include "quotes" around the rendered output. This breaks our JSON REST submission.

Eg:

{"message":"Hello there,  how are you?"}

This works fine

However:

{"message":"Hello there {{lead.First Name:default=edit me}}, how are you?"}

Produces

{"message":"Hello world "Dan", how are you?"}

The extra quotes breaks the JSON structure. How can I work around this?

Any help would be much appreciated.

Thanks,

Dan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Turn off JSON encoding in the webhook setup.  By default the lead tokens are quoted as if they are JSON strings (as opposed to components of a composed JSON payload).

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
December 16, 2016

Turn off JSON encoding in the webhook setup.  By default the lead tokens are quoted as if they are JSON strings (as opposed to components of a composed JSON payload).

Dan_Perrin
New Participant
December 16, 2016

Thanks Sanford! I would never have guessed!

Appreciate the quick response.