handlers.subscription_deletion_mail_handler

class SubscriptionDeletionMailHandler(handlers.eventhandler.EventHandler):

Whenever somebody removes a subscription from a fact sheet, inform the admin team (or whoever you like), so they can double-check. The mail is sent to the e-mail address configured in the global configuration (Company level) of your instance. If you are unsure how to configure your instance, please contact Aronis support.

roles: List of relevant roles that you want to monitor.
exceptions List of e-mail addresses of users whose actions should not trigger a notification, e.g. admin users.

name = 'Notification: Subscription Deleted'
description = 'Sends a notification to one or more mail addresses when somebody deletes a subscription.'
conditions = {'event_types': ['SubscriptionDeletedEvent']}
config_template = {'roles': ['System Owner', 'Manager L1', 'RESPONSIBLE', 'ACCOUNTABLE'], 'exceptions': ['admin1@domain.com', 'admin2@domain.com']}
def handle(self, event, fact_sheet, **kwargs):

Called automatically whenever a FactSheetCreated or FactSheetUpdated event comes in via webhook.