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
Victor HuaVictor Hua 

callback in REST API

Is it possiblle to have set up trigger using REST API, when when condition meets, salesforce will callback to my service?
We are creating a service that will notify user when certain data in salesforce changed, the other option, not ideal, is we can have a worker that periodically poll the data to check the changes.
David ZhuDavid Zhu
I think you can use future method in trigger. The following tuturial might have what you want.

https://developer.salesforce.com/docs/atlas.en-us.integration_workbook.meta/integration_workbook/integration2a_intro.htm

Create an Integration Apex Class
https://developer.salesforce.com/docs/atlas.en-us.integration_workbook.meta/integration_workbook/integration2a_3.htm

Create a Trigger to Call the @future Method
https://developer.salesforce.com/docs/atlas.en-us.integration_workbook.meta/integration_workbook/integration2a_5.htm
 
Victor HuaVictor Hua
Great, Thanks for the tip. I will look into this.