How do I Change Responsible on Second ticket created in a workflow but not the original?

Good Morning Again ( I assume Mark and Brittany will respond, to which I say Hello!),

Day 3 of working with Web service methods and Workflows and I have a new question. I have a workflow web service method that creates a second ticket. I'd like to be able to change the responsible field on the second ticket, based on information from the primary ticket. I see in the parameters I can set the web service method to pull information from the workflow. Is this what I'd need to do? If so how do I determine the workflow value?

Sincerely,

Irene

Tags webservice workflow workflows value method
Asked by Irene Muller on Wed 7/10/24 9:54 AM Last edited Wed 7/10/24 9:57 AM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Wed 7/10/24 10:12 AM

Hello Irene,

You would want to name the response body for the web service method step (on the workflow itself) that creates the secondary ticket. Then, you would refer to the ID of that ticket (to edit it from the workflow of the original ticket, like so: ResponseBodyName.ID

This gives you the parameter value for the ID of the ticket you wish to edit, from there you can make your next web service method a PATCH call to edit that secondary ticket and PATCH its ResponsibleUID to whatever hard-coded value you're needing to set it to.

That PATCH step's body would look like so:

[ {"op":"replace", "path":"/ResponsibleUID", "value":"uidstringhere"} ]

If you're assigning the ticket to a group instead it would look slightly different.

Sincerely,
Mark Sayers
Sr Support Consultant, CS

1 of 1 users found this helpful.
Perfect! Thank you! - Irene Muller Wed 7/10/24 10:46 AM