Right90 (one of Astadia's business partners) requires an interface running in Cast Iron for a client that is designed to check for updates/changes to the Quantity, Price and Time elements of the Opportunity Line Item. Cast Iron pulls selected data and processes each record according to the Sales and Revenue forecasting rules defined by Right90. A configuration file will be created in the client's Salesforce.com org that will contain “configurable elements” that Cast Iron uses within the Sales and Revenue forecast calculations. This custom object is only be visible to System Administrators and Cast Iron and will allow the user to update static values used by Cast Iron in creating the Sales & Revenue forecast output. Cast Iron queries this custom object every time the Interface runs loading the configurable elements into memory.
I've created a very large IF THEN statement that starts by querying a "queue" object that processes each record by evaluating the Sales Rule Number and then generating the Sales forecast records and then the Revenue Rule Number ending by generating the Revenue forecast records. The queue object is populated by triggers written by Right90 for the client. The Sales & Revenue forecast records are written to output custom objects which are then loaded into the Right90 API (I would have written directly to Right90 but their API is not public yet) using an automated process. The Sales & Revenue forecasts are then displayed in the client's Salesforce org. Each rule number tells Cast Iron what calculation to use and how many output records to generate. One calculation has over 200 configurable static elements that Cast Iron uses to spread revenue over a 19 month period. This was an interesting project because Cast Iron was being used for something other than integrating legacy data with Salesforce.com. Feel free to contact me at firstname.lastname@example.org if you have any questions about the project.