I've got a trigger that invokes a call to a external service, passing along opportunity data, via a queueable apex class. Most of the time this call would pass, but say my external system goes down, and some of these calls fail.

What kind of process should I put in place that would run maybe hourly, find all the failed queue items, and retry sending over that opportunity data? Would this need to be a batch job that runs every hour, and if so, how do I access the queue?

1 Answer 1


If your call to the external webservice is simple and straight forward, then use the combination of Workflow & outbound message. This out of the box functionality allows retry mechanism hourly & upto certain number of times.

If above approach doesn't seem to work then, probably once an error response is received you might have to store this response in a custom object and then write a batch apex job which looks in this object and retries the webservice calls.

You must log in to answer this question.

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