I have written and deployed a Contact Trigger in our production environment, and whenever I would have to use Data Loader to mass update contact records, I would always have to go into the code and add myself in an if statement (using UserInfo.getName()), stating that only run the code if the current user's full name is not myself) to avoid triggers from firing when I mass update. Then I can proceed to use Data Loader.
Sample:
if((trigger.isUpdate ||trigger.isInsert) && UserInfo.getName() != 'Mark Liu'){
for (Contact c1: trigger.new){
***Rest of Codes here....***
Is there a method similar to UserInfo.getName() that the system can tell when an operation is using API tools like Data Loader? If there is, I could perhaps use that in my if statement to avoid firing this Contact Trigger when an update/insert is being performed from the Data Loader. Any help is much appreciated!