Calling Webhooks in Marketo | Community
Skip to main content
June 26, 2015
Question

Calling Webhooks in Marketo

  • June 26, 2015
  • 2 replies
  • 1565 views

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

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

2 replies

SanfordWhiteman
Level 10
June 26, 2015

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
June 27, 2015

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.