ServiceNow - Ticket Management

`ServiceNow - Ticket Management` allows you to open a new ticket or comment on an existing ticket.

ServiceNow · 13 tasks · 12 inputs · 1 output

Details

IDServiceNow - Ticket Management
From Version6.8.0
Tasks13

README

ServiceNow - Ticket Management allows you to open a new ticket or comment on an existing ticket.

Dependencies

This playbook uses the following sub-playbooks, integrations, and scripts.

Sub-playbooks

This playbook does not use any sub-playbooks.

Integrations

  • ServiceNow
  • ServiceNowv2

Scripts

This playbook does not use any scripts.

Commands

  • servicenow-create-ticket
  • servicenow-update-ticket

Playbook Inputs


Name Description Default Value Required
serviceNowTicketID The ticket ID.   Optional
serviceNowCategory The category of the ServiceNow ticket.   Optional
description Description of the ticket.   Optional
serviceNowImpact The impact for the new ticket. Leave empty for ServiceNow default impact.   Optional
serviceNowUrgency The urgency of the new ticket. Leave empty for ServiceNow default urgency.   Optional
serviceNowSeverity The severity of the new ticket. Leave empty for ServiceNow default severity.   Optional
CommentToAdd Comment for the ticket.   Optional
serviceNowTicketType The ServiceNow ticket type. Options are “incident”, “problem”, “change_request”, “sc_request”, “sc_task”, or “sc_req_item”. Default is “incident”.   Optional
addCommentPerEndpoint Whether to add a new comment to the ticket for each endpoint in the incident. Possible values: True/False. True Optional
serviceNowShortDescription A short description of the ticket.   Optional
Action Whether to open a new ticket or to add a new comment. Possible values: NewTicket/AddComment.   Optional
serviceNowAssignmentGroup The group to which to assign the new ticket.   Optional

Playbook Outputs


Path Description Type
ServiceNow.Ticket.ID ServiceNow Ticket ID. unknown

Playbook Image


ServiceNow - Ticket Management

Inputs

  • serviceNowTicketID — The ticket ID.
  • serviceNowCategory — The category of the ServiceNow ticket.
  • description — Description of the ticket.
  • serviceNowImpact — The impact for the new ticket. Leave empty for ServiceNow default impact.
  • serviceNowUrgency — The urgency of the new ticket. Leave empty for ServiceNow default urgency.
  • serviceNowSeverity — The severity of the new ticket. Leave empty for ServiceNow default severity.
  • CommentToAdd — Comment for the ticket.
  • serviceNowTicketType — The ServiceNow ticket type. Options are "incident", "problem", "change_request", "sc_request", "sc_task", or "sc_req_item". Default is "incident".
  • addCommentPerEndpoint — Whether to add a new comment to the ticket for each endpoint in the incident. Possible values: True/False.
  • serviceNowShortDescription — A short description of the ticket.
  • Action — Whether to open a new ticket or to add a new comment. Possible values: NewTicket/AddComment.
  • serviceNowAssignmentGroup — The group to which to assign the new ticket.

Outputs

  • ServiceNow.Ticket.ID — ServiceNow Ticket ID.

Commands used

servicenow-create-ticket servicenow-update-ticket

Flowchart

yes yes yes yes yes Start Start Is ServiceNow v2 integration enabled? Is ServiceNow v2 integrat... Create a ticket for the incident - servicenow-create-ticket Create a ticket for the i... servicenow-create-ticket Whether to open a ticket for this incident? Whether to open a ticket ... Update the ticket for the incident - servicenow-update-ticket Update the ticket for the... servicenow-update-ticket Done Done Was a comment provided in the input Was a comment provided in... Add a comment to the ticket Add a comment to the ticket Whether to append a new comment to the ticket for each alert? Whether to append a new c... Are the required details for opening a ticket been provided? Are the required details ... Provide details for opening a ticket. Provide details for openi... Create a ticket for the incident - servicenow-create-ticket Create a ticket for the i... servicenow-create-ticket Update the ticket for the incident - servicenow-update-ticket Update the ticket for the... servicenow-update-ticket
id: ServiceNow - Ticket Management
version: -1
name: ServiceNow - Ticket Management
description: '`ServiceNow - Ticket Management` allows you to open a new ticket or comment on an existing ticket.'
starttaskid: "0"
tasks:
  "0":
    id: "0"
    taskid: adef5ad9-870c-46e5-8425-54b29e21cd17
    type: start
    task:
      id: adef5ad9-870c-46e5-8425-54b29e21cd17
      version: -1
      name: ""
      iscommand: false
      brand: ""
      description: ''
    nexttasks:
      '#none#':
      - "1"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -150,
          "y": 400
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "1":
    id: "1"
    taskid: 6891d374-18fa-4eb1-8dee-1bda2be25f6c
    type: condition
    task:
      id: 6891d374-18fa-4eb1-8dee-1bda2be25f6c
      version: -1
      name: Is ServiceNow v2 integration enabled?
      description: Checks if the ServiceNow v2 integration is enabled.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "7"
      "yes":
      - "3"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isEqualString
          left:
            value:
              complex:
                root: modules
                filters:
                - - operator: isEqualString
                    left:
                      value:
                        simple: modules.state
                      iscontext: true
                    right:
                      value:
                        simple: active
                    ignorecase: true
                accessor: brand
            iscontext: true
          right:
            value:
              simple: ServiceNow v2
          ignorecase: true
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -150,
          "y": 540
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "2":
    id: "2"
    taskid: aa176873-8f95-45b9-857d-6db87bdcef37
    type: regular
    task:
      id: aa176873-8f95-45b9-857d-6db87bdcef37
      version: -1
      name: Create a ticket for the incident
      description: Creates new ServiceNow ticket.
      script: '|||servicenow-create-ticket'
      type: regular
      iscommand: true
      brand: ""
    nexttasks:
      '#none#':
      - "7"
    scriptarguments:
      assignment_group:
        complex:
          root: inputs.serviceNowAssignmentGroup
      category:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "1"
      comments:
        complex:
          root: inputs.CommentToAdd
      description:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "0"
      impact:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "2"
      severity:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "4"
      short_description:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "6"
      ticket_type:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "5"
      urgency:
        complex:
          root: Please provide the following details to open a ticket.Answers
          accessor: "3"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 480,
          "y": 1315
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "3":
    id: "3"
    taskid: c45fcc66-2992-470f-8810-2ac6f6fa4640
    type: condition
    task:
      id: c45fcc66-2992-470f-8810-2ac6f6fa4640
      version: -1
      name: Whether to open a ticket for this incident?
      description: Checks whether to open a new ticket or add a comment to an existing ticket.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "11"
      "yes":
      - "16"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isEqualString
          left:
            value:
              complex:
                root: inputs.Action
            iscontext: true
          right:
            value:
              simple: NewTicket
          ignorecase: true
      - - operator: isEmpty
          left:
            value:
              simple: inputs.serviceNowTicketID
            iscontext: true
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -150,
          "y": 760
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "4":
    id: "4"
    taskid: 80014140-96c0-4da1-82a1-2c874cebfe90
    type: regular
    task:
      id: 80014140-96c0-4da1-82a1-2c874cebfe90
      version: -1
      name: Update the ticket for the incident
      description: Updates the specified ticket.
      script: '|||servicenow-update-ticket'
      type: regular
      iscommand: true
      brand: ""
    nexttasks:
      '#none#':
      - "7"
    scriptarguments:
      comments:
        complex:
          root: what is the comment for the ticket?.Answers
          accessor: "0"
      id:
        complex:
          root: inputs.serviceNowTicketID
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -1080,
          "y": 1490
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "7":
    id: "7"
    taskid: 3e5b6314-b03b-4fb0-82da-4a5990ef9b1f
    type: title
    task:
      id: 3e5b6314-b03b-4fb0-82da-4a5990ef9b1f
      version: -1
      name: Done
      type: title
      iscommand: false
      brand: ""
      description: ''
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -150,
          "y": 1690
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "8":
    id: "8"
    taskid: de59d3d7-4a62-445e-8a1c-8a2bb052435b
    type: condition
    task:
      id: de59d3d7-4a62-445e-8a1c-8a2bb052435b
      version: -1
      name: Was a comment provided in the input
      description: Checks if the comment was provided in the input.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "9"
      "yes":
      - "19"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.CommentToAdd
            iscontext: true
          right:
            value: {}
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -860,
          "y": 1160
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "9":
    id: "9"
    taskid: 9f2c3b0e-0b6c-45ba-8b92-89c13644a4e4
    type: collection
    task:
      id: 9f2c3b0e-0b6c-45ba-8b92-89c13644a4e4
      version: -1
      name: Add a comment to the ticket
      description: Data collection task to add a comment to the ticket.
      type: collection
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "4"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -1080,
          "y": 1330
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    message:
      to:
      subject:
      body:
      methods: []
      format: ""
      bcc:
      cc:
      timings:
        retriescount: 2
        retriesinterval: 360
        completeafterreplies: 1
        completeafterv2: true
        completeaftersla: false
    form:
      questions:
      - id: "0"
        label: ""
        labelarg:
          simple: Add comment to the ticket
        required: true
        gridcolumns: []
        defaultrows: []
        type: longText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: ""
        readonly: false
      title: what is the comment for the ticket?
      description: ""
      sender: ""
      expired: false
      totalanswers: 0
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "11":
    id: "11"
    taskid: d3c1b2c3-5732-457b-8c1e-fe3c8d43c328
    type: condition
    task:
      id: d3c1b2c3-5732-457b-8c1e-fe3c8d43c328
      version: -1
      name: Whether to append a new comment to the ticket for each alert?
      description: Checks if a new comment should be appended to the ticket for each alert.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "7"
      "yes":
      - "8"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isEqualString
          left:
            value:
              complex:
                root: inputs.addCommentPerEndpoint
            iscontext: true
          right:
            value:
              simple: "True"
          ignorecase: true
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -620,
          "y": 930
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "16":
    id: "16"
    taskid: 948539a3-e390-420e-8598-14318f04190a
    type: condition
    task:
      id: 948539a3-e390-420e-8598-14318f04190a
      version: -1
      name: Are the required details for opening a ticket been provided?
      description: Checks if the required details for opening a ticket were provided.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "17"
      "yes":
      - "18"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.description
            iscontext: true
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.serviceNowCategory
            iscontext: true
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.serviceNowImpact
            iscontext: true
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.serviceNowUrgency
            iscontext: true
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: 'inputs.serviceNowSeverity '
            iscontext: true
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.serviceNowTicketType
            iscontext: true
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.serviceNowShortDescription
            iscontext: true
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 270,
          "y": 940
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "17":
    id: "17"
    taskid: 552d1452-ce53-44af-81fd-20997fac7cde
    type: collection
    task:
      id: 552d1452-ce53-44af-81fd-20997fac7cde
      version: -1
      name: Provide details for opening a ticket.
      description: Data collection task to provide details for opening a ticket.
      type: collection
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "2"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 480,
          "y": 1120
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    message:
      to:
      subject:
      body:
      methods: []
      format: ""
      bcc:
      cc:
      timings:
        retriescount: 2
        retriesinterval: 360
        completeafterreplies: 1
        completeafterv2: true
        completeaftersla: false
    form:
      questions:
      - id: "0"
        label: ""
        labelarg:
          simple: Enter ticket description
        required: true
        gridcolumns: []
        defaultrows: []
        type: longText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: Description of the ticket.
        readonly: false
      - id: "1"
        label: ""
        labelarg:
          simple: Enter ticket Category
        required: false
        gridcolumns: []
        defaultrows: []
        type: shortText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: The category of the ServiceNow Ticket.
        readonly: false
      - id: "2"
        label: ""
        labelarg:
          simple: Enter ticket Impact
        required: false
        gridcolumns: []
        defaultrows: []
        type: shortText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: The impact for the new ticket. Leave empty for ServiceNow default impact.
        readonly: false
      - id: "3"
        label: ""
        labelarg:
          simple: Enter ticket Urgency
        required: false
        gridcolumns: []
        defaultrows: []
        type: shortText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: The urgency of the new ticket. Leave empty for ServiceNow default urgency.
        readonly: false
      - id: "4"
        label: ""
        labelarg:
          simple: 'Enter ticket Severity '
        required: false
        gridcolumns: []
        defaultrows: []
        type: shortText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: The severity of the new ticket. Leave empty for ServiceNow default severity.
        readonly: false
      - id: "5"
        label: ""
        labelarg:
          simple: Enter ticket Type
        required: false
        gridcolumns: []
        defaultrows: []
        type: shortText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: The ServiceNow ticket type. Options are "incident", "problem", "change_request", "sc_request", "sc_task", or "sc_req_item". Default is "incident".
        readonly: false
      - id: "6"
        label: ""
        labelarg:
          simple: Enter ticket Short Description
        required: false
        gridcolumns: []
        defaultrows: []
        type: shortText
        options: []
        optionsarg: []
        fieldassociated: ""
        placeholder: ""
        tooltip: A short description of the ticket.
        readonly: false
      title: Please provide the following details to open a ticket.
      description: ""
      sender: ""
      expired: false
      totalanswers: 0
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "18":
    id: "18"
    taskid: c7f798b6-9753-49da-82c0-d87f18b7c6e1
    type: regular
    task:
      id: c7f798b6-9753-49da-82c0-d87f18b7c6e1
      version: -1
      name: Create a ticket for the incident
      description: Creates a new ServiceNow ticket.
      script: '|||servicenow-create-ticket'
      type: regular
      iscommand: true
      brand: ""
    nexttasks:
      '#none#':
      - "7"
    scriptarguments:
      assignment_group:
        complex:
          root: inputs.serviceNowAssignmentGroup
      category:
        complex:
          root: inputs.serviceNowCategory
      comments:
        complex:
          root: inputs.CommentToAdd
      description:
        complex:
          root: inputs.description
      impact:
        complex:
          root: inputs.serviceNowImpact
      severity:
        complex:
          root: 'inputs.serviceNowSeverity '
      short_description:
        complex:
          root: inputs.serviceNowShortDescription
      ticket_type:
        complex:
          root: inputs.serviceNowTicketType
      urgency:
        complex:
          root: inputs.serviceNowUrgency
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 60,
          "y": 1120
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "19":
    id: "19"
    taskid: ffc7b31c-5567-4eb8-81f5-ba3b7c2dcbe6
    type: regular
    task:
      id: ffc7b31c-5567-4eb8-81f5-ba3b7c2dcbe6
      version: -1
      name: Update the ticket for the incident
      description: Updates the specified ticket.
      script: '|||servicenow-update-ticket'
      type: regular
      iscommand: true
      brand: ""
    nexttasks:
      '#none#':
      - "7"
    scriptarguments:
      comments:
        complex:
          root: inputs.CommentToAdd
      id:
        complex:
          root: inputs.serviceNowTicketID
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": -650,
          "y": 1330
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
view: |-
  {
    "linkLabelsPosition": {
      "11_7_#default#": 0.12,
      "1_7_#default#": 0.15
    },
    "paper": {
      "dimensions": {
        "height": 1355,
        "width": 1940,
        "x": -1080,
        "y": 400
      }
    }
  }
inputs:
- key: serviceNowTicketID
  value: {}
  required: false
  description: The ticket ID.
  playbookInputQuery:
- key: serviceNowCategory
  value: {}
  required: false
  description: The category of the ServiceNow ticket.
  playbookInputQuery:
- key: description
  value: {}
  required: false
  description: Description of the ticket.
  playbookInputQuery:
- key: serviceNowImpact
  value: {}
  required: false
  description: The impact for the new ticket. Leave empty for ServiceNow default impact.
  playbookInputQuery:
- key: serviceNowUrgency
  value: {}
  required: false
  description: The urgency of the new ticket. Leave empty for ServiceNow default urgency.
  playbookInputQuery:
- key: 'serviceNowSeverity '
  value: {}
  required: false
  description: The severity of the new ticket. Leave empty for ServiceNow default severity.
  playbookInputQuery:
- key: CommentToAdd
  value: {}
  required: false
  description: Comment for the ticket.
  playbookInputQuery:
- key: serviceNowTicketType
  value: {}
  required: false
  description: The ServiceNow ticket type. Options are "incident", "problem", "change_request", "sc_request", "sc_task", or "sc_req_item". Default is "incident".
  playbookInputQuery:
- key: addCommentPerEndpoint
  value:
    simple: "True"
  required: false
  description: 'Whether to add a new comment to the ticket for each endpoint in the incident. Possible values: True/False.'
  playbookInputQuery:
- key: serviceNowShortDescription
  value: {}
  required: false
  description: A short description of the ticket.
  playbookInputQuery:
- key: Action
  value: {}
  required: false
  description: 'Whether to open a new ticket or to add a new comment. Possible values: NewTicket/AddComment.'
  playbookInputQuery:
- key: serviceNowAssignmentGroup
  value: {}
  required: false
  description: The group to which to assign the new ticket.
  playbookInputQuery:
outputs:
- contextPath: ServiceNow.Ticket.ID
  description: ServiceNow Ticket ID.
tests:
- No tests (auto formatted)
marketplaces:
- xsoar
- marketplacev2
- platform
fromversion: 6.8.0
supportedModules:
- agentix
- xsiam
- edr
- cloud
- cloud_runtime_security