SOLVED

Webhooks, Tokens and Quotation markers

Go to solution
Highlighted
Level 1

Webhooks, Tokens and Quotation markers

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

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Webhooks, Tokens and Quotation markers

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).

View solution in original post

2 REPLIES 2
Highlighted
Level 10 - Community Moderator

Re: Webhooks, Tokens and Quotation markers

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).

View solution in original post

Highlighted
Level 1

Re: Webhooks, Tokens and Quotation markers

Thanks Sanford! I would never have guessed!

Appreciate the quick response.