Using Web Services to Add a Ticket Feed Entry

Body

This how-to article will help administrators to add a feed entry using the Workflow Web Services.  The user must have the Administrator access to the ticketing application.

Overview

Web service steps open up extensive possibilities for things that can occur as part of a ticketing workflow. This article serves as an example of adding a ticket workflow step that will add a feed entry to a ticket and notify the requestor. A feed entry could be beneficial on a workflow step if you needed to communicate with internal and/or external resources about details on a ticket.

 

Learn more about setting up and using web service steps.

 

There are a few main steps needed to set up a workflow step that will add a feed entry to a ticket:

 

  1. Define a web service provider and create authentication credentials.
  2. Get the Ticketing Application ID.
  3. Create the web service method.
  4. Testing 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.

Creating the Web Service Method

You now need to create a web service method modeled after the example below.

 

To create the web service method:

  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) – Select POST
  8. URL – https://[Your TeamDynamix URL]/TDWebApi/api/[FIXME Ticket App ID]/tickets/{{id}}/feed.
    Note that you need to replace [FIXME Ticket App ID] with the ticket application ID that you took note of. The end string will look something like https://[Your TeamDynamix URL]/TDWebApi/api/123/tickets/{{id}}/feed
  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 two of the following parameters:
    1. id:
      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. RequestorEmail:
      1. Name –  email
      2. Type –  string
      3. Data source – From Ticket
      4. Source property – Requestor Email
      5. Click the Add button to add the parameter
  11. Click the Body tab and type or paste the following:

{"Comments":"This is a test comment.","IsPrivate":true,"Notify":["{{RequestorEmail}}"]}

  1. Note: for multiple email addresses, comma separate them.
  1. Click on the Authentication tab and select your TeamDynamix web service account.
  2. Click the Save button.

Testing the Method

You will need a ticket ID number to use for testing.

 

To test the new method:

 

  1. On the new POST web service, click the Test Request button.
  2. In the ID column, enter the ticket number you’d like to use for testing.
  3. In the Email column, enter any email address.
  4. Click the Send button.
  5. 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.

Details

Details

Article ID: 18979
Created
Wed 11/23/16 12:07 PM
Modified
Thu 11/7/24 9:33 PM