Skip to main content
Question

Updating Parent Ticket based on Child Ticket Status


Forum|alt.badge.img+10

I need to update a parent ticket status once the child ticket is set to resolved.  I cannot figure out how to do that in the workflow.   Any ideas?

Did this topic help you find an answer to your question?

12 replies

Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14
shannon.mejia wrote:

I need to update a parent ticket status once the child ticket is set to resolved.  I cannot figure out how to do that in the workflow.   Any ideas?

There are a app that sync child to parent. 
If you like to build it your self you need to do it using API. 

You need to 2 web request nodes, one to get the parent ticket and the second to update the parent ticket. 

/api/v2/tickets/[id]?include=related_tickets

With that you get the parent ticket ID, then https://api.freshservice.com/v2/#update_ticket_priority to update the ticket. 


Forum|alt.badge.img+10
  • Author
  • Skilled Expert
  • 86 replies
  • March 7, 2024

@Daniel Söderlund, thank you for the reply.  In my workflow, I have the child ticket created and mark the parent as pending.  Would I be able to continue in the same workflow and adda  conditional of when child ticket is closed, to change status for parent at open?  I know a WF cannot kick off from another workflow change, so not sure how to kick off this aspect of changing status on the parent when the child is closed.  I understand using the API, but cannot see how to kick it off.


Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14
shannon.mejia wrote:

@Daniel Söderlund, thank you for the reply.  In my workflow, I have the child ticket created and mark the parent as pending.  Would I be able to continue in the same workflow and adda  conditional of when child ticket is closed, to change status for parent at open?  I know a WF cannot kick off from another workflow change, so not sure how to kick off this aspect of changing status on the parent when the child is closed.  I understand using the API, but cannot see how to kick it off.

You need a separate workflow for the child ticket.  To skip one web requests in that you could add the parent ticket number in a custom field. 


Forum|alt.badge.img+10
  • Author
  • Skilled Expert
  • 86 replies
  • March 12, 2024
Daniel Söderlund wrote:
shannon.mejia wrote:

@Daniel Söderlund, thank you for the reply.  In my workflow, I have the child ticket created and mark the parent as pending.  Would I be able to continue in the same workflow and adda  conditional of when child ticket is closed, to change status for parent at open?  I know a WF cannot kick off from another workflow change, so not sure how to kick off this aspect of changing status on the parent when the child is closed.  I understand using the API, but cannot see how to kick it off.

You need a separate workflow for the child ticket.  To skip one web requests in that you could add the parent ticket number in a custom field. 

@Daniel Söderlund i cannot get the API to get the parent ticket.  I created a custom field to try to put the parent ticket in, but still doesn’t put the parent ticket in.  Seems the field for parent ticket is mysterious and does not work.  Any ideas?  

 

I did open a ticket with Support to get their help as well.​​​​​​


Forum|alt.badge.img+4
  • Contributor
  • 8 replies
  • March 23, 2024

Hello, 
I am trying to do similar things;

I want if the parent status is change to update child ticket with the same status,
I can see in automation an event “if status is changed from “ i put Any to Anye;
i added an action on child tickets but i am not able to get the parent status to make the update.
Any help is appreciated
 

 


Forum|alt.badge.img+10
  • Author
  • Skilled Expert
  • 86 replies
  • March 25, 2024

@MeriemNAIM Working with FS support, I was able to get it working.  I had to create another WF that had the event based on status is changed from any to resolved.  Then the conditional that would only include the child ticket (I created a custom field that the other WF checked a box and this was the conditional).  Then a web request to get the parent number, the a Parse action, then a web request to update the parent.  it works great.

 

I would be happy to jump on a call with you to talk through it if that is helpful.  


Rae
Community Debut
  • Community Debut
  • 1 reply
  • December 27, 2024

@shannon.mejia Would you be available to join a screenshare with me to walk me through your setup. We have a similar workflow - resolved child → resolved parent status. I’m trying to automate and it seems you got this workflow setup and working? Any help would be much appreciated!!


Forum|alt.badge.img+10
  • Author
  • Skilled Expert
  • 86 replies
  • December 30, 2024

@Rae for sure, I would be happy to chat with you on this.  Send me a DM and we can set something up.


Shannon


mbutler
Skilled Expert
Forum|alt.badge.img+9
  • Skilled Expert
  • 128 replies
  • December 30, 2024

One thing to hit on - I know that you ended up going the API route, but ​@Daniel Söderlund also mentioned the app “Parent-Child Synchronization” in his initial post. I use this app and it has really been very nice to keep that relationship between the child and parent tickets synchronized along with all of the posts that occur.

One option is closing the parent ticket automatically when all of the child tickets are closed. While I have it disabled, it is an option that I tested and it works as advertised.

Parent-Child Synchronization Options

If you want to check out the app, you can find it here: https://YourFreshServiceURL/a/admin/marketplace/gallery?route=app&id=12097

** Make sure to replace YourFreshServiceURL **


Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14

I found a way you don’t need the first webrequest to get the parent ticket ID. 

 

Don’t know if this is a but but you can use {{ticket.predecessor_ticket.id_numeric}} to get the parent ticket ID.

You can get most fields from the parent ticket by adding “ticket.predecessor_” to the placeholder. 

Like this 

Current ticket 

{{ticket.agent.name}}

Parent ticket 

{{ticket.predecessor_ticket.agent.name}}

 

But you still need to use API/webrequest to update the parent ticket. 

 


Bottleneck1212
Contributor
Forum|alt.badge.img+2

Great approach! Updating the parent ticket based on the child ticket status can really streamline workflow and ensure better tracking. Are you automating this process, or do you have a manual system in place? How do you handle cases where child tickets are delayed or dependencies cause issues with the parent ticket?"

Let me know if you'd like any tweaks! 😊


Forum|alt.badge.img+6
  • Skilled Expert
  • 44 replies
  • February 5, 2025

So after digging into this as deep as possible i probably found the full set up.
Basicly its this and i still need to test it in our sandbox

To update a parent ticket status when a child ticket is set to resolved in Freshservice, you can use the Workflow Automator feature along with the Freshservice API. Here's how you can achieve this:

  1. Create a new workflow in the Workflow Automator that triggers when a ticket is updated
  2. Add a condition to check if the ticket is a child ticket and its status is changed to resolved
  3. Use the Freshservice API to update the parent ticket status. You'll need to add two web request actions in the workflow :a. First, get the parent ticket ID using the child ticket's information.
    b. Second, update the parent ticket's status.

Here's a more detailed breakdown of the process:

Setting up the Workflow

  1. Go to Admin → Workflow Automator → New Automator → Ticket
  2. Add an event node for when a ticket is updated
  3. Add a condition node to check if the ticket is a child ticket and its status is set to resolved

API Calls

For the API calls, you'll need to use the following endpoints:

  1. To get the parent ticket ID:
     

     

    text

    GET /api/v2/tickets/{child_ticket_id}?include=related_tickets

  2. To update the parent ticket status:
     

     

    text

    PUT /api/v2/tickets/{parent_ticket_id}

Optimization Tip

You can optimize this process by using a placeholder to directly access the parent ticket ID without making an additional API call

 

 

 

text

{{ticket.predecessor_ticket.id_numeric}}

This placeholder allows you to get the parent ticket ID directly, eliminating the need for the first web request1.Remember to authenticate your API requests using your Freshservice API key as the username and any single letter (like 'X') as the password


Reply