Hi Everyone
I have created a script which opens a files, formats the file for CSV Import and then triggers a Saved CSV Import.
var csvImportTask = task.create({taskType: task.TaskType.CSV_IMPORT}); // Create and trigger CSV Import csvImportTask.mappingId = CSVImportId; csvImportTask.importFile = csvString; var csvImportTaskId = csvImportTask.submit(); I then capture the csvImportTaskId within a config file which I source about 30 minutes later to check whether the status is complete or not. The problem that I'm running into is error handling...Pros[LIST][*]If there is something wrong with the file format or a field value doesn't match a certain criteria, the csvImportTask.submit() will pick this up and the import will fail and none of the records will be updated.[/LIST]Cons[LIST][*]If the file is triggered for import successfully, there seems to be no option/parameter available to assign an email address to let me know once the import is complete (like if you were to do the import manually and get that confirmation email once complete)[*]Regardless of how many records were successful / failed, the status is always COMPLETE. 30/30 successfully imported? COMPLETE 15/30 successfully imported? COMPLETE 0/30 successfully imported? COMPLETE There is no way through task.checkStatus where I can check how many were successful vs failed[*]There is also no way of checking the results file. Strangely enough in SS 1.0 the equivalent csvImportTask.submit() would return the result.csv file ID (which couldn't be accessed anyway) and then in SS 2.0, it has been taken away completely.[/LIST] What I'm wondering from the community is if anyone has been successful in being able to workaround any of the cons above to support any kind of individual record error handling when a CSV Import is triggered. In the short term I've been forced to create a map/reduce script instead but ideally I'd like to keep my existing CSV Import design.Any suggestions are appreciated!ThanksPatrick