handlers.create_onetrust_application_handler

class CreateOnetrustApplicationHandler(handlers.eventhandler.EventHandler):

Whenever somebody creates an Application, we want to automatically create an application in OneTrust and link it to LeanIX.
Configuration settings should be self-explanatory. In case of any issues, please contact Aronis support.

name = 'OneTrust Connector'
description = 'When somebody creates an application, synchronize it to OneTrust.'
conditions = {'event_types': ['FactSheetCreatedEvent', 'FactSheetFieldUpdatedEvent']}
config_template = {'client_id': '12345678', 'client_secret': '12345678', 'fs_types': ['Application'], 'external_id_field': 'externalId'}
def handle(self, event, fact_sheet, **kwargs):

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