Procedures

Automation procedures in the Zendesk BDK Book.

to add a comment to a (ticket)

Adds a comment to an existing ticket in Zendesk with an optional single file attachment.

Note: If the attachment is specified, it must include the attachment_name with extension.

Input Concepts

Concept
Description
Type
Required
Default Value

The ticket to which the comment will be added.

zendesk ticket

Yes

(no default)

The comment to add to the ticket.

zendesk comment

Yes

(no default)

attachment

The file to attach to the comment.

file

No

(no default)

attachment name

The name of the attachment.

text

No

(no default)

Output Concepts

Concept
Description
Type

The updated ZendeskTicket object with the new comment.

zendesk ticket

Examples

Add a simple comment

the ticket # Assume we already have a ticket concept in the KLang
create a json
use the above as the comment
the comment's body is "This is a test comment"
add the comment to the ticket

Add a comment with an attachment

the ticket # Assume we already have a ticket concept in the KLang
the attachment # Assume we already have an attachment in the KLang
create a json
use the above as the comment
the comment's body is "This is a test comment"
add the comment to the ticket
    the attachment is the attachment
    the attachment name is "test.pdf"

to create a (ticket) in zendesk

Creates a new ticket in Zendesk with the specified properties.

Input Concepts

Concept
Description
Type
Required
Default Value

The ticket to be created in Zendesk, represented as a ZendeskTicket concept.

zendesk ticket

Yes

(no default)

Output Concepts

Concept
Description
Type

A zendesk concept representing the created ticket.

zendesk ticket

Examples

Create a Ticket

create a json
use the above as the ticket
the ticket's subject is "Test"
the ticket's description is "This is a test ticket"
create the ticket in zendesk

to delete a ticket in zendesk

Deletes a specified ticket in Zendesk.

Input Concepts

Concept
Description
Type
Required
Default Value

The ticket concept to delete.

zendesk ticket

Yes

(no default)

Examples

Delete a ticket

get some tickets in zendesk
use the first ticket as the ticket
delete the ticket in zendesk

to get a (ticket) in zendesk

Retrieves a specific ticket from Zendesk by its ID using direct API access.

This method uses the direct ticket API (not search) so it works immediately after ticket creation without waiting for search index updates.

Input Concepts

Concept
Description
Type
Required
Default Value

ticket id

The ID of the ticket to retrieve.

number

Yes

(no default)

Output Concepts

Concept
Description
Type

A ZendeskTicket object representing the retrieved ticket.

zendesk ticket

Examples

Get a ticket

get a ticket in zendesk
    the ticket id is 12345

to get some (ticket's comments) in zendesk

Retrieves all comments for a specific ticket in Zendesk.

Input Concepts

Concept
Description
Type
Required
Default Value

The ticket to get comments for.

zendesk ticket

Yes

(no default)

Output Concepts

Concept
Description
Type

A list of ZendeskComment objects representing the retrieved comments.

zendesk comment

Examples

Get comments for a ticket

the ticket # Assume we already have a ticket concept in the KLang
get the ticket's comments in zendesk

to get some (users) in zendesk

FILTER - CAPABLE

Retrieves users from Zendesk using search functionality with optional filter expressions.

Input Concepts

Concept
Description
Type
Required
Default Value

offset

Number of results to skip for pagination. Default is 0.

number

No

(no default)

limit

Maximum number of users to return. Default is 10.

number

No

(no default)

Output Concepts

Concept
Description
Type

A list of ZendeskUser objects representing the retrieved users.

zendesk user

Examples

Get all users

get some users in zendesk

Get users with filter expression

get some users in zendesk whose role is "agent"

Get users with pagination

get some users in zendesk
    the offset is 0
    the limit is 10

to search some (tickets) in zendesk

FILTER - CAPABLE

Retrieves tickets from Zendesk using search functionality with optional filter expressions.

NOTE: This method uses the search API, which might not return immediately updated data after ticket creation. It may take up to some minutes to index newly created tickets. If you need immediate access to the ticket data, use the get_ticket_by_id method instead.

Input Concepts

Concept
Description
Type
Required
Default Value

offset

Number of results to skip for pagination.

number

No

(no default)

limit

Maximum number of tickets to return.

number

No

(no default)

Output Concepts

Concept
Description
Type

A list of ZendeskTicket objects representing the retrieved tickets.

zendesk ticket

Examples

Get some tickets

search some tickets in zendesk

Get tickets with filter expression

search some tickets in zendesk whose status is "open"

Get tickets with pagination

search some tickets in zendesk
    the offset is 0
    the limit is 10

to update a (ticket) in zendesk

Updates a specific ticket in Zendesk with the provided information.

Input Concepts

Concept
Description
Type
Required
Default Value

The ticket to be updated in Zendesk, represented as a ZendeskTicket object.

zendesk ticket

Yes

(no default)

Output Concepts

Concept
Description
Type

The updated ticket information as returned by Zendesk.

zendesk ticket

Examples

Update a ticket's status and priority

the ticket # Assume we already have a ticket concept in the KLang
the ticket's status is "open"
the ticket's priority is "high"
update the ticket in zendesk

Last updated

Was this helpful?