I'm trying to run Apex code that runs a little while after custom objects are created. The problem is that I have a few systems inserting and updating data when a customer places an order in an ecommerce system.
What I want to do in theory, is run code when an Order__c is created. In practice, there are related objects to the order such as many OrderItem__c or other objects that are created seconds later. Therefore, I can't run my logic during Order__c Insert.
I tried to use @future to add a slight delay, but sometimes it happens too fast so it's not reliable.
It seems like I could use Apex Scheduler to schedule running code 1 minute later for example. However, the documentation recommends against using this in a trigger since you can only schedule 100 things at once and this would break if hundreds of orders were placed at once.