Using Web Services to Move Tickets

This how-to article will help Administrators to configure a Workflow Web Service to move a ticket to another ticketing application 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 move a ticket to another ticketing application. This could be used to do something like a ticket needs to be moved to another application in a triage scenario.

Learn more about setting up and using web service steps

There are several key web service items needed to set up a workflow step for moving tickets.

  1. Define a web service provider and create authentication credentials.
  2. Get the destination ticket application ID.
  3. Get the new ticket status ID.
  4. Get the new type ID
  5. Get the new Form ID
  6. Provide comments where applicable (See Body example below)
  7. Create the web service method.
  8. 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 for the application where the ticket will be moved to:

  1. In TDAdmin, click Applications in the left navigation.
  2. Click the Name of the Ticketing application you are moving the ticket to.  
  3. 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:

  1. In TDAdmin, click Applications in the left navigation.
  2. Click the Name of the Ticketing application you are moving the ticket to.
  3. Click Statuses,
  4. then select the Status ID that you’d like to use.

Getting the Ticket Type ID

To get the ticket type ID number for the desired status:

  1. In TDAdmin, click Applications in the left navigation.
  2. Click the Name of the Ticketing application you are moving the ticket to.
  3. Click Types,
  4. then select the Status ID that you’d like to use.

Getting the Ticket Form ID

To get the ticket status ID number for the desired status:

  1. In TDAdmin, click Applications in the left navigation.
  2. Click the Name of the Ticketing application you are moving the ticket to.
  3. Click Forms,
  4. then select the Status ID that you’d like to use.

Creating the Web Service Method

To build a web service method that will move a ticket to another ticketing application in TeamDynamix:

  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 POST
  8. URL https://tdxenvironmentname.com/TDWebApi/api/{{appId}}/tickets/{{id}}/application. Note that you need to replace tdxenvironmentname.com and appId with the URL of your TeamDynamix environment and the ticket application ID that you took note of. Do not edit {{id}}.
    The final URL string will look something like: https://example.teamdynamix.com/TDWebApi/api/123/tickets/{{id}}/application or https://services.example.com/TDWebApi/api/123/tickets/{{id}}/application
  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 – Configure the following parameters. Click the Parameters tab and enter the following details:
    1. {{id}} parameter
      1. Name – id
      2. Type – string
      3. Data source – From Ticket
      4. Source property – ID
      5. Click the Add button to add the parameter
    2. {{appId}} parameter
      1. Name – appId
      2. Type – string
      3. Data source – From Ticket
      4. Source property – Application ID
      5. Click the Add button to add the parameter
  11. Click the Body tab and type or paste the following:
    • {
      "NewAppID": 999,
      "NewFormID": 99999,
      "NewTicketTypeID": 99999,
      "NewStatusID": 99999,
      "Comments": "Moving Ticket # {{id}} from IT Tickets Application. Please work this accordingly."
      }

      Replace the numeric values above in quotations with the ID #'s in your TeamDynamix environment along with updating the Comments line.

  12. Click on the Authentication tab and select your TeamDynamix web service account.
  13. Click the Save button.

Testing the Method

You will need an existing 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.

Gotchas & Pitfalls

1. The Responsibility of the ticket (if assigned to an individual) will persist when moved to the destination ticketing application regardless of that person actually having access to the destination ticketing app. If assigned to a group, and if the responsible group is not associated with the destination ticketing application, the Responsible value will instead be cleared.

Details

Article ID: 134199
Created
Fri 7/16/21 11:42 AM
Modified
Tue 11/8/22 11:37 AM