Sage 50 Scripting Support?

Is there a way to have Sage50 run a script internally or does it have to be an actual independent app?  Meaning is there a way to put a call in one of the .ini files that will run a script/macro whenever an action occurs such as an item is added to a sales order.  I need to automate the modification of discounts based on several factors.  I can see where you might write an external app and then after all items are added to the sales order have a user click on a button to run it and make the modifications, but I was really hoping for something with less user intervention.  I am looking through the SDK and don't see much that looks helpful.  I have a few other programs we have had to add scripts like this to before and none were this cryptic.