Hi,

So you created after update BR as per above screenshots;

please update code as below; I forgot to query Import Set table with the current Import Set and then passed the GlideRecord Object to that eventQueue()

Updated Now: Ensure you set valid recipient for the event;

(function executeRule(current, previous /*null when async*/) {

	// Add your code here

var importSet = new GlideRecord('sys_import_set');
importSet.addQuery('sys_id', current.set);
importSet.query();
if(importSet.next()){

	if(current.state == 'complete' && current.total > 0){
		gs.eventQueue("sn_customerservice.branch.alldata", importSet, recipient, importSet.number);
	}
	else if(current.state == 'complete_with_errors' || current.total == 0){
		gs.eventQueue("sn_customerservice.branch.info.failure", importSet, recipient, importSet.number);
	}

}

})(current, previous);

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post