Body
This how-to article will help Administrators to configure a Workflow Web Service in the TDAdmin interface. The user must have the Administrator access in TDAdmin.
Overview
Web service steps open up extensive possibilities for ticket creation, modification, and editing as part of a ticketing workflow. This article serves as an example of adding a ticket workflow step that will change the status of a ticket. This could be used to do something like a status change is needed after a certain step of a workflow is completed.
Learn more about setting up and using web service steps.
There are four main web service items needed to set up a workflow step that will change the status of a ticket:
- Define a web service provider and create authentication credentials.
- Get the ticket application ID.
- Get the ticket status ID.
- Create the web service method.
- Test the method.
Creating a Web Service Provider and Auth Account
Follow the instructions in the Web Service Step article, to learn how to define a web service provider and create authentication credentials.
Getting the Ticketing Application ID
To find the ticket application ID:
- In TDAdmin, click Applications in the left navigation.
- Click the Name of the Ticketing application.
- In the Application Details window, copy down the ID number located below the application name.
Getting the Ticket Status ID
To get the ticket status ID number for the desired status:
- In TDAdmin, click Applications in the left navigation.
- Click the Name of the Ticketing application.
- Click Statuses,
- then select the Status ID that you’d like to use.
Creating the Web Service Method
To build a web service method that will close your ticket:
- In TDAdmin, click Applications in the left navigation.
- Click the Name of the Ticketing application you want to add this workflow step to.
- Click Workflow Web Services in the left navigation, then click Web Service Methods.
- Click the +New button.
- On the New Web Service page, enter a Name for the method. This name will show up in the workflow builder.
- In the Web Service Provider field, enter the web service provider you've already defined.
- Method (to the left of the URL box in green. The default is GET) – Select PATCH
- URL –
https://[Your TeamDynamix URL]/TDWebApi/api/[Ticket App ID]/tickets/{{id}}
Note that you need to replace [Your TeamDynamix URL] and [Ticket App ID] with the URL of your TeamDynamix environment and the ticket application ID that you took note of. Do not edit {{id}}.
The final string will look something like https://example.teamdynamix.com/TDWebApi/api/123/tickets/{{id}}
or https://services.example.com/TDWebApi/api/123/tickets/{{id}}
- Headers – Define one of the following headers:
- Key – Content-type
- Value – application/json
- Click the Add button to add the parameter
- Parameters – Define one of the following parameters. Click the Parameters tab and enter the following details:
- Name – id
- Type – string
- Data source – From Ticket
- Source property – ID
- Click the Add button to add the parameter
- Click the Body tab and type or paste the following:
[ {"op": "replace", "path": "/StatusID", "value": "#####"}, ]
Replace #####
in quotations with the status ID for the status you’d like.
- Click on the Authentication tab and select your TeamDynamix web service account.
- Click the Save button.
Testing the Method
You will need a ticket ID number to use for testing.
To test the new method, inside the web service:
- Click the Test Request button.
- In the ID column, enter the ticket number you’d like to use for testing.
- Click the Send button.
- Verify the output.
This web service method can now be included in a ticket workflow. Learn more about adding a web service step to a workflow.