handlers.fact_sheet_deletion_mail_handler

class FactSheetDeletionMailHandler(handlers.eventhandler.EventHandler):

Whenever somebody archives a fact sheet, inform the admin team (or whoever you like), so they can double-check. It either sends an e-mail to the e-mail address configured in the global configuration
(Company level) of your instance, or it creates a to-do in the to-do fact specified in the configuration.

If you are unsure how to configure your instance, please contact Aronis support.

exceptions: List of e-mail addresses of users whose actions should not trigger a notification, e.g. admin users.
todo_fact_sheet: id of the fact sheet where the notification will be attached.
todo_recipient: e-mail address of the recipient of the to-do notification.
title: Title of the to-do, or subject of the notification e-mail. body: Body of the to-do or the e-mail. Supported placeholders: $DISPLAY_NAME, $USER_EMAIL, $FS_URL, $COMMENT.

If todo_fact_sheet / todo_recipient are not set, the notification will be sent as e-mail.

name = 'Notification: Fact Sheet Archived'
description = 'When somebody archives a fact sheet, either create a to-do notification or send an e-mail notification to one or more recipients.'
conditions = {'event_types': ['FactSheetArchivedEvent']}
config_template = {'exceptions': ['admin1@example.com', 'admin2@example.com'], 'todo_fact_sheet': '12345678-...', 'todo_recipient': 'john.doe@example.com', 'title': "Fact Sheet deleted: '$DISPLAY_NAME'", 'body': "$USER_EMAIL deleted the fact sheet '$DISPLAY_NAME' $FS_URL\\nDeletion comment: '$COMMENT'"}
def handle(self, event, fact_sheet, **kwargs):

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

def initial_sync_event(self, fs):