function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Stefan Senegeac 6Stefan Senegeac 6 

How would I approach making a managed package with customer editable triggers while using SoC?

Hey, I need to create a managed package that syncs some data into a custom object via json. 
After data comes in I need to have some triggers on that package that translates that data into Standard SF objects(Contact, Event, etc)
The 'data translation' is done via a trigger on the custom object. I need to have that trigger editable after deploy in case some customers have a bunch of custom fields or even objects that need to be translated to.
Am I correct in aproaching this with triggers? If so I need to have the triggers outside the managed package which then rises another question:
How would I go about this seeing how I want to implement SoC, Service/Domain layers, Selectors ? Should I just exclude all from managed package?
Geoffrey BessereauGeoffrey Bessereau
I would probably use Custom Metadata to store the information that can change, and reference it in your trigger.
Look at how Adrew Fawcette implemented Declarative Lookup Rollup Sumaries to see how you can work around using a Managed Package while still allowing user customization.