Body
Who can use this feature?
- Available in TDAdmin and the Ticketing application admin UI
- License Requirement: Enterprise
- Application Access: User must have access to Work Management and the specific Ticketing application, or TDAdmin
- Administrative Access:
- Ticketing Application Admins can configure ticket workflows from the Ticketing Application Admin interface
- Global Administrators can configure ticket workflows in TDAdmin
In this article, we’ll cover:
Overview
A Web Service step lets a workflow reach out to another system over the web—or even back into TeamDynamix itself—and pass ticket data without requiring manual action.
For each Web Service step, select an associated Web Service Provider and Method. Workflow web service methods are ways of calling other applications (or even calling the TeamDynamix API). For example, a web service method might call your listserv application to create a new listserv with parameters from a ticket. For each web service step, the system can notify different groups of people depending on whether the web service call has succeeded or failed.
Web service steps have two distinct branches: success and failure. When a web service call completes and the remote server indicates success (with an HTTP response code in the 200 range), the system takes the success branch; in all other cases, it takes the failure branch. When a call executes successfully, or fails with a recognized JSON, plain text, or XML response, the server's response can be stored in the workflow for use with the From the Workflow web service method parameter — for example, the JSON returned by the external server can be stored in the workflow using the Ticket field, and another web service method can then use the From the Workflow source parameter to reference that Ticket field, or a property of it such as Ticket.ID. The server's response code can similarly be stored in any field.
Learn more about the TeamDynamix API/Web Services. For a complete guide to creating, configuring, and activating ticket workflows, see Configuring Ticket Workflows.
Where to Find This
Web services and Web Service workflow steps are configured in the Ticketing application admin interface.
To define a Provider, Auth Credentials, or Method, navigate to Workflow Web Services following these paths:
- Ticketing Application Admins: Work Management > View Applications > [name of the Ticketing application] > gear icon > Admin > Workflow Web Services
- Global Admins: TDAdmin > Applications > [name of the Ticketing application] > Workflow Web Services
To add a Web Service step to a workflow, navigate to the Workflow Builder following these paths:
- Ticketing Application Admins: Work Management > View Applications > [name of the Ticketing application] > gear icon > Admin > Workflows > [Workflow name] > View Builder
- Global Admins: TDAdmin > Applications > [name of the Ticketing application] > Workflows > [Workflow name] > View Builder
Creating a Web Service Workflow Step
Setting up a Web Service step involves more than configuring the step itself — you'll also need to define what it connects to and, if applicable, how it authenticates. There are several actions required to create a web service workflow step:
- Set up the account, authentication, provider, and method the step will use. See Setup below.
- Create a Web Service step in a workflow that calls the method. See Configuring a Web Service Step below.
The sections below walk through each of these in order.
Setup
Before you can add a Web Service step to a workflow, you need four things in place, in order:
- Service Account or User account — the account used to authenticate web service calls. See Creating a Service Account.
- Web Service Auth Account — the credentials that let a Web Service Provider use your account. See Creating a Web Service Auth Account.
- Web Service Provider — the base URL for the system you're calling. See Creating a Web Service Provider.
- Web Service Method — the specific HTTP call to make against the Provider. See Creating a Web Service Method.
Configuring a Web Service Step
With the Provider, authentication, and Method all set up, you can create a Web Service step in a workflow that calls the method.
The steps below cover configuring a Web Service step specifically. For guidance on connecting steps, validating a workflow, and activating it, see Configuring Ticket Workflows.
To create and configure a Web Service step:
- Navigate to TDAdmin > Applications > [Ticketing application]
- Click Workflows in the left navigation.
- On the Ticket Workflows list, click the name of the desired workflow.
- Click the View Builder button.
- In the Workflow Builder, click File > Check Out to begin editing the workflow.
- Click the New Step button in the toolbar.
- In the New Workflow Step window, enter a Name that indicates what the step will do.
- Select the Web Service option from the Type dropdown.
- Enter a Description for the step.
- Select the Web Service Provider / Method from the dropdown.
- Under Notify on Success, select Responsible Resource, Reviewer, Requestor, and/or Creator to notify those roles if the web service call succeeds.
- Under Notify on Failure, select Responsible Resource, Reviewer, Requestor, and/or Creator to notify those roles if the web service call fails.
- Optionally, enter additional recipients in the Other People field under either Notify on Success or Notify on Failure.
- Optionally, enter names in Response Code and/or Response Body to store the web service call's HTTP response code and/or response body in the workflow's context. Once stored, these values can be referenced by another web service method's parameter when From the Workflow is selected as that parameter's source.
- Click Save.
Executing Web Service Steps
Web service steps are queued to run as soon as the step starts, and will run as soon as possible after they begin. When an external web service call is made, the result of the attempt is logged and can be viewed through the Workflow Web Service Logs administrative option for a ticketing application.
To view Workflow Web Service Logs:
- Navigate to TDAdmin > Applications > [Ticketing application]
- Select Workflow Web Services in the left navigation, then Workflow Web Service Logs.
A basic summary of the attempt is also posted to the corresponding ticket's Feed by the system user.
To view a Workflow Web Service Logs Feed entry on a ticket:
- In Work Management, click View Applications, then select the desired Ticketing Application.
- Select the ticket with the Web Service Step.
- View the ticket's Feed.
Individuals with the "The user will be able to always approve/reject/skip ticket workflow steps" permission in the associated Ticketing application can use a Skip action to bypass the web service call and take the Failure branch. This permission is found in the Ticketing Application's Security Roles.
Examples
Using a Web Service in a Ticket’s Workflow to Update the Value of a Dropdown Attribute
For a higher-level overview of PATCH verbs, see the HTTP PATCH Support in the TDX API documentation.
For a broader view of JSON PATCH operations, like op and add, see JSON Patch.
To update a dropdown attribute's value, add something like the following to the Body field. Parameters aren't needed here, since you're only changing an attribute value.
The example below isn't valid JSON — it uses JSON-like formatting to show what each part of a real PATCH body represents, in plain language:
[
{"So we are declaring we are about to execute on a JSON op": "and specifically a replace operation", "just stating that there will be a path to find the content": "/we want to look at the attributes folder/insert the TDX generated attribute ID1234", "this is just defining that we will supply a value to make the replace op work properly in the PATCH": "this is the TDX generated ID number of the attribute choice that we want to set"},
]
This is a working example of what the Body might actually contain:
[
{"op": "replace", "path": "/attributes/1234", "value": "5678"},
]
More Examples
Here are a few suggestions on what web services can be used for: