Update Department on Ticket (with applied Blueprint)
Hello,
Is it possible to update the Department of a ticket which is dictated by a blueprint, e.g. I would like to change departments at different states in the Blueprint. I do not see this is an option in workflow rules or blueprint transition actions, and, I receive the following error when trying to achieve it programmatically using custom function:
Processing ticket ID: 629084000024744017 with status: NFEI
ValidationUpdating department to ID: 629084000013153369API Response:
{"errorCode":"FORBIDDEN","message":"You are not authorized to access
this resource."}Failed to update department. Response:
{"errorCode":"FORBIDDEN","message":"You are not authorized to access
this resource."}
excerpt from function (the api call which is causing not authorized/forbidden error):
...
// Log the determined department for debugging
info "Updating department to ID: " + newDepartmentId;
// Prepare the data payload for API request
updateData = Map();
updateData.put("departmentId",newDepartmentId);
// Make the API call to update the department
response = invokeurl
[
type :PATCH
parameters:updateData.toString()
connection:"desk_all_activities"
];
...