1

Among the several ways we have in salesforce to do polling to 3rd parties using callouts, I see important drawbacks for each of those that make taking a decision difficult.

  • Background solutions are robust and decoupled, but the polling interval usually bigger than 1 min due to org resources):

    • Using batch/queueables that re-enqueue themselves (as suggested in Polling endpoint in Apex)

    • Using an autolaunched flow with Pause element and callout apex actions.

  • UI solution, where the polling interval of seconds but blocking the UI: Basically LWC/Aura/VF with Continuation/actionPoller/js interval, ...

I feel UI solutions are the most optimal solutions in terms of performance, as the interval can be set to seconds without depending on org resources. However there are many cases in which either blocking the UI with a component is not a option, or we want a decoupled polling solution.

For those use cases, what would be your recommendation in terms of robustness/maintenance/performance?

1
  • Another way to do this is to implement an odata 4.0 interface on your non-salesforce source systems. oData implements an optional interface to notify consumers of realtime changes to the records in the source systems. Salesforce can subscribe to these updates via the Salesforce Connect product (add-on), and even run triggers in salesforce based on changes in these external systems
    – eyewell
    Commented Oct 27, 2021 at 17:01

0

Browse other questions tagged .