Please contact Aronis support for setup assistance.
GenericConnector(config, **kwargs)
name =
'Sync To External Systems'
description =
'Synchronizes LeanIX Fact Sheet updates to an external system.'
conditions =
{'event_types': ['FactSheetUpdatedEvent'], 'fs_types': ['Application']}
supports_initial_sync =
True
def
data_requirements(self):
Declare the exact fact-sheet data this handler needs, so the webhook event
loop (process_event in workspace/views_module.py) can load a single lean
FastFactSheet per event instead of the full fact sheet.
Return a dict:
{
"fields": [],
"relations": [],
"subscriptions": bool, # True if handle() reads fs["subscriptions"]
"tags": bool, # True if handle() reads tags / has_tag()
"documents": bool,
"acls": bool,
"completion": bool, # True if handle() reads fs["completion"]
"base_fields": [], # optional; omit/None = full
# default base field set. A list restricts the
# base scalars to just those (id and type are
# always loaded). Advanced opt-in for max speed.
}
Fields referenced by this handler's trigger are folded in automatically by
the event loop (into "fields"), so only declare what handle() itself needs on
top of them.
Return None (the default) to signal "requirements cannot be declared
statically" - e.g. handlers that exec/eval config-supplied code. The event
loop then loads the full fact sheet for that event, so correctness is always
preserved. This is a standalone hook (deliberately not tied to the
initial_sync_* hooks, which are slated to migrate onto it later).
def
handle(self, event, fs, **kwargs):
Called automatically whenever a relevant event comes in via webhook.
def
get_sync_descriptor(self, fs_type):
def
get_table_name(self, fs_type):
def
get_mappings(self, fs_type):
def
get_mapping(self, fs_type, field):
def
get_foreign_field_name(self, fs_type, field):
def
get_subscription_reference_table(self, fs_type, field):
def
get_subscription_reference_field(self, fs_type, field):
def
get_foreign_value(self, fs_type, field):
def
get_id_from_reference_table(self, fs_type, field, name, table_field='name'):
def
update_attributes(self, fs):
def
create_record(self, fs):
def
get_update_transactions(self, field, fs):
def
delete_record(self, ext_id):
def
get_external_id(self, fs):
def
get_record(self, table):
def
insert_record(self) -> str:
def
get_external_url(self, fs, table, ext_id):
def
get_user_id(self, mail, table, mail_field, standard=False):
def
get_record_class(self):
def
update_attribute(self, key, value):