Using Web Services to Change the Responsibility of a Ticket

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 responsibility of a ticket. This could be used to do something like reassigning the ticket as needed after a certain step of the 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 responsibility of a ticket:

  1. Define a web service provider and create authentication credentials.
  2. Get the ticket application ID.
  3. Get the new responsible person UID.
  4. Create the web service method.
  5. 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:

  1. In TDAdmin, click Applications in the left navigation.
  2. Click the Name of the Ticketing application.  
  3. In the Application Details window, copy down the ID number located below the application name.

Getting the Responsible Person UID

To get the UID string for the desired responsible person:

  1. In TDAdmin, click Users & Roles in the left navigation, then click Users.
  2. Search for the the user you'd like to use, then click on their name to open their record.
  3. The address bar of the browser window with the user's record will look similar to this:
    https://example.teamdynamix.com/TDAdmin/Users/Edit.aspx?U=88faa06b-e9ce-eb11-a7ad-dc98408d7262
  4. The 36-character string of the URL after ?U= is the user's UID. Copy this down to use later.

Creating the Web Service Method

To build a web service method that will close your ticket:

  1. In TDAdmin, click Applications in the left navigation.
  2. Click the Name of the Ticketing application you want to add this workflow step to.
  3. Click Workflow Web Services in the left navigation, then click Web Service Methods.
  4. Click the +New button.
  5. On the New Web Service page, enter a Name for the method. This name will show up in the workflow builder.
  6. In the Web Service Provider field, enter the web service provider you've already defined.
  7. Method (to the left of the URL box in green. The default is GET) – Select PATCH
  8. 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}}
  9. Headers – Define one of the following headers:
    1. Key – Content-type
    2. Value – application/json 
    3. Click the Add button to add the parameter
  10. Parameters – Define one of the following parameters. Click the Parameters tab and enter the following details:
    1. Name – id
    2. Type – string
    3. Data source – From Ticket
    4. Source property – ID
    5. Click the Add button to add the parameter
  11. Click the Body tab and type or paste the following:
    [ {"op": "replace", "path": "/ResponsibleUID", "value": "#####"}, ]
    Replace ##### in quotations with the 36-character UID for the new responsible person that you copied down earlier.
  12. Click on the Authentication tab and select your TeamDynamix web service account.
  13. 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:

  1. Click the Test Request button.
  2. In the ID column, enter the ticket number you’d like to use for testing.
  3. Click the Send button.
  4. 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.

 

Print Article

Details

Article ID: 143937
Created
Tue 6/7/22 12:32 PM
Modified
Mon 6/10/24 10:57 AM