I want to create an application in NodeJs, using either Faye or Socket.IO, or in Redis, that receives updates when certain fields or objects are changed in Salesforce. As far as I know, it's possible to create Apex triggers that do callouts, but this comes with limitations, one of which is that there is a limit to the number of @future callouts.

How should I go about integrating this application to receive updates when a record is updated, so we can see in real time what happens to a record, and if something changes, the custom application information changes as well?


2 Answers 2


There are not many options if you want to get real-time updates from Salesforce to other systems.

  • Web service callouts: You can write a trigger on the object that you want to get notified from which you can make @future web service callout to your web services (which you have already covered in your question and I'm including this here for completeness)
  • Outbound SOAP messages: If you want to get updates only from one object (for e.g. Account or Contact), then outbound SOAP message can be used to fire a call to your web service. Note that outbound SOAP messages provide you the WSDL and you need to implement this WSDL and you will not be able to use an existing web service.
  • Polling: You can design a solution on your external system to continuously poll Salesforce to get any new data. There are several methods based on the technology that you use. For e.g. If you use DbAmp or Pragmatic Works Task Factory, you can write regular SQL code or use SSMS and SQL Agent to schedule a job to retrieve the delta records (i.e. only those who got updated or inserted).
  • Streaming API: You can use Streaming API to define a SOQL query on the objects that you are interested to receive the updates and develop client on your external system to get notifications in real-time. Please check out the 'Getting started with Streaming API' and 'Streaming API Developers Guide' I'm not that familiar with NodeJS and I do not know if it provides API to handle Bayeux protocol. So this might be a deal breaker to use Streaming API.

Of all the four options, I believe the Streaming API is the best in terms of performance and scalability. However, if your requirements to get real-time notifications are very minimal and DbAmp/PragmaticWorks Task Factory may be the easiest and quickest way to implement as it doesn't require any extra coding on the Salesforce side. These tools are not that costly too.


Update to this post - Platform events and Change data capture (CDC) are realtime notification products released since original answers above.

Platform events run on a salesforce event bus, with replay capability. Clients can subscribe using the samples in github, and in pilot now is a gRPC-based PubSubAPI.

CDC is a special use case of platform events - CDC streams any change to any record out to any subscriber, including many data points - who changed, which record, to which fields, which with new values, at what time,...

Event allocation in every org follows a freemium model, which enables developers to try this out (50k-100k events delivered to your external subscribers/day). Adding more events has a cost.

You must log in to answer this question.

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