we don't include a "create ticket" action in the default set because it's not guaranteed to work for everyone. Zendesk allows for field validation, making certain fields required when creating a new ticket; these validation rules can be custom per org, meaning the action needs to be tailored to the specific Zendesk instance (i.e. including all the required fields, adding specific custom fields, etc.). this can be done by creating a custom action (see: https://help.mypurecloud.com/articles/create-custom-action-integrations/).
Here's an example you can work from (I can't upload the json file directly, so I'll have to copy and past below). You'll need to modify to fit your specific situation; consult the zendesk ticket api documentation for more info on what the payloads should look like (https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket)
{
"name": "Create New Ticket - Exported 2019-12-18 @ 19:37",
"integrationType": "zendesk-data-actions",
"actionType": "custom",
"config": {
"request": {
"requestUrlTemplate": "/api/v2/tickets.json",
"requestType": "POST",
"headers": {
"UserAgent": "PureCloudIntegrations/1.0",
"Content-Type": "application/json"
},
"requestTemplate": "{\"ticket\": {\"subject\": \"${input.Subject}\", \"comment\": { \"body\": \"${input.Description}\" }, \"status\": \"${input.Status}\", \"requester_id\": ${input.Requester_id}, \"custom_fields\":[{\"id\": (customField1ID), \"value\": \"${input.Custom1}\"}, {\"id\": (customField2ID), \"value\": \"${input.Custom2}\"}]}}"
},
"response": {
"translationMap": {
"ticket": "$.ticket"
},
"translationMapDefaults": {},
"successTemplate": "${ticket}"
}
},
"contract": {
"input": {
"inputSchema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Ticket",
"description": "An ID-based request.",
"type": "object",
"required": [
"Requester_id"
],
"properties": {
"Requester_id": {
"description": "The ID used for the query.",
"type": "string"
},
"Subject": {
"type": "string"
},
"Description": {
"type": "string"
},
"Status": {
"type": "string"
},
"Custom1": {
"type": "string"
},
"Custom2": {
"type": "string"
}
},
"additionalProperties": true
}
},
"output": {
"successSchema": {
"title": "Ticket",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"subject": {
"type": "string"
},
"description": {
"type": "string"
},
"requester_id": {
"type": "integer"
}
},
"additionalProperties": true
}
}
},
"secure": false
}
------------------------------
Richard Schott
Genesys - Employees
------------------------------
Original Message:
Sent: 08-26-2022 09:54
From: Giuseppe Cisternino
Subject: Screen Pop in Zendesk not working
Hi Richard,
about this sentence "use another data action within the Architect flow to create the data action with the information you gather from the customer", do you have some "guides" to configura a data action to create a ticket in Zendesk?
Because now the current data actions for Zendesk integration consist only in "Get" actions, no actions availabe to "create\update" somethings in Zendesk.
Many thanks for your support
Best regards
Giuseppe
------------------------------
Giuseppe Cisternino
ComApp S.r.l
------------------------------
Original Message:
Sent: 05-20-2022 09:14
From: Richard Schott
Subject: Screen Pop in Zendesk not working
There's two ways you can do this. The first would be to use another data action within the Architect flow to create the data action with the information you gather from the customer, then set the ticket ID that is returned from that API call as the screen pop for the agent. The other option is to set the screen pop attribute to create a new ticket when it arrives at the first agent. The documentation on how to structure the screen pop can be found here: https://help.mypurecloud.com/articles/screen-pop-in-genesys-cloud-for-zendesk/, but for the first option you would set zd_searchType: ticket and zd_searchValue: {ticketID returned from Data Action}; for the second option zd_searchType: ticket and zd_searchValue: NEW.
------------------------------
Richard Schott
Genesys - Employees