Webhook Mapping | Community
Skip to main content
Jason_Scott
Level 4
April 7, 2016
Question

Webhook Mapping

  • April 7, 2016
  • 3 replies
  • 3413 views

Is there a way to map the entire webhook response?

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

3 replies

SanfordWhiteman
Level 10
April 7, 2016

I gather you want to add fields to the response without changing the definition... don't believe that's possible.

April 7, 2016

Webhook response mapping GUI in Marketo enables us to specify the jSON / XML field and does the parsing for us automatically.

But there is no way to specify it to get the entire JSON / XML response and store it in a field.

If you have access to the web hook server, you can encapsulate the entire JSON / XML you see now in another JSON / XML as a node. And then you can get that value.

How are you going to use that JSON / XML in Marketo though? What is the business case?

Rajesh

Jason_Scott
Level 4
April 7, 2016

We're making a call using a webhook and the response is a snippet of html code, it's not XML or JSON. I need to map this to a marketo field.  How can I define the "Response Attribute" as the whole response?

Jason_Scott
Level 4
April 7, 2016

The webhook response we are given is a snippet of code, not an array.  I want to map this snippet, which is the whole response, to a marketo field.  Is this possible?  How can I define the "Response Attribute" as the whole response?

SanfordWhiteman
Level 10
April 7, 2016

If the response is HTML, then it's (probably) not well-formed XML nor JSON.

I would do what Rajesh suggested, which is encapsulate the HTML block as a property of a simple JSON object.

{

  html : "your \"escaped\" <html> here"

}