+ Start a Discussion
shankar anandshankar anand 

Email automation on bulk data insert


I have a simple requirement. I'm loading data into some of my objects in salesforce from an external system. I want to send an email when the bulk insert gets completed on the last of these objects. The email should contain the following information:

1. A guarantee that the insert is complete and no more records are remaining to be inserted.
2. The count of records that were inserted type wise. e.g count of Type A records inserted, count of Type B records inserted, etc

The information available with me is following:

1. The start time of the insert job at external system.e.g Type A records are inserted at one particular day and time, Type B records are inserted at another time on same day.
2. Full access to the salesforce object on which data is being inserted.

What is the most elegant and scalable solution for this requirement? Please help me figure this out.