-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
playbook-ServiceNow_-_Ticket_Management.yml
848 lines (848 loc) · 20.4 KB
/
playbook-ServiceNow_-_Ticket_Management.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
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
fromversion: 6.8.0