Calling Webhooks in Marketo

Anonymous
Not applicable

Calling Webhooks in Marketo

Hello:

I am trying to use a webhook to call a REST API.

I am having a hard time getting my webhook to work.

I have to pass in a combination of parameters that came from the form and some parameters that I have to pass in that are not in marketo.

Possibly making a mistake in 3 places :

1. Payload template : Is there an example of a payload that I can look at so that I can format it correctly?

Tried this and am not sure it works

{ "PRODUCT": {{myproduct}} ,

"COUNTRY": {{lead.Company Name}},

"COMPANY_NAME": {{lead.Country Name}},

"EMAIL": {{lead.Email Address}}

}

2. Request Token Encoding :

I dont know what this should be

When I use a REST Client I set it to

application/x-/www.-form-urlencoded

3 Getting the response in XML

I am trying to map it to marketo fields I created : which I think will work

Any help on 1 & 2 will be appreciated.

thanks!
Anand

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Calling Webhooks in Marketo

Well, what do you think that payload format is?

It isn't proper JSON because the values aren't quoted, and it certainly isn't proper WWW-Form-URL-Encoded (FUE).  It looks like a regular JavaScript object.  I don't recommend that transport format unless you know what you're doing and why.

I would recommend you leave #2 (Request Token Encoding) at URL-encoded and make the payload a URL-encoded string of values (just like in a query string) unless you have a clear reason to receive JSON on your server.

Josh_Hill13
Level 10 - Champion Alumni

Re: Calling Webhooks in Marketo

There is a great ebook from RingLead on how to structure webhooks. Maybe it's not quite what you mean here, but worth a look.