I'm writing a managed package which uses a batch and i would like to provide errors tracking on this batch. I use a trigger on BatchApexErrorEvent but it doesn't appears in the package creator. Anyone knows how i could inculde that trigger in my package?

thanks in advance,

2 Answers 2


Update January 2021:

This appears to be resolved according to the Spring '21 release notes: Use BatchApexErrorEvent Triggers to Monitor ISV Applications

Include BatchApexErrorEvent triggers in your managed package to monitor the health of batch jobs and take necessary corrective action without any post-installation steps.

As at the time of writing there is a bug with how triggers on BatchApexErrorEvent can be packaged. Or more specifically, that they can't be packaged.

There is a thread about it in the Partners managed packages success group.

...there is now a feature request opened with the Platform Events team [...] to add package support for triggers on standard platform events. I have no ETA on when/if it'll get delivered, but it's officially in their backlog.

Feature request W-6408554 per investigation W-6389917 as a follow up to bug W-4386657.

Update tweet from Doug Ayers, who raised the post on the success group:

Not yet, @ca_peterson @burki_db and team are working on a fix. You can package a process on standard platform events that then publish your other event, either explicitly or by invoking apex/flow to do it. Customer can subscribe to that other event.


Just comming back on this question with the actual workaround.

You will have to use process builder to subscribe to the event and call an invocable method in order to perform logic on BatchErrorEvent insertion. This can be packaged.

You must log in to answer this question.

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