attach Child Ticket Web Service
Hello,
I am attempting to create a workflow that has automation that when a major incident (sev 1 for us) is created, a workflow will use web services to create a parent problem ticket.
I see the below article how how to create a child ticket but i want to do the opposite,
https://solutions.teamdynamix.com/TDClient/1965/Portal/KB/ArticleDet?ID=18914
here is my body script and it generates a problem ticket with all the right info but it isnt attaching the child original ticket, can someone help me?
{
"TypeID":3271,
"FormID":6744,
"Title":"{{OrigTicketTitle}}",
"Description":"{{OrigTicketDesc}}",
"Classification":33,
"Prim Resp":"{{OrigTicketPrimResp}}",
"AccountID":6603,
"childrenID":"{{OrigTicketID}}",
"SourceID":291,
"StatusID":2683,
"PriorityID":921,
"RequestorUID":"5a0ebd2c-ce32-ed11-ae83-dc98401d7b89"
}
Answer (1)
Hello Alex,
Creating a ticket doesn't have a property for defining child ticket IDs, but there is an endpoint that allows for adding child ticket IDs to a parent ticket, so maybe you could use the response body of the parent ticket creation in a 2nd web method call to POST https://YourDomainHere/TDWebApi/api/{appId}/tickets/{id}/children and provide the current child ticket's ID in an array in the call's body to add it to the parent ticket, which you'll get its ID from the response body of the previous web method.
Sincerely,
Mark Sayers
Sr Support Consultant, CS
Can you help walk me through that second web method? In the first web method I choose in the workflow store response body and called it "responsebodyticket". In the second web method i have one parameter :ID, STring, From Workflow, ResponseBodyTicket:ID. Is that all I need or what else do I need to do in the body to get this to complete? - Alex Turek Fri 2/17/23 2:03 PM
I have it callingup in parameters the ticket.ID and nothing in the body, is that how that post works for children? Or did I miss a step? - Alex Turek Fri 2/17/23 2:37 PM
POST https://festfoods.teamdynamix.com/TDWebApi/api/293/tickets/{id}/children content-type: application/json {
"childTicketIds":"1023210"
} - Alex Turek Fri 2/17/23 2:46 PM
Also, if that {id} in your URL is meant to be referencing a parameter from your Parameters tab, you need to encase it in double mustache brackets like {{id}} (and it is case sensitive to the name of the parameter you created). - Mark Sayers Fri 2/17/23 2:53 PM