Is there a programmatic way to subscribe business object events?

I'm doing preliminary research on what kind of API we can use to integrate with Sage 100 ERP.

I've discovered Sage_Certified_Solution_Requirements.pdf with several statements about automation:
Automation: Certified applications must offer automated installation. Installation need not, however, be provided through a single installation program.

I see a lot of talks about Business Object Interface and User Defined Scripting. And It looks like main APIs. The only documented way to add scripts is Custom Office -> Main -> User-Defined Script Maintenance.

Please, provide me with code example how to add scripts programmatically. I suppose It can be done somehow with CM_Script_UTL.

Thanks in advance.