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
Malakai LaviMalakai Lavi 

Delay a chatter post

I want to write a chatter bot for a demo that posts after a certain set of conditions. Eg, a task is created and 30 seconds later the chatter bot makes a post on the task.

Is it possible to delay that post so that it does not occur immediatlely within the context of the transaction?
Best Answer chosen by Malakai Lavi
SonamSonam (Salesforce Developers) 
You could try this using scheduled apex, however, meeting the 30 seconds requirement might not be feasible at all the times:
http://salesforce.stackexchange.com/questions/12874/chaining-scheduled-apex-to-process-callouts-every-30-seconds

All Answers

SonamSonam (Salesforce Developers) 
You could try this using scheduled apex, however, meeting the 30 seconds requirement might not be feasible at all the times:
http://salesforce.stackexchange.com/questions/12874/chaining-scheduled-apex-to-process-callouts-every-30-seconds
This was selected as the best answer
Gaurav NirwalGaurav Nirwal
Haven't noticed any delays in my org. We use MS Exchange for our email and the mentions are basically instantaneous. Might be worth checking with your IT to see if they have validations on external e-mail. Maybe get them to add the Salesforce domain as trusted and then see if the issue persists. Finally you can open a case with Salesforce and request their tech support to troubleshoot with you.
Malakai LaviMalakai Lavi
Sonam, this is an interesting approach. I think that the platform is not designed to delay actions in the method that I would like as it would use up shared resources. I will read over that post and see if it is feasible for me.