1

I am trying to get Xero to send a WebHook to Salesforce so we can capture updates to Contacts and Invoices.

I created an Unauthenticated RESTful web-service by exposing the RestResource annotated Apex Class to the Force.com Site Guest User.

But I am receiving back errors! Xero will not authorise an Endpoint unless it replies with an empty body and without cookies, however, Salesforce always returns back the BrowserId Cookie and I cannot work out how to remove this!

Does anyone have any ideas how to remove this? Or am I trying to find air in space?

3
  • 1
    I'm looking to do the same thing myself and unfortunately I can't work out a way to remove the cookie either 🙄I've tried numerous things by overriding the RestResponse but not having much luck... Will let you know if I find anything. Commented Jun 11, 2018 at 7:04
  • Yeah I tried that also... the ONLY way I have been able to work out what is going on here is to create a small piece of "middleware" using Node.js on the Heroku platform... but I am absolutely lost with querying the data from Xero from the Node.js app #Newbie
    – Tim
    Commented Jun 12, 2018 at 10:52
  • Yea that's my only alternative solution as well, set up a custom endpoint on Heroku or similar to receive the message from Xero. From there, you can either: 1. Query Xero from the custom app to retrieve the data and then push that into Salesforce using the standard SOAP/REST API; OR 2. The custom app could just pass the Xero message straight to your Salesforce endpoint, and then Salesforce queries Xero for the data it needs. Commented Jun 12, 2018 at 21:32

1 Answer 1

2

I received an update from Xero today saying they had deployed a change and it will accept the BrowserId Cookie that is returned by Salesforce so you should be good to go now :)

3
  • Does it work now?
    – Robs
    Commented Jun 22, 2018 at 10:23
  • well I am getting the ITR... but I am having some issues with the HMAC encryption... it doesn't seem to want to work for me -_- salesforce.stackexchange.com/questions/222446/…
    – Tim
    Commented Jun 22, 2018 at 11:27
  • Awesome! Thanks for the update. I'll implement this and happy to share my code. Commented Jun 26, 2018 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .