My setup:
Every month I have a .NET app that uploads data into a custom object (ChurchHist__c) that keeps track of each church's contributions for that month. There are little over 2,200 records inserted per month.
What I need to do:
Once these records are inserted into the object I need to check the new "ContribForMonth" data against last month's data. If there is a drop of a certain percentage, email a customer service rep so s/he can contact the church and try to help with any issues.
What I'm thinking:
Create a trigger (before insert) that gets last month's data and compare it to the new data coming in. So:
1.) Store last month data in a Map list. 2.) Loop through the new data in Trigger.new and find corresponding data in the map. 3.) Compare the two values. 4.) Email account owner
Does this seem like a good way to do this or is there a simpler way? I'm still learning my way around SF so any advice would be helpful.