SOLVED

Format of webhook XML response

Go to solution
Anonymous
Not applicable

Format of webhook XML response

I'm creating a page for a webhook to call. I plan to return my response in XML. I need to know what the format of the response is. An example would be awesome!
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Format of webhook XML response

Here is an example:

<status>200</status>
<requestId>yyy-zzz-aaa</requestId>
<photos>
  <twitter>
    <typeName>Twitter</typeName>
    <url>http://example.com</url>
   </twitter>
</photos>
 
For example, you can then reference photos.twitter[0].url as the Response Attribute and then map that to any Marketo field. Let me know if that makes sense?

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Re: Format of webhook XML response

Here is an example:

<status>200</status>
<requestId>yyy-zzz-aaa</requestId>
<photos>
  <twitter>
    <typeName>Twitter</typeName>
    <url>http://example.com</url>
   </twitter>
</photos>
 
For example, you can then reference photos.twitter[0].url as the Response Attribute and then map that to any Marketo field. Let me know if that makes sense?
Anonymous
Not applicable

Re: Format of webhook XML response

Thank you Murtza - yes, that does make sense. Now, I have a related question: What are the names of the Form elements that are posted to me by the webhook? When I select which fields I want the webhook to pass, it seems to build a JSON representation. But I am asking for a URL POST. Are the JSON names valid Form element names?
Anonymous
Not applicable

Re: Format of webhook XML response

I am not sure if I understand your question. The tokens in the webhook reference lead fields. You can create a webhook that generates either JSON or XML.

Here are the developer docs for webhooks:

http://developers.marketo.com/documentation/webhooks/
Anonymous
Not applicable

Re: Format of webhook XML response

In this case referencing the values is easy as it is dot notation - i.e. photos.typeName would give you Twitter as a value.   The problem we are having is when we want to access an attribute i.e. if you had <photos value="foo"> - how do you obtain "foo".

I can't see if Marketo uses XPath or not?