Ticket Gateway: Configuration Guide
Ticket Gateway: Configuration Guide
Ticket Gateway: Configuration Guide
Ticket Gateway allows us to write custom HTTP actions, consisting of the endpoints discovered above, and create custom compound actions that the Moveworks platform uses to communicate with your external ticketing system.
The configuration process consists of five key steps:
Set up the connector – Establish a connection between Moveworks and your ticketing system.
Configure HTTP action endpoints – Define the API endpoints required for ticket actions (discovered in the previous section).
Let’s start creating HTTP actions. Follow the steps for specific actions required by Ticket Gateway:
Ensure that you configure all required HTTP actions:
{{variable_name}}. Usually, for creating tickets this is not needed, unless your system provides a different create-ticket API per ticket type.Add the request body with the fields required for ticket creation.
The system provides the following fields by default. If you are using an RTF Form (covered later), you will need to capture all RTF fields in this API call as well.
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/tickets?ticket_id={{ticket_id}}requester_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery. Example: /tickets?requester_id={{requester_id}}.last_updated_time. The variable will depend on your API discovery.
/tickets?requester_id={{requester_id}}&start_date>{{start_date}}&end_date<{{end_date}}last_updated_time. Adjust the value based on your API discovery.
/tickets?start_date>{{start_date}}&end_date<{{end_date}}ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/tickets?ticket_id={{ticket_id}}The request body must contain the state key, with its value set to a variable. The system provides this value based on the user action. For example, if a user closes a ticket, the external state value will be mapped according to the state mapping (defined later).
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/add_notes?ticket_id={{ticket_id}}The request body should contain the mapping to the field where the comment is captured and the field that defines whether the comment is internal or external. The value for this field is provided by the system and added to the comment field. Details depend on your system—ensure you cross-check with your API discovery.
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/add_notes?ticket_id={{ticket_id}}The request body should contain the mapping to the field where the comment is captured and the field that defines whether the comment is internal or external. The comment value is provided by the system when the end user provides a comment to the AI Assistant. Details depend on your system—ensure you cross-check with your API discovery.
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/add_attachments?ticket_id={{ticket_id}}{{file_name}}.
/add_attachments?ticket_id={{ticket_id}}&file_name={{file_name}}When the end user uploads an attachment, the file content is passed as a Base64 string in the request. Define a variable in the request body for this.
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/tickets?ticket_id={{ticket_id}}To resolve a ticket, the status must be updated to “Resolved.” The system passes this value when a user selects “Resolve issue” in the AI Assistant. The request body must contain the state key, with its value set to “RESOLVED” (or the equivalent value in your system).
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/tickets?ticket_id={{ticket_id}}To reopen a ticket, the status must be updated to “New” (or “Active,” depending on your system). The system passes this value when a user selects “Reopen issue” in the AI Assistant.
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/tickets?ticket_id={{ticket_id}}The request body should contain the field key and the respective value to be updated.
The system provides values for fields configured for updates. This is only needed for triage use cases. Define the key based on the update-ticket mapper and assign the variable.
ticket_id in the query parameter section. This is usually required for this type of API. Adjust the value based on your API discovery.
/tickets?ticket_id={{ticket_id}}The request body must contain the assignment group key, with its value set to a variable. The system provides this value based on the triage model prediction.
Set up the Ticket Gateway configuration – Configure the compound actions for each TAS endpoint. Navigate to Moveworks Setup → Ticketing configurations, go to the Ticket Gateway setting, and click Create.
actions and return blocks are supported—no scripts or operators.A compound action is configured within a steps block. You can add one or more action block, each executing a specific HTTP call. The result of one action can be used as input for subsequent actions.
Each action within the steps block contains:
action_name: The unique name of a pre-configured HTTP action to execute.input_args: Defines the JSON payload sent to the HTTP action. You can map system-provided data into this JSON or use static values. This accepts Moveworks Data Mapping Syntaxoutput_key: A variable name to store the JSON response received from the action. This variable can be referenced in later steps or in the final output.After all steps are executed, a final return block is required.
output_mapper: Maps the data stored in your output_key variables into the final JSON structure required by the Moveworks platform. For specific query actions, this output must align with the official Moveworks ticket schema.Using the input context to create input_args
Let’s take an example and understand how we will form a input_args for each action. Our use-case to configure action block of - Query ticket by time range. This end point is used by the Moveworks ticket poller. Every 30 seconds a API call is made to your system in order to fetch the recently created or updated tickets.
In this case - The start_time and end_time is variable and is provided by the Moveworks system. This following block covers the context that is passed by the system.
While creating the HTTP action we added placeholder variables for start_time and end_time we now need to map it so these values can get propagated till the HTTP action level. These variables are wrapped under data.context.{{variable_name}} ensure you use data.context in input_args
Refer to this documentation to learn more about input context available on each HTTP action.
Chaining actions and using output of action in a subsequent action
If your HTTP action requires chaining of actions and parsing data from one action to another - This can be done in the ticket gateway configuration.
Let’s take a example of a scenario where your ticketing system needs chaining of two API calls in order to fetch a ticket the first API fetches the ticket and the second API is fetching the comments on the ticket. While ingesting the ticketing in Moveworks we also need the comments/ work-notes this enables multiple use-cases downstream such as
The output_mapper support Moveworks Data Mapping Syntax - We are using the MERGE() function here to join results from two different HTTP
YAML Configuration Examples
Here are a couple of examples of how steps can be configured in YAML.
Example 1: Create ticket
This example only uses a single action to create a ticket and output of that action is a ticket generated in the external ticketing system.
Example 2: Resolve ticket
Example 3: Add comment (public)
Example 4: Update assignment
Setting up the ticket output mapper
The output_mapper is a required component that formats the final output to match the Moveworks ticket schema. The expected structure depends on whether the action returns a single ticket or a list of tickets. The value inside the output mapper should be aligned to one of the following schema type.
Single Ticket Schema
For actions expected to return a single ticket, the output must be a JSON object with the following structure.
This schema is required for these actions:
Query ticket by idGenerate ticketTicket List Schema
For actions that return multiple tickets, the output must be a JSON array of ticket objects. Each object in the array must conform to the Single Ticket Schema shown above.
This schema is required for these actions:
Query ticket by requesterQuery ticket by time-rangeExample mapping for updated_by and requested_for : we map external_id of user_itsm_id_info to respective field of user in the external_system ( can be email or external_id)
Internally in the ticket action service we resolve the user using this external_id and get other details of the user ( user_proto from iris) like name , email , employee details.
Set up Moveworks ticketing configurations – Finalize platform-level settings for seamless integration.
Complete Ticket Gateway configurations before proceeding with Ticket Action configurations.
This includes setting up ticket destinations, ticket attribute mapping, and payloads for the following actions:
Navigate to:
Moveworks Setup → Ticketing automation → Ticketing → Ticketing settings
Review this documentation to understand ticketing configuration and Moveworks terminology.
Create a new ticketing configuration:
Configure ticketing system details:
Add Ticket Destinations:
A ticket destination groups similar types of tickets. For example:
Define configuration per destination: (Refer to the Moveworks Data Mapping Guide)
IT-xyz, HR-fed).input_args and HTTP request body):
Configure Ticket Routing and Workflows (TGS configurations):
Configure Identity Settings:
Refer to identity documentation.
Map the itsm_user_id (external user ID from your ticketing system). This ensures Moveworks correctly associates tickets with the user who created them.
Example mapping
