Ticket Management - Generic

`Ticket Management - Generic` allows you to open new tickets or update comments to the existing ticket in the following ticketing systems: -ServiceNow -Zendesk using the following sub-playbooks: -`ServiceNow - Ticket Management` -`Zendesk - Ticket Management`

Common Playbooks · 11 tasks · 18 inputs · 2 outputs

Details

IDTicket Management - Generic
From Version6.8.0
Tasks11

README

Ticket Management - Generic allows you to open new tickets or update comments to the existing ticket in the following ticketing systems:
-ServiceNow
-Zendesk
using the following sub-playbooks:
-ServiceNow - Ticket Management
-Zendesk - Ticket Management

Dependencies

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

Sub-playbooks

  • Zendesk - Ticket Management
  • ServiceNow - Ticket Management

Integrations

This playbook does not use any integrations.

Scripts

Set

Commands

setParentIncidentContext

Playbook Inputs


Name Description Default Value Required
serviceNowShortDescription A short 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
serviceNowTicketType The ServiceNow ticket type. Options are “incident”, “problem”, “change_request”, “sc_request”, “sc_task”, or “sc_req_item”. Default is “incident”.   Optional
serviceNowCategory The category of the ServiceNow ticket.   Optional
serviceNowAssignmentGroup The group to which to assign the new ticket.   Optional
ZendeskPriority The urgency with which the ticket should be addressed. Allowed values are “urgent”, “high”, “normal”, or “low”.   Optional
ZendeskRequester The user who requested this ticket.   Optional
ZendeskStatus The state of the ticket. Allowed values are “new”, “open”, “pending”, “hold”, “solved”, or “closed”.   Optional
ZendeskSubject The value of the subject field for this ticket.   Optional
ZendeskTags The array of tags applied to this ticket.   Optional
ZendeskType The type of this ticket. Allowed values are “problem”, “incident”, “question”, or “task”.   Optional
ZendeskAssigne The agent currently assigned to the ticket.   Optional
ZendeskCollaborators The users currently CC’ed on the ticket.   Optional
description The ticket description.   Optional
addCommentPerEndpoint Whether to append a new comment to the ticket for each endpoint in the incident. Possible values: True/False. True Optional
CommentToAdd Comment for the ticket.   Optional

Playbook Outputs


Path Description Type
ServiceNow.Ticket.ID ServiceNow ticket ID. unknown
Zendesk.Ticket.id Zendesk ticket ID. unknown

Playbook Image


Ticket Management - Generic

Inputs

  • serviceNowShortDescription — A short 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.
  • serviceNowTicketType — The ServiceNow ticket type. Options are "incident", "problem", "change_request", "sc_request", "sc_task", or "sc_req_item". Default is "incident".
  • serviceNowCategory — The category of the ServiceNow ticket.
  • serviceNowAssignmentGroup — The group to which to assign the new ticket.
  • ZendeskPriority — The urgency with which the ticket should be addressed. Allowed values are "urgent", "high", "normal", or "low".
  • ZendeskRequester — The user who requested this ticket.
  • ZendeskStatus — The state of the ticket. Allowed values are "new", "open", "pending", "hold", "solved", or "closed".
  • ZendeskSubject — The value of the subject field for this ticket.
  • ZendeskTags — The array of tags applied to this ticket.
  • ZendeskType — The type of this ticket. Allowed values are "problem", "incident", "question", or "task".
  • ZendeskAssigne — The agent currently assigned to the ticket.
  • ZendeskCollaborators — The users currently CC'ed on the ticket.
  • description — The ticket description.
  • addCommentPerEndpoint — Whether to append a new comment to the ticket for each endpoint in the incident. Possible values: True/False.
  • CommentToAdd — Comment for the ticket.

Outputs

  • ServiceNow.Ticket.ID — ServiceNow ticket ID.
  • Zendesk.Ticket.id — Zendesk ticket ID.

Commands used

setParentIncidentContext

Flowchart

Add comment New Ticket Start Start ServiceNow - Ticket Management - ServiceNow - Ticket Management ServiceNow - Ticket Manag... ServiceNow - Ticket Management Zendesk - Ticket Management - Zendesk - Ticket Management Zendesk - Ticket Management Zendesk - Ticket Management Done Done Set Zendesk Ticket ID - setParentIncidentContext Set Zendesk Ticket ID setParentIncidentContext Set ServiceNow Ticket ID - setParentIncidentContext Set ServiceNow Ticket ID setParentIncidentContext Set Endpoint hostname from alerts - setParentIncidentContext Set Endpoint hostname fro... setParentIncidentContext Set key to open a ticket - Set Set key to open a ticket Set Set key to add a comment - Set Set key to add a comment Set Ticket Management Ticket Management Open a new ticket or comment on existing ticket Open a new ticket or comm...
id: Ticket Management - Generic
version: -1
name: Ticket Management - Generic
description: "`Ticket Management - Generic` allows you to open new tickets or update comments to the existing ticket in the following ticketing systems:\n-ServiceNow \n-Zendesk \nusing the following sub-playbooks:\n-`ServiceNow - Ticket Management`\n-`Zendesk - Ticket Management`"
starttaskid: "0"
tasks:
  "0":
    id: "0"
    taskid: 8e482cde-8abb-4c9d-86a5-15c8ce3f7aa7
    type: start
    task:
      id: 8e482cde-8abb-4c9d-86a5-15c8ce3f7aa7
      version: -1
      name: ""
      iscommand: false
      brand: ""
      description: ''
    nexttasks:
      '#none#':
      - "19"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 430,
          "y": -280
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "2":
    id: "2"
    taskid: f9e4560c-d621-4bf8-8849-f00beaa70d70
    type: playbook
    task:
      id: f9e4560c-d621-4bf8-8849-f00beaa70d70
      version: -1
      name: ServiceNow - Ticket Management
      description: '`ServiceNow - Ticket Management` allows you to open new tickets or update comments to the existing ticket using the playbook''s tasks. '
      playbookName: ServiceNow - Ticket Management
      type: playbook
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "12"
    scriptarguments:
      Action:
        complex:
          root: Action
      CommentToAdd:
        complex:
          root: inputs.CommentToAdd
      addCommentPerEndpoint:
        complex:
          root: inputs.addCommentPerEndpoint
      description:
        complex:
          root: inputs.description
      serviceNowAssignmentGroup:
        complex:
          root: inputs.serviceNowAssignmentGroup
      serviceNowCategory:
        complex:
          root: inputs.serviceNowCategory
      serviceNowImpact:
        complex:
          root: inputs.serviceNowImpact
      'serviceNowSeverity ':
        complex:
          root: inputs.serviceNowSeverity
      serviceNowShortDescription:
        complex:
          root: inputs.serviceNowShortDescription
      serviceNowTicketID:
        complex:
          root: parentIncidentContext
          accessor: ServiceNowTicketID
      serviceNowTicketType:
        complex:
          root: inputs.serviceNowTicketType
      serviceNowUrgency:
        complex:
          root: inputs.serviceNowUrgency
    separatecontext: true
    continueonerrortype: ""
    loop:
      iscommand: false
      exitCondition: ""
      wait: 1
      max: 100
    view: |-
      {
        "position": {
          "x": 230,
          "y": 350
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: true
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "3":
    id: "3"
    taskid: bc8a5228-c2b8-46af-8e21-d7687a8edffe
    type: playbook
    task:
      id: bc8a5228-c2b8-46af-8e21-d7687a8edffe
      version: -1
      name: Zendesk - Ticket Management
      description: '`Zendesk - Ticket Management` allows you to open new tickets or update comments to the existing ticket using the playbook''s tasks. '
      playbookName: Zendesk - Ticket Management
      type: playbook
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "11"
    scriptarguments:
      Action:
        complex:
          root: Action
      CommentToAdd:
        complex:
          root: inputs.CommentToAdd
      ZendeskAssigne:
        complex:
          root: inputs.ZendeskAssigne
      ZendeskCollaborators:
        complex:
          root: inputs.ZendeskCollaborators
      ZendeskPriority:
        complex:
          root: inputs.ZendeskPriority
      ZendeskRequester:
        complex:
          root: inputs.ZendeskRequester
      ZendeskStatus:
        complex:
          root: inputs.ZendeskStatus
      ZendeskSubject:
        complex:
          root: inputs.ZendeskSubject
      ZendeskTags:
        complex:
          root: inputs.ZendeskTags
      ZendeskTicketID:
        complex:
          root: parentIncidentContext
          accessor: ZendeskTicketID
      ZendeskType:
        complex:
          root: inputs.ZendeskType
      addCommentPerEndpoint:
        complex:
          root: inputs.addCommentPerEndpoint
      description:
        complex:
          root: inputs.description
    separatecontext: true
    continueonerrortype: ""
    loop:
      iscommand: false
      exitCondition: ""
      wait: 1
      max: 100
    view: |-
      {
        "position": {
          "x": 660,
          "y": 350
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: true
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "4":
    id: "4"
    taskid: 66b87a8c-c5a1-489c-8cef-ea4c198faa4e
    type: title
    task:
      id: 66b87a8c-c5a1-489c-8cef-ea4c198faa4e
      version: -1
      name: Done
      type: title
      iscommand: false
      brand: ""
      description: ''
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 870,
          "y": 950
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "11":
    id: "11"
    taskid: 159abeff-fe4e-42fc-8be0-67f4ba0f245b
    type: regular
    task:
      id: 159abeff-fe4e-42fc-8be0-67f4ba0f245b
      version: -1
      name: Set Zendesk Ticket ID
      description: |-
        Sets the `ZendeskTicketID` key to the incident's context.
        If the output `Zendesk.Ticket.id` from sub-playbook `Zendesk - Ticket Management` is defined, set the ticket ID to the `ZendeskTicketID` key in the incident context else set the value of the `ZendeskTicketID` key as empty on the incident's context.
      script: Builtin|||setParentIncidentContext
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "13"
    scriptarguments:
      key:
        simple: ZendeskTicketID
      value:
        complex:
          root: alert
          accessor: id
          transformers:
          - operator: If-Then-Else
            args:
              condition:
                value:
                  simple: lhs==rhs
              conditionB: {}
              conditionInBetween: {}
              else:
                value:
                  simple: Zendesk.Ticket.id
                iscontext: true
              equals: {}
              lhs:
                value:
                  simple: Zendesk.Ticket.id
                iscontext: true
              lhsB: {}
              options: {}
              optionsB: {}
              rhs: {}
              rhsB: {}
              then: {}
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 660,
          "y": 530
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: true
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "12":
    id: "12"
    taskid: a27c8fa0-c258-41db-84e9-8b93a26c1623
    type: regular
    task:
      id: a27c8fa0-c258-41db-84e9-8b93a26c1623
      version: -1
      name: Set ServiceNow Ticket ID
      description: |-
        Sets the `ServiceNowTicketID` key to the incident's context.
        If the output `ServiceNow.Ticket.ID` from sub-playbook `ServiceNow - Ticket Management` is defined, set the ticket ID to the `ServiceNowTicketID` key in the incident context else set the value of the `ServiceNowTicketID` key as empty on the incident's context.
      script: Builtin|||setParentIncidentContext
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "13"
    scriptarguments:
      key:
        simple: ServiceNowTicketID
      value:
        complex:
          root: alert
          accessor: id
          transformers:
          - operator: If-Then-Else
            args:
              condition:
                value:
                  simple: lhs==rhs
              conditionB: {}
              conditionInBetween: {}
              else:
                value:
                  simple: ServiceNow.Ticket.ID
                iscontext: true
              equals: {}
              lhs:
                value:
                  simple: ServiceNow.Ticket.ID
                iscontext: true
              lhsB: {}
              options: {}
              optionsB: {}
              rhs: {}
              rhsB: {}
              then: {}
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 230,
          "y": 530
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: true
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "13":
    id: "13"
    taskid: 4d9c9b8f-0747-4eb0-8474-99316ead7621
    type: regular
    task:
      id: 4d9c9b8f-0747-4eb0-8474-99316ead7621
      version: -1
      name: 'Set Endpoint hostname from alerts '
      description: |-
        Sets the `Endpoint` key to the incident's context.
        If the alert.hostname  is defined on the alert context , set the hostname to the `Endpoint` key in the incident context else set the value `There is no hostname in the alert` to the incident's context.
      script: Builtin|||setParentIncidentContext
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "4"
    scriptarguments:
      key:
        simple: Endpoint
      value:
        complex:
          root: alert
          accessor: id
          transformers:
          - operator: If-Then-Else
            args:
              condition:
                value:
                  simple: lhs==rhs
              conditionB: {}
              conditionInBetween: {}
              else:
                value:
                  simple: alert.hostname
                iscontext: true
              equals: {}
              lhs:
                value:
                  simple: alert.hostname
                iscontext: true
              lhsB: {}
              options: {}
              optionsB: {}
              rhs: {}
              rhsB: {}
              then:
                value:
                  simple: There is no hostname in the alert
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 440,
          "y": 760
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: true
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "16":
    id: "16"
    taskid: c8d353d1-1319-420f-8831-8d04cb40effd
    type: regular
    task:
      id: c8d353d1-1319-420f-8831-8d04cb40effd
      version: -1
      name: Set key to open a ticket
      description: Set a value in context under the key you entered.
      scriptName: Set
      type: regular
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "18"
    scriptarguments:
      key:
        simple: Action
      value:
        simple: NewTicket
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 640,
          "y": 40
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "17":
    id: "17"
    taskid: 2e759af3-962e-48ad-8493-c4052d84f866
    type: regular
    task:
      id: 2e759af3-962e-48ad-8493-c4052d84f866
      version: -1
      name: Set key to add a comment
      description: Set a value in context under the key you entered.
      scriptName: Set
      type: regular
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "18"
    scriptarguments:
      key:
        simple: Action
      value:
        simple: AddComment
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 210,
          "y": 40
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "18":
    id: "18"
    taskid: 0be81a91-6f8f-488c-8cdc-9df4684fe290
    type: title
    task:
      id: 0be81a91-6f8f-488c-8cdc-9df4684fe290
      version: -1
      name: Ticket Management
      type: title
      iscommand: false
      brand: ""
      description: ''
    nexttasks:
      '#none#':
      - "2"
      - "3"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 430,
          "y": 210
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "19":
    id: "19"
    taskid: 043ae1ef-de8c-490b-8526-cb5fdd8f521b
    type: condition
    task:
      id: 043ae1ef-de8c-490b-8526-cb5fdd8f521b
      version: -1
      name: Open a new ticket or comment on existing ticket
      description: Whether to open a new ticket or comment on an existing ticket.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "4"
      Add comment:
      - "17"
      New Ticket:
      - "16"
    separatecontext: false
    conditions:
    - label: New Ticket
      condition:
      - - operator: isEmpty
          left:
            value:
              complex:
                root: parentIncidentContext
                accessor: ServiceNowTicketID
            iscontext: true
          right:
            value: {}
      - - operator: isEmpty
          left:
            value:
              complex:
                root: parentIncidentContext
                accessor: ZendeskTicketID
            iscontext: true
    - label: Add comment
      condition:
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: parentIncidentContext
                accessor: ZendeskTicketID
            iscontext: true
        - operator: isNotEmpty
          left:
            value:
              complex:
                root: parentIncidentContext
                accessor: ServiceNowTicketID
            iscontext: true
      - - operator: notIn
          left:
            value:
              complex:
                root: alert
                accessor: hostname
            iscontext: true
          right:
            value:
              simple: parentIncidentContext.Endpoint
            iscontext: true
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 430,
          "y": -140
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
view: |-
  {
    "linkLabelsPosition": {},
    "paper": {
      "dimensions": {
        "height": 1295,
        "width": 1040,
        "x": 210,
        "y": -280
      }
    }
  }
inputs:
- key: serviceNowShortDescription
  value: {}
  required: false
  description: A short 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: 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: serviceNowCategory
  value: {}
  required: false
  description: The category of the ServiceNow ticket.
  playbookInputQuery:
- key: serviceNowAssignmentGroup
  value: {}
  required: false
  description: The group to which to assign the new ticket.
  playbookInputQuery:
- key: ZendeskPriority
  value: {}
  required: false
  description: The urgency with which the ticket should be addressed. Allowed values are "urgent", "high", "normal", or "low".
  playbookInputQuery:
- key: ZendeskRequester
  value: {}
  required: false
  description: The user who requested this ticket.
  playbookInputQuery:
- key: ZendeskStatus
  value: {}
  required: false
  description: The state of the ticket. Allowed values are "new", "open", "pending", "hold", "solved", or "closed".
  playbookInputQuery:
- key: ZendeskSubject
  value: {}
  required: false
  description: The value of the subject field for this ticket.
  playbookInputQuery:
- key: ZendeskTags
  value: {}
  required: false
  description: The array of tags applied to this ticket.
  playbookInputQuery:
- key: ZendeskType
  value: {}
  required: false
  description: The type of this ticket. Allowed values are "problem", "incident", "question", or "task".
  playbookInputQuery:
- key: ZendeskAssigne
  value: {}
  required: false
  description: The agent currently assigned to the ticket.
  playbookInputQuery:
- key: ZendeskCollaborators
  value: {}
  required: false
  description: The users currently CC'ed on the ticket.
  playbookInputQuery:
- key: description
  value: {}
  required: false
  description: The ticket description.
  playbookInputQuery:
- key: addCommentPerEndpoint
  value:
    simple: "True"
  required: false
  description: 'Whether to append a new comment to the ticket for each endpoint in the incident. Possible values: True/False.'
  playbookInputQuery:
- key: CommentToAdd
  value: {}
  required: false
  description: Comment for the ticket.
  playbookInputQuery:
outputs:
- contextPath: ServiceNow.Ticket.ID
  description: ServiceNow ticket ID.
- contextPath: Zendesk.Ticket.id
  description: Zendesk ticket ID.
tests:
- No tests (auto formatted)
marketplaces:
- marketplacev2
- platform
fromversion: 6.8.0