Resources

Renesas IoT Sandbox Documentation

Zendesk Library

The following functions provide Zendesk customer support integration.

Useful Links


Import


To use this library and its functions, you must use the import line at the beginning of your Base Python code.

import Zendesk


Functions


authenticate

Usage: authenticate(url, username, token)

Login to your Zendesk account

  • Credit cost: 1
  • Parameters:
    • url: string url to Zendesk account.
    • username: string Zendesk account email.
    • token: string token provided here.
  • Returns:
    • None



get_tickets

Usage: get_tickets()

Return all the tickets.

  • Credit cost: 1
  • Parameters:
    • None
  • Returns:
    • All tickets on the authenticated Zendesk account



get_ticket

Usage: get_ticket(ticket_id)

Returns a specific ticket.

  • Credit cost: 1
  • Parameters:
    • ticket_id: int The number automatically assigned to a ticket when created.
  • Returns:
    • Info of the specified ticket



get_tickets_search

Usage: get_tickets_search(keyword)

Returns a list of all the tickets containing the search keyword.

  • Credit cost: 1
  • Parameters:
    • keyword: string The word to be searched for within all the tickets
  • Returns:
    • List of all tickets containing the search keyword



create_ticket

Usage: create_ticket(subject, comment, requesterID=None, filename=None, contenttype=None, content=None, external=False)

Create a new ticket.

  • Credit cost: 1
  • Parameters:
    • subject: string The subject of the ticket.
    • comment: string Required. A comment object that describes the problem, incident, question, or task.
    • requesterID: string The numeric ID of the user asking for support through the ticket.
    • filename:
    • contenttype:
    • content:
    • external:
  • Returns:
    • None



update_ticket

update_ticket(ticket_id, comment, filename=None, contenttype=None, content=None, external=False)

Update an existing ticket.

  • Credit cost: 1
  • Parameters:
    • ticket_id: int The number automatically assigned to a ticket when created.
    • comment: string Required. A comment object that describes the problem, incident, question, or task.
    • filename:
    • contenttype:
    • content:
    • external:
  • Returns:
    • None


Sample Code


import Zendesk

Zendesk.authenticate("https://yoururl.zendesk.com", "johndoe@renesas.com", "QndHWjjsmEk4a6WuXl94TFZ2pvAdmz4xQkH7s0Lv")
tickets = Zendesk.get_tickets()
new_ticket = Zendesk.create_ticket('john subject', 'john comment')
Zendesk.update_ticket(new_ticket['ticket_id'], 'john comment with attachment', 'john.html', 'text/plain', '<html><body>Hello!</body></html>')

Getting Started
User Roles & Permissions
Streams, Tags, & Data Types
Dashboard Widgets
API
Workflow Studio
Workflow Libraries
Metering
Special Characters
Third Party Integration
Mobile
API Explorer

Zendesk Library

The following functions provide Zendesk customer support integration.

Useful Links


Import


To use this library and its functions, you must use the import line at the beginning of your Base Python code.

import Zendesk


Functions


authenticate

Usage: authenticate(url, username, token)

Login to your Zendesk account

  • Credit cost: 1
  • Parameters:
    • url: string url to Zendesk account.
    • username: string Zendesk account email.
    • token: string token provided here.
  • Returns:
    • None



get_tickets

Usage: get_tickets()

Return all the tickets.

  • Credit cost: 1
  • Parameters:
    • None
  • Returns:
    • All tickets on the authenticated Zendesk account



get_ticket

Usage: get_ticket(ticket_id)

Returns a specific ticket.

  • Credit cost: 1
  • Parameters:
    • ticket_id: int The number automatically assigned to a ticket when created.
  • Returns:
    • Info of the specified ticket



get_tickets_search

Usage: get_tickets_search(keyword)

Returns a list of all the tickets containing the search keyword.

  • Credit cost: 1
  • Parameters:
    • keyword: string The word to be searched for within all the tickets
  • Returns:
    • List of all tickets containing the search keyword



create_ticket

Usage: create_ticket(subject, comment, requesterID=None, filename=None, contenttype=None, content=None, external=False)

Create a new ticket.

  • Credit cost: 1
  • Parameters:
    • subject: string The subject of the ticket.
    • comment: string Required. A comment object that describes the problem, incident, question, or task.
    • requesterID: string The numeric ID of the user asking for support through the ticket.
    • filename:
    • contenttype:
    • content:
    • external:
  • Returns:
    • None



update_ticket

update_ticket(ticket_id, comment, filename=None, contenttype=None, content=None, external=False)

Update an existing ticket.

  • Credit cost: 1
  • Parameters:
    • ticket_id: int The number automatically assigned to a ticket when created.
    • comment: string Required. A comment object that describes the problem, incident, question, or task.
    • filename:
    • contenttype:
    • content:
    • external:
  • Returns:
    • None


Sample Code


import Zendesk

Zendesk.authenticate("https://yoururl.zendesk.com", "johndoe@renesas.com", "QndHWjjsmEk4a6WuXl94TFZ2pvAdmz4xQkH7s0Lv")
tickets = Zendesk.get_tickets()
new_ticket = Zendesk.create_ticket('john subject', 'john comment')
Zendesk.update_ticket(new_ticket['ticket_id'], 'john comment with attachment', 'john.html', 'text/plain', '<html><body>Hello!</body></html>')