I've written a pretty simple Apex Trigger and Class which sends and HTTP request to an external service when a Salesforce Contact is updated. I developed this in our local dev environment and seems to be working.
I have an app in which users can oAuth into Salesforce, and my end goal here is to have the Apex Trigger I wrote run for each org that oAuths. So, my question is what are some different options, or the best way, to accomplish this?
One thought I've had is to somehow programmatically deploy the Apex code to each organization after an initial admin oAuth (or something like that) - however I'm brand new to Salesforce and am currently not sure A.) how to do this and B.) if it's even feasible.
Is this a good idea? Are there other ways to accomplish this goal? I would really appreciate any insight, recommendations, or resources pointing towards some things that could help. Thank you so much!