Organizations
Create, delete, update, and query Organizations in Zendesk.
Table Specific Information
Select
The following queries are processed server side while other filters are processed client side within the driver.SELECT * FROM Organizations SELECT * FROM Organizations WHERE Id = '123' SELECT * FROM Organizations WHERE Id IN ('123','456') SELECT * FROM Organizations WHERE UserId = '123'
You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false in which case any other search criteria will be ignored and an unfiltered response will be returned.
Insert
The Name field is required to insert. Allowed for admins. Note: You must provide a unique name for each organization. Normally the system does not allow records to be created with identical names. However, a race condition can occur if you make two or more identical POSTs very close to each other, causing the records to have identical organization names.
INSERT INTO Organizations(Name) VALUES('My Organization')
To create many organizations see the Batch Processing section for an example.
Update
You must specify the Id of the organization to update it. All fields that are not readonly (readonly="false" in the table) are optional. Allowed for admins.
UPDATE Organizations SET Notes='Something interesting' WHERE Id='123'
To make the same change to multiple organizations, use the following Sql statement:
UPDATE Organizations SET Notes='Something interesting' WHERE Id IN ('123','456')
To make different changes to multiple organizations, see Batch Processing for an example.
Delete
You must specify the Id of the organization to delete it. Allowed for admins.
DELETE FROM Organizations WHERE Id='123'
You can delete many organizations simultaneously by providing their ids:
DELETE FROM Organizations WHERE Id IN ('123','456')
You can also delete many organizations simultaneously by using Batch Processing.
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
Automatically assigned when the ticket is created. | |
Name | String | False |
A unique name for the organization. | |
GroupId | Long | False |
Groups.Id |
New tickets from users in this organization are automatically put in this group. |
ExternalId | Long | False |
A unique external id to associate organizations to an external record. | |
CreatedAt | Datetime | True |
The time the organization was created. | |
UpdatedAt | Datetime | True |
The time of the last update of the organization. | |
DomainNames | String | False |
An array of domain names associated with this organization. | |
Details | String | False |
Any details obout the organization, such as the address. | |
Notes | String | False |
Any notes you have about the organization. | |
SharedTickets | Boolean | False |
End users in this organization are able to see tickets of each other. | |
SharedComments | Boolean | False |
End users in this organization are able to see comments on tickets of each other. | |
Tags | String | False |
The tags of the organization. | |
Url | String | True |
The URL for this resource. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
UserId | Long |
The user id used to query organizations |