SOLVED

Webhooks - need help with syntax for parsing the return

Go to solution
Anonymous
Not applicable

Webhooks - need help with syntax for parsing the return

Ok, I have gone through all the documentation and community article and it is NOT obvious what is the syntax for the webhook response syntax.

I have tried the "." method as in the article, XPath type "/" and nothing works.  The webhook call is a success but the field value is never updated.

If this is my webhook return:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <loginResponse>
         <result>
            <metadataServerUrl>https://cs3.salesforce.com/services/Soap/m/28.0/00DQ00000001SA2</metadataServerUrl>
            <passwordExpired>false</passwordExpired>
            <sandbox>true</sandbox>
            <serverUrl>https://cs3.salesforce.com/services/Soap/c/28.0/00DQ00000001SA2</serverUrl>
            <sessionId>00DQ00000001SA2!ARkAQFY5v3bpC3YJsHQguSgPw.sptBCKnOSidNdEiEl6XtO37Ygv6T3blGfkpnTE4b7fC3ZAcv8myLSsSiTzTAkLySD5xdna</sessionId>
            <userId>005Q000000I229cIAB</userId>

What should the response mapping be to store the sessionId? Xpath? "dot" syntax? from the root or relative to the SoapBody ???

I have tried all of the above with no success. HELP

0EM50000000Qfiq.jpg

Cheers,
Dazed and Confused
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Fixed in Aug release

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Eric,
You should use the dot syntax from the root of the XML tree.  Please try the following -

soapenv:Envelope.soapenv:Body.loginResponse.result.sessionId

Raj
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Thanks Raj, I really appricate the help.

Ok tried it.  Same as before. Webhook generates a sucess but the field does not get updated. I think I am going to have to raise a support ticket.

Cheers,
Eric

FYI: 
Here is the activity Details
0EM50000000QfjU.jpg
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Eric,
Please do so - we'll have someone investigate this asap

Raj
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Hey Eric,  I am also having a similar problem.  I get the response, but it is not written into the field.  Tech support indicates that they use OGNL to parse responses and spaces are not permitted for Response Attribute names. We're in the process of revising our webservice to use underscores for the Response Attribute names - hopefully that will solve the problem.  I wonder if the slashes in your Response Attribute name are causing a problem?
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Thanks Elliot,

I was trying to see if they used a XPath type parse but as you point out that is not the case.
 
Posted as support ticket.
 
Case #: 00169748 - (ref:_00D506sHb._50050MlNLU:ref)

Cheers,
Eric
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

Fixed in Aug release
Anonymous
Not applicable

Re: Webhooks - need help with syntax for parsing the return

It would be helpful if the fix and solution were documented in this post.