Views: the ticket queues agents work. List them, run one, or page through its tickets.
Context Vars
zendesk.subdomain
Functions
count-view-tickets
fn (id: Any): Any
fn (id: Any, opts: Map): Any
GET /views/{id}/count - The view's ticket count: {view_count: {value, pretty, fresh}}.
Example
out ::zendesk::views/count-view-tickets(360002)
out.view_count.value
execute-view
fn (id: Any): Any
fn (id: Any, options: Map): Any
fn (id: Any, options: Map, opts: Map): Any
GET /views/{id}/execute - The view's columns and rows ({columns, rows, groups, view, meta}), each row carrying a partial ticket. Rate-limited
to 5 requests a minute per view per agent, and results may be cached for
up to 10 minutes. options: sort_by, sort_order, group_by,
page_size, after.
Example
out ::zendesk::views/execute-view(360002, {sort_by: "updated_at", sort_order: "desc"})
map(out.rows, %.ticket.id)
get-view
fn (id: Any): Any
fn (id: Any, opts: Map): Any
GET /views/{id} - One view's definition. id may also be "incoming",
"my" or "my_groups".
Example
out ::zendesk::views/get-view("my")
out.view.title
list-active-views
fn (): Any
fn (opts: Map): Any
GET /views/active - Active views shared with the user: {views}.
Example
out ::zendesk::views/list-active-views()
map(out.views, %.title)
list-all-view-tickets
fn (id: Any, limit: Int): Vec
fn (id: Any, limit: Int, opts: Map): Vec
Collect up to limit tickets from a view across cursor pages. Returns a
Vec.
Example
tickets ::zendesk::views/list-all-view-tickets(360002, 500)
length(tickets)
list-view-tickets
fn (id: Any): Any
fn (id: Any, options: Map): Any
fn (id: Any, options: Map, opts: Map): Any
GET /views/{id}/tickets - One cursor page of the view's full ticket
objects: {tickets, meta, links}. options: sort_by, sort_order,
page_size, after.
Example
page ::zendesk::views/list-view-tickets(360002, {page_size: 50})
map(page.tickets, %.subject)
list-views
fn (): Any
fn (options: Map): Any
fn (options: Map, opts: Map): Any
GET /views - One cursor page of views: {views, meta, links}.
options: active (Bool), access ("personal"/"shared"/"account"),
group_id, page_size, after.
Example
page ::zendesk::views/list-views({active: true, access: "shared", page_size: 50})
map(page.views, %.title)