API and Ticket Templates

I have a use case where what I would like to do is have one Service on the catalog create multiple tickets. The idea is that we get a new contract, and one of our Implementation folks goes to the catalog, fills in a few details, and the myriad tickets that we use for a new contract are all created and pre-filled.

What I want to do: Have that Service create a single ticket with a Workflow that creates the tickets. I would like to use Ticket Templates but I can't find anywhere to be able to call the API to create tickets using templates. I know I can "brute force" by using the API to create the tickets directly, but using templates would be more scalable and maintainable, especially since the templates could be maintained/updated by Implementation instead of me.

 

So, is there a way to do what I'm trying to do? Thanks!

Asked by Patrick LaFollette on Thu 3/2/23 3:06 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Thu 3/2/23 3:25 PM

Hello Patrick,

You could just have the ticket creation Web service method calls reference applicable forms and configure the forms to hold the proper values needed.

We're making a change soon that will allow referencing the form ID (and not including all of the specific fields from that form) in an API call will create a ticket and default any values from the form into the ticket upon creation. This isn't implemented yet, but soon it will be and I think the form would act as your "ticket template" to create the right ticket and populate the right field values for you.

2 of 2 users found this helpful.
Yep, that makes perfect sense, and so obvious I'm kicking myself a little for not thinking of it. :)

Thanks!
- Patrick LaFollette Thu 3/2/23 4:48 PM
To clarify, the behavior as of *today* wouldn't apply the form's defaults to the created ticket if made this way, but a change we'll be implementing relatively soon *will* make it so that described behavior is the new designed behavior when a ticket is created and a form is specified (assuming specific fields are not also specified in the ticket create API call that would have values that override those on the form). - Mark Sayers Thu 3/2/23 4:50 PM
Oh OK, so right now it'd be just an empty version of the form. Well even that would still be helpful, and I can set fields manually via API call until the change rolls out. Is that something that will be in the next release, and do you have anything you can tell me about when that would be? - Patrick LaFollette Thu 3/2/23 4:53 PM
I don't have a concrete date for that yet, unfortunately, I just know that it will come soon, likely before v11.7 releases. - Mark Sayers Thu 3/2/23 4:55 PM
Did this get implemented in the v11.7? I have the exact same use case where we have a ticket template that creates multiple tasks within it that I would love to use the API to generate. Currently we are "brute forcing" by creating the ticket via API and adding tasks to the ticket via API, aka we are not using the Template in the API callout which is a nightmare to maintain as any changes must be done in duplicate (once in Template and again in the code that calls the API). - Rob Lamb Fri 9/8/23 12:25 PM
Yes it did, as far as creating the ticket itself and having your default form fields be populated if you didn't supply differing values in the API call that creates the ticket for those same fields.

I think that ought to mean as long as your form has the Task Template field included in it in the TDAdmin design view, and the task template itself has been built out as needed, it should apply it.

Have you tested this yet?
- Mark Sayers Fri 9/8/23 12:33 PM
Tested and now in production. This works really well as long as the defaults are set in the form. Lets our developers focus on the callouts/data-flow and lets our TD Admins focus on the tasks/workflows. Exactly what I was looking for when I found this post, thanks! - Rob Lamb Mon 10/30/23 7:23 PM