function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
newguySFnewguySF 

Send salesforce JSON or XML data to REST API

Hello everyone,

I'm looking for simple alternatives to writing triggers for the above mentioned scenario. The full use case is to have the call fire every time a new contact is entered in the system. Anything with workflows (has to be REST), streaming API, etc?


Thanks in advance for the help!
Ashish_SFDCAshish_SFDC

Hi Newguy, 

 

There is an Action in Workflow called Outbound Message, please see the details in the link below might help, 

https://help.salesforce.com/htviewhelpdoc?err=1&id=workflow_defining_outbound_messages.htm&siteLang=en_US

 

Regards,

Ashish

 

 

Dave DurbinDave Durbin
The OP clearly said 'has to be REST' The link provided uses  SOAP outbound messaging 
osf_teamosf_team
Only option available is Using HTTP objects in Apex. But again it has its pros and cons. For more information please see this blog (https://www.sundoginteractive.com/blog/workflows-and-the-outbound-message-option-in-salesforce). Streaming API at this moment is not reliable, Salesforce is working on to provide durable streaming API.
 
Jason Sun 11Jason Sun 11
If you want to receive JSON instead of XML for your external endpoint and avoid having to write code, you could use this appExchange app:

Declarative Webhooks - https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MSv8REAT

The app has a free tier that should let you try it out.