Customized servicenow_lcm
actions can help users identify or track user-defined notification fields in the ServiceNow Change Request.
In order to customize the servicenow_lcm
action, you must first clone it. For more information, see Clone an Action topic.
The update_servicenow_tkt
can be modified to send custom data based on certain fields in the Notification to the ServiceNow Change Request Work Notes section.
For example, if UserDefined1 field is used for identifying Customer
and UserDefined2 field is used for identifying Location
, then you must specify these fields to be tracked in the Work Notes section of the ticket.
An example usecase is shown in the following screenshot.
Customize the Notification fields that are added to ServiceNow ChangeRequests Description, Short Description, or Category sections
Edit the servicenowticket
parameter from the page accordingly. For more information on how to edit the parameter, see Update a Parameter topic.
Customize ServiceNow ChangeRequest Type and State
The pre-defined servicenow_lcm
action creates a Normal type of Change Request. If you wish to create a Standard or Emergency type Change Request instead, you can clone and customize the action to achieve this. The /api/sn_chg_rest/change/normal string in the ServiceNow endpoint URL can be changed to standard or emergency endpoints respectively in the task_snow_cr
task and in the update_servicenow_tkt
Python function.
You can modify the check_snow_cr_state_func
Python function to customize the state handling of the Change Request. For example, to Close or Cancel the ticket based on the current state.
For more details, see the ServiceNow Product Documentation on the Change Request state transitions and Change Management API.