When a service fails to be renewed via cron, we do not send any email notice to staff. Instead, an error is logged in cron, and there may also be a module log from the failed renewal attempt.
We currently have notices sent for service creation errors, (un)suspension errors, and cancellation errors. A new email template should be added for Renewal Error. This applies to Staff only.
We will need to dig into it to get specifics on the tags to set for the email, but generally, it should say there was an error with Client #x for Service #y due to error <error message>.
- The email template should be generated in all languages installed (similar to other migrations for new email templates).
- Staff should also be able to subscribe to this email template. I think any staff group with the 'Cancellation Error' notice enabled should also have this new Renewal Error enabled. Similar for each staff member in the staff group: they should be auto-subscribed to the Renewal Error if they are currently subscribed to the Cancellation Error.
Note: Since services can renew on 5 minute intervals, it's possible to be spammed every 5 minutes with a new email about the same service renewal failure.
We could have an automation task run say every x hours, like 24hrs that has a digest of all service renewal failures in that time period. This way they don't get spammed and get a single email every x hours with all that failed.