handlers.subscription_creation_mail_handler

class SubscriptionCreationMailHandler(handlers.eventhandler.EventHandler):

Whenever somebody adds a subscription to 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 Created'
description = 'Sends a notification to one or more mail addresses when somebody creates a subscription.'
conditions = {'event_types': ['SubscriptionCreatedEvent']}
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.