--- title: Input context for ticket gateway actions deprecated: false hidden: false metadata: robots: index --- 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 : ```json { "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: ```json { "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: ```python { "payload": { "target_state" : "external_system_target_state" } } ``` ```json { "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: ```json { "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: ```json { "payload": { "status": "" } } ``` **Output** * Ticket JSON under key `raw_ticket` *** ### 10. Reopen Ticket action **Input** * `ticket` _(dict)_ * `payload` as below: ```json { "payload": { "target_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: ```json { "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 ```json { "file": { "file_name" : "file_name", "location": "location" } } ``` Input args : ```json { "processfilename": { "file_name": "data.file.file_name", "location": "data.file.location" }, "ticket_id": "data.ticket_id" } ``` File mapper in HTTP action : {/* Image placeholder */} *** ### 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 ```protobuf 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 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]; } ```