diff --git a/components/zendesk/actions/update-ticket/update-ticket.mjs b/components/zendesk/actions/update-ticket/update-ticket.mjs index f3e44b6566f68..8561096ad6211 100644 --- a/components/zendesk/actions/update-ticket/update-ticket.mjs +++ b/components/zendesk/actions/update-ticket/update-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Update Ticket", description: "Updates a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket).", type: "action", - version: "0.1.3", + version: "0.2.0", props: { app, ticketId: { @@ -38,6 +38,12 @@ export default { "ticketStatus", ], }, + tags: { + propDefinition: [ + app, + "tags", + ], + }, customSubdomain: { propDefinition: [ app, @@ -62,22 +68,36 @@ export default { ticketPriority, ticketSubject, ticketStatus, + tags, customSubdomain, } = this; + const ticket = { + ...(ticketCommentBody && { + comment: { + body: ticketCommentBody, + }, + }), + ...(ticketPriority && { + priority: ticketPriority, + }), + ...(ticketSubject && { + subject: ticketSubject, + }), + ...(ticketStatus && { + status: ticketStatus, + }), + ...(tags !== undefined && { + tags, + }), + }; + const response = await this.updateTicket({ step, ticketId, customSubdomain, data: { - ticket: { - comment: { - body: ticketCommentBody, - }, - priority: ticketPriority, - subject: ticketSubject, - status: ticketStatus, - }, + ticket, }, }); diff --git a/components/zendesk/zendesk.app.mjs b/components/zendesk/zendesk.app.mjs index f2b60ed78f3ba..781e730101ab1 100644 --- a/components/zendesk/zendesk.app.mjs +++ b/components/zendesk/zendesk.app.mjs @@ -144,6 +144,12 @@ export default { optional: true, options: Object.values(constants.TICKET_STATUS_OPTIONS), }, + tags: { + type: "string[]", + label: "Tags", + description: "Tags to apply to the ticket. You can specify multiple tags.", + optional: true, + }, sortBy: { type: "string", label: "Sort By",