Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

St zendesk private comments #27921

Merged
merged 7 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Packs/Zendesk/Integrations/Zendeskv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ Required permissions: Agents.
| brand_id | Enterprise only. The ID of the brand this ticket is associated with. | Optional |
| comment | A comment to add to the ticket. | Optional |
| html_comment | An HTML comment to add to the ticket. | Optional |
| public | true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it. Possible values are: true, false. Default is true. | Optional |


#### Context Output
Expand Down Expand Up @@ -480,6 +481,7 @@ Required permissions: Agents.
| collaborators | Users to add as CCs when creating a ticket. | Optional |
| comment | A comment to add to the ticket. | Optional |
| html_comment | An HTML comment to add to the ticket. | Optional |
| public | true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it. Possible values are: true, false. Default is true. | Optional |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment or note? what's the right term?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is from the api docs - comment will be the right term

| recipient | The original recipient email address of the ticket. | Optional |
| status | The state of the ticket. Possible values are: open, pending, hold, solved, closed. | Optional |
| priority | The urgency with which the ticket should be addressed. Possible values are: urgent, high, normal, low. | Optional |
Expand Down
2 changes: 2 additions & 0 deletions Packs/Zendesk/Integrations/Zendeskv2/Zendeskv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ def __init__(self, type: Optional[str] = None, collaborators: Optional[str] = No
self._data['comment']['public'] = argToBoolean(public)
if html_comment:
self._data['comment'] = {'html_body': html_comment}
if public:
self._data['comment']['public'] = argToBoolean(public)
if status:
Validators.validate_ticket_status(status)
self._data['status'] = status
Expand Down
18 changes: 16 additions & 2 deletions Packs/Zendesk/Integrations/Zendeskv2/Zendeskv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ script:
- name: role
auto: PREDEFINED
predefined:
- end_user
- end-user
- agent
- admin
description: The user's role.
Expand Down Expand Up @@ -468,7 +468,7 @@ script:
- name: role
auto: PREDEFINED
predefined:
- end_user
- end-user
- agent
- admin
description: The user's role. Possible values are "end-user", "agent", or "admin".
Expand Down Expand Up @@ -1045,6 +1045,13 @@ script:
description: A comment to add to the ticket.
- name: html_comment
description: An HTML comment to add to the ticket.
- name: public
description: true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it.
defaultValue: 'true'
auto: PREDEFINED
predefined:
- 'true'
- 'false'
- name: collaborators
isArray: true
description: Users to add as CC's when creating a ticket.
Expand Down Expand Up @@ -1242,6 +1249,13 @@ script:
description: A comment to add to the ticket.
- name: html_comment
description: An HTML comment to add to the ticket.
- name: public
description: true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it.
defaultValue: 'true'
auto: PREDEFINED
predefined:
- 'true'
- 'false'
- name: recipient
description: The original recipient email address of the ticket.
- name: status
Expand Down
8 changes: 8 additions & 0 deletions Packs/Zendesk/ReleaseNotes/2_1_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

#### Integrations

##### Zendesk v2

Added the argument *public* to the following commands:
- ***zendesk-ticket-create***
- ***zendesk-ticket-update***
184 changes: 49 additions & 135 deletions Packs/Zendesk/TestPlaybooks/Zendesk_V2_TEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,16 @@ tasks:
isautoswitchedtoquietmode: false
"5":
id: "5"
taskid: 054ea3d3-9243-494f-84e0-5efa8e7d2bb5
taskid: 79152734-bf21-4f64-8724-26fc44d305fe
type: regular
task:
id: 054ea3d3-9243-494f-84e0-5efa8e7d2bb5
id: 79152734-bf21-4f64-8724-26fc44d305fe
version: -1
name: create user
script: 'Zendesk v2|||zendesk-user-create'
type: regular
iscommand: true
brand: ""
brand: "Zendesk v2"
nexttasks:
'#none#':
- "6"
Expand All @@ -218,8 +218,6 @@ tasks:
simple: "123456789"
role:
simple: ${inputs.users_test_role}
role_type:
simple: admin
verified:
simple: "true"
separatecontext: false
Expand Down Expand Up @@ -324,7 +322,7 @@ tasks:
'#default#':
- "16"
"yes":
- "9"
- "42"
separatecontext: false
conditions:
- label: "yes"
Expand Down Expand Up @@ -369,63 +367,6 @@ tasks:
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"9":
id: "9"
taskid: a9028e8b-e5ac-41a3-862f-b8c921f73fd0
type: regular
task:
id: a9028e8b-e5ac-41a3-862f-b8c921f73fd0
version: -1
name: update user
script: 'Zendesk v2|||zendesk-user-update'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "11"
scriptarguments:
notes:
simple: ${inputs.users_update_test_note}
user_id:
complex:
root: Zendesk.User
filters:
- - operator: isEqualString
left:
value:
simple: Zendesk.User.email
iscontext: true
right:
value:
simple: inputs.users_test_email
iscontext: true
- - operator: isEqualString
left:
value:
simple: Zendesk.User.name
iscontext: true
right:
value:
simple: inputs.users_test_username
iscontext: true
accessor: id
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 357.5,
"y": 1915
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"10":
id: "10"
taskid: a6111c8a-405b-446c-80d1-01ea3d43e570
Expand Down Expand Up @@ -466,71 +407,6 @@ tasks:
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"11":
id: "11"
taskid: 02f88c4f-5d4a-48fc-84f6-72ece1bbf421
type: condition
task:
id: 02f88c4f-5d4a-48fc-84f6-72ece1bbf421
version: -1
name: check user update
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "16"
"yes":
- "42"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
complex:
root: Zendesk.User
filters:
- - operator: isEqualString
left:
value:
simple: Zendesk.User.email
iscontext: true
right:
value:
simple: inputs.users_test_email
iscontext: true
- - operator: isEqualString
left:
value:
simple: Zendesk.User.name
iscontext: true
right:
value:
simple: inputs.users_test_username
iscontext: true
accessor: notes
iscontext: true
right:
value:
simple: inputs.users_update_test_note
iscontext: true
continueonerrortype: ""
view: |-
{
"position": {
"x": 357.5,
"y": 2090
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"12":
id: "12"
taskid: f1776775-1df6-4854-8299-1eb9460a09cb
Expand Down Expand Up @@ -890,8 +766,8 @@ tasks:
view: |-
{
"position": {
"x": 705,
"y": 7730
"x": 700,
"y": 7940
}
}
note: false
Expand Down Expand Up @@ -1329,7 +1205,7 @@ tasks:
'#default#':
- "16"
"yes":
- "21"
- "47"
separatecontext: false
conditions:
- label: "yes"
Expand Down Expand Up @@ -1862,13 +1738,51 @@ tasks:
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"47":
id: "47"
taskid: 194c1fa8-e93d-4a95-82ab-94285a667838
type: regular
task:
id: 194c1fa8-e93d-4a95-82ab-94285a667838
version: -1
name: Delete Ticket
description: "Delete ticket. \nRequired permissions: Admins, Agents with permission to delete tickets.\nAgent delete permissions are set in Support.\nSee Deleting tickets in the Zendesk Support Help Center."
script: '|||zendesk-ticket-delete'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "21"
scriptarguments:
ticket_id:
simple: ${Zendesk.Ticket.id}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 700,
"y": 7760
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
view: |-
{
"linkLabelsPosition": {},
"linkLabelsPosition": {
"33_16_#default#": 0.21,
"8_42_yes": 0.49
},
"paper": {
"dimensions": {
"height": 7760,
"width": 1035,
"height": 7955,
"width": 1030,
"x": 50,
"y": 50
}
Expand Down Expand Up @@ -1909,7 +1823,7 @@ inputs:
playbookInputQuery:
- key: users_test_role
value:
simple: agent
simple: end-user
required: true
description: ""
playbookInputQuery:
Expand Down
2 changes: 1 addition & 1 deletion Packs/Zendesk/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Zendesk",
"description": "IT service management",
"support": "xsoar",
"currentVersion": "2.1.0",
"currentVersion": "2.1.1",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down