integration = current.getDisplayValue('integration');
summary = 'Issue with integration ' + integration + ': error - ' + (current.error || current.process_error);
incident = new GlideRecord('incident');
incident.addQuery('short_description', '=', summary);
incident.short_description = summary;
incident.assignment_group = ''; // Your integration team here;
// Increase impact and urgency each time the event action is called
incident.impact = (+incident.impact - 1) < 1 ? 1 : +incident.impact - 1;
incident.urgency = (+incident.urgency - 1) < 1 ? 1 : +incident.urgency - 1;
incident.work_notes = 'Integration ' + integration + ' has encountered an' +
' error ' + current.error + ' and has triggered the event action ' +
action.getDisplayValue();