Cmdlets for Zendesk

Build 24.0.9062

ImportTickets

Move tickets in bulk from legacy systems into Zendesk Support. You can include one or more comments with a ticket.

Stored Procedure Specific Information

Zendesk allows only a small subset of columns to be used in the EXEC query. These columns can typically only be used with the = comparison. Allowed for Admins. For example:

INSERT INTO TicketComments#temp (AuthorId, CreatedAt, Body, ReferenceNumber) VALUES (10495503468572, '2023-09-25T10:15:18Z', 'Test body1', 1)
INSERT INTO TicketComments#temp (AuthorId, CreatedAt, Body, ReferenceNumber) VALUES (10495503468572, '2023-09-25T10:15:18Z', 'Test body2', 1)
INSERT INTO TicketComments#temp (AuthorId, CreatedAt, Body, ReferenceNumber) VALUES (10495503468572, '2023-09-25T10:15:18Z', 'Test body3', 2)
INSERT INTO TicketComments#temp (AuthorId, CreatedAt, Body, ReferenceNumber) VALUES (10495503468572, '2023-09-25T10:15:18Z', 'Test body4', 2)
INSERT INTO TicketComments#temp (AuthorId, CreatedAt, Body, ReferenceNumber) VALUES (10495503468572, '2023-09-25T10:15:18Z', 'Test body5', 3)

INSERT INTO Tickets#temp (AssigneeId, RequesterId, Description, Subject, TicketComments, ReferenceNumber) VALUES (10495503468572, 10486791159068, 'Desc1', 'Sub1', 'TicketComments#temp', 1)
INSERT INTO Tickets#temp (AssigneeId, RequesterId, Description, Subject, TicketComments, ReferenceNumber) VALUES (10495503468572, 10486791159068, 'Desc2', 'Sub2', 'TicketComments#temp', 2)
INSERT INTO Tickets#temp (AssigneeId, RequesterId, Description, Subject, TicketComments, ReferenceNumber) VALUES (10495503468572, 10486791159068, 'Desc3', 'Sub3', 'TicketComments#temp', 3)

EXECUTE ImportTickets Tickets = 'Tickets#temp'

This can also be executed by specifying the Tickets as a JSON array. For example:

EXECUTE ImportTickets Tickets = '[{\"requester_id\": 19128124956177, \"subject\": \"Sub1\", \"description\": \"Desc1\", \"comments\":[{\"created_at\": \"2009-06-25\", \"author_id\": 19128165898897, \"body\": \"Test body\"}], \"asignee_id\": 19128165898897},{\"requester_id\": 19157178632977, \"subject\": \"Sub2\", \"description\": \"Desc2\", \"comments\": [{\"created_at\": \"2009-06-25\", \"author_id\": 19217180224657, \"body\": \"This is the sample body\"}], \"asignee_id\": 19217180224657}]'

Input

Name Type Required Description
Tickets String True Array of ticket objects.

Result Set Columns

Name Type Description
Success String True if the bulk import of tickets is successful.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062