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:
- Define a web service provider and create authentication credentials.
- Get the Ticketing Application ID.
- Create the web service method.
- 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:
- 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.
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:
- 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) – Select POST
- 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
- Headers – Define one of the following headers:
- Key – Content-type
- Value – application/json
- Click the Add button to add the parameter
- Parameters – Define two of the following parameters:
- id:
- Name – id
- Type – string
- Data source – From Ticket
- Source property – ID
- Click the Add button to add the parameter
- RequestorEmail:
- Name – email
- Type – string
- Data source – From Ticket
- Source property – Requestor Email
- Click the Add button to add the parameter
- Click the Body tab and type or paste the following:
{"Comments":"This is a test comment.","IsPrivate":true,"Notify":["{{RequestorEmail}}"]}
- Note: for multiple email addresses, comma separate them.
- 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:
- On the new POST web service, click the Test Request button.
- In the ID column, enter the ticket number you’d like to use for testing.
- In the Email column, enter any email address.
- 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.