Input context for ticket gateway actions

The following doc contains input context available for each ticket gateway actions. Refer to the configuration guide to learn how to use it.

  • Requestor info is a class in Moveworks which stores the end users details. This allows you fetch ITSM related information for that user.

    Example :

    {
       "requestor_info": {
          "requestor": {
             "full_name": "Molly Agent",
             "user_id_info": {
                "user_itsm_id_info": [
                   {
                      "system": "MANAGE_ENGINE",
                      "external_id": "158691000000201918",
                      "integration_id": "manage_engine"
                   }
                ]
             }
          },
          "org": {
             "name": "{{org_name}}"
          }
       }
    }

1. Query ticket by id ticket action

Input

  • ticket_id (string)

Output

  • Ticket JSON under the key raw_ticket

2. Query ticket by requestor action

Input

  • requestor (User)

  • updated_start_ts (string)

    Example: 2026-01-05T10:30:45.123456Z

  • updated_end_ts (string)

    Example: 2026-01-05T10:30:45.123456Z

  • destination (dict)

    Example: { "table_name": "test-table-name" }

Output

  • List of tickets under the key raw_tickets

3. Query tickets by time range action

Input

  • updated_start_ts (string)

    Example: 2026-01-05T10:30:45.123456Z

  • updated_end_ts (string)

    Example: 2026-01-05T10:30:45.123456Z

  • destination (dict)

    Example: { "table_name": "test-table-name" }

Output

  • List of tickets under the key raw_tickets

4 .Query tickets by time range paginated action

Input

  • updated_start_ts (string)

    Example: 2026-01-05T10:30:45.123456Z

  • updated_end_ts (string)

    Example: 2026-01-05T10:30:45.123456Z

  • destination (dict)

    Example: { "table_name": "test-table-name" }

  • pagination_info (dict)

Output

  • List of tickets under the key raw_tickets

5. Create ticket action

Input

  • destination (dict)

    Example: { "table_name": "test-table-name" }

  • payload (dict)

    Example:

    {
      "description": "Need help with monitor"
    }

Output

  • Ticket JSON under key raw_ticket

6. Update Fields ticket action

Input

  • ticket (dict)

  • destination (dict)

    Example: { "table_name": "test-table-name" }

  • payload (dict)

Output

  • Ticket JSON under key raw_ticket

7. Update State ticket action

Input

  • ticket (dict)
  • payload as below:
{
 "payload": {
 "target_state" : "external_system_target_state"
 } 
}
{
 "payload": {
   "target_state": "external_system_target_state"
 }
}

Output

  • Ticket JSON under key raw_ticket

8. Update Assignment ticket action

Input

  • ticket (dict)

  • destination (dict)

    Example: { "table_name": "test-table-name" }

  • payload as below:

{
  "payload": {
    "assignee_id": "test-assignee-id",
    "assignment_group": "test-assignment-group"
  }
}

Output

  • Ticket JSON under key raw_ticket

9. Resolve Ticket action

Input

  • ticket (dict)
  • payload as below:
{
  "payload": {
    "status": "<external_resolve_status>"
  }
}

Output

  • Ticket JSON under key raw_ticket

10. Reopen Ticket action

Input

  • ticket (dict)
  • payload as below:
{
  "payload": {
    "target_state": "<external_reopen_state>"
  }
}

Output

  • Ticket JSON under key raw_ticket

11. Post Note Ticket action

Both add comment and add worknote will use post note ticket action. comment or work_note will be populated in the context based on the action and will be identified with the flag is_comment which will be True for comment and false for work_note.

Input

  • ticket (dict)
  • user ( User ) will only be present if there is user impersonation.
  • payload as below:
{
  "payload": {
    {
		    "comment": "testcomment", 
		    "is_comment": True,
		    "work_note": "test work_note"
		}
  }
}

Output

  • Ticket JSON under key raw_ticket

12. Post Attachments Ticket Action

Input context :

  • ticket_id
  • file / attachment
{
	"file": {
		"file_name" : "file_name",
		"location": "location"
	}
}

Input args :

{
  "processfilename": {
    "file_name": "data.file.file_name",
    "location": "data.file.location"
  },
  "ticket_id": "data.ticket_id"
}

File mapper in HTTP action :

image.png

13. Post Process Ticket Action :

Post process ticket action is used to add/update fields in ticket proto.

In context of ticket gateway, you’re provided with ticket proto and using the http_actions one can update the ticket and send back to internal service.

Example: define http_action to fetch comments for a ticket and map it to activity_log of ticket proto.

Input : Ticket ( dict )

Output : Ticket under the key raw_ticket

Tip: If your ITSM system doesn’t require any update on ticket. You’re still required to define this action as this is necessary for other query ticket actions. Just add fetch ticket http action and send back the ticket in input context

Ticket proto fields

message Ticket {
  string id = 1 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_ID];
  string display_ticket_id = 37 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_ID];
  string external_id = 41 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_ID];
  string integration_id = 18 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string external_url = 49 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_URL];

  string itsm_ticket_type = 15 [
    (mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_DATA,
    (mw.validation.v1.rules).string = {
      in: ['DEFAULT', 'INCIDENT', 'REQUEST', 'REQUEST_ITEM', 'CALL', 'TASK', 'MISC', 'UNIVERSAL_REQUEST', 'HR_CASE']
    }
  ];
  string ticket_type = 35 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string type = 28 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string category = 21 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string subcategory = 22 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string priority = 26 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string domain = 27 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  TicketDestination ticket_destination = 39;

  string state = 2 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string sub_state = 40 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string internal_state_code = 8 [
    (mw.validation.v1.rules).string = {
      in: ['NEW', 'WIP', 'WAITING_FOR_USER', 'WAITING_FOR_VENDOR', 'WAITING_FOR_APPROVAL', 'CLOSED', 'RESOLVED', 'NOT_APPLICABLE']
    },
    (mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_DATA
  ];
  string close_code = 9 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string close_notes = 6 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_DATA];

  string short_description = 3 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_DATA];
  string description = 4 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_DATA];
  repeated TicketActivityItem activity_log = 31;
  repeated TicketActivityItem work_note_log = 48;
  google.protobuf.Struct variables = 36;
  map<string, string> custom_data = 13 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_TICKET_DATA];

  moveworks.type.identity.v2.User requested_for = 7;
  moveworks.type.identity.v2.User opened_by = 11;
  moveworks.type.identity.v2.User created_by = 10;
  moveworks.type.identity.v2.User assigned_to_user = 17;
  moveworks.type.identity.v2.User resolved_by = 5;
  moveworks.type.identity.v2.User updated_by = 33;
  string assignment_group = 19 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];

  google.protobuf.Timestamp created_at = 12;
  google.protobuf.Timestamp resolved_at = 30;
}

message TicketActivityItem {
  string full_text = 1 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  google.protobuf.Timestamp ts = 2;
  string activity = 3 [(mw.masking.v1.customer_data) = CUSTOMER_DATA_INTEGRATION_DATA];
  string by = 4 [(mw.masking.v1.pii_data) = PII_NAME];
}