Andy Birley1
Giga Expert

After some further digging through community pages / posts I've managed to fix my script by amending this: -

var managedid2 = body.substring(body.indexOf("Employee's managed service ID:") +31, body.lastIndexOf("Line Managers First Name:"));
logger.info("Managed ID Found: " + managedid2);

To this: -

var managedid2 = email.body.employee_s_managed_service_id.toString();

The inbound action script now works as I need it to and the variable set's correctly on the catalog item (RITM).

View solution in original post