Reference

Table Users


Description

No description available

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_users
INSERT post_user
UPDATE put_user
UPSERT upsert_user
DELETE delete_user
LOOKUP get_users_by_ids

Examples

SSIS

Use Zendesk Connector in API Source component to read data or in API Destination component to read/write data:

Read from Users table using API Source

API Source - Zendesk
Read and write Zendesk data effortlessly. Manage tickets, users, and organizations — almost no coding required.
Zendesk
Users
Optional Parameters
Role
permission_set
External ID for Ticket
NextUrlAttributeOrExpr $.links.next
Records Per Page (Max 100) 100
NextUrlEndIndicator false
StopIndicatorAttributeOrExpr $.meta.has_more
SSIS API Source - Read from table or endpoint

Read/write to Users table using API Destination

API Destination - Zendesk
Read and write Zendesk data effortlessly. Manage tickets, users, and organizations — almost no coding required.
Zendesk
Users
Select
Optional Parameters
Role
permission_set
External ID for Ticket
NextUrlAttributeOrExpr $.links.next
Records Per Page (Max 100) 100
NextUrlEndIndicator false
StopIndicatorAttributeOrExpr $.meta.has_more
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Read users

<p>Reads all users from the Zendesk account. This example demonstrates querying the <code>Users</code> table. You can optionally filter by ID using the <code>WHERE</code> clause.</p>

SELECT * FROM Users --Where Id=1234

Create a user

<p>Creates a new user in the <code>Users</code> table. This example demonstrates specifying user details like name, email, role, and custom fields. Note that if a user with the same email exists, the call will fail.</p>

INSERT INTO Users
(
 name
,email
,organization_id
,phone
,default_group_id
,locale
,moderator
,skip_verify_email
,only_private_comments
,signature
,tags
,time_zone
,role
,external_id
,alias
,details
,notes
,remote_photo_url
,user_fields
)
VALUES(
   'Bob Walton'
  ,'bob@abc.com'
  ,5397098432795
  ,'111-222-3333'
  ,114094762733
  ,'en-US'
  ,'false'
  ,'true' --true=do not send verify account email
  ,1 --user can put only private comments
  ,'Best regards, Support Team' --Only agents and admins can have signatures
  ,'["paid","trial","solved"]' 
  ,'America/New_York'
  ,'end-user' --agent or admin 
  ,'zcrm_1558554000052161270'
  ,'some alias'
  ,'some details'
  ,'some notes'
  ,'https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png' --this does not work in INSERT (works only in UPDATE/UPSERT for now)
  ,'{"birthdate": "1981-01-23", "gender": "M"}'
)

Update a user

<p>Updates an existing user by their ID. This example demonstrates modifying user properties such as name, email, role, and custom fields using the <code>UPDATE</code> statement.</p>

UPDATE Users
SET name='Sam Walton'
  ,email='sam@abc.com'
  ,organization_id=5397098432795
  ,phone='111-222-3333'
  ,default_group_id=114094762733
  ,locale='en-US'
  ,skip_verify_email='true' --do not send verify account email
  ,moderator='false'
  ,only_private_comments=1 --user can put only private comments
  ,signature='Best regards, Support Team' --Only agents and admins can have signatures
  ,tags='["paid","trial","solved"]' 
  ,time_zone='America/New_York'
  ,role='end-user'
  ,external_id='zcrm_1558554000052161269'
  ,alias='some alias'
  ,details='some details'
  ,notes='some notes'
  ,remote_photo_url='https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png'
  ,user_fields='{"birthdate": "1981-01-23", "gender": "M"}'
Where id=21811221397915

Upsert a user

<p>Creates a new user or updates an existing one. This example demonstrates using the <code>UPSERT INTO</code> statement, which updates the user if they exist (identified by email or external ID) or creates them otherwise.</p>

INSERT INTO Users
(
 name
,email
,organization_id
,phone
,default_group_id
,locale
,moderator
,skip_verify_email
,only_private_comments
,signature
,tags
,time_zone
,role
,external_id
,alias
,details
,notes
,remote_photo_url
,user_fields
)
VALUES(
   'Bob Walton'
  ,'bob@abc.com'
  ,5397098432795
  ,'111-222-3333'
  ,114094762733
  ,'en-US'
  ,'false'
  ,'true' --true=do not send verify account email
  ,1 --user can put only private comments
  ,'Best regards, Support Team' --Only agents and admins can have signatures
  ,'["paid","trial","solved"]' 
  ,'America/New_York'
  ,'end-user' --agent or admin 
  ,'zcrm_1558554000052161270'
  ,'some alias'
  ,'some details'
  ,'some notes'
  ,'https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png' --this does not work in INSERT (works only in UPDATE/UPSERT for now)
  ,'{"birthdate": "1981-01-23", "gender": "M"}'
)

Delete a user

<p>Deletes a user by their ID. Note that this operation typically soft-deletes the user (changes the active flag) rather than permanently removing them immediately.</p>

DELETE FROM Users Where id=21855694556443 --it doesnt delete user from system but only changes active flag

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Read users

<p>Reads all users from the Zendesk account. This example demonstrates querying the <code>Users</code> table. You can optionally filter by ID using the <code>WHERE</code> clause.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Users --Where Id=1234';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];

Create a user

<p>Creates a new user in the <code>Users</code> table. This example demonstrates specifying user details like name, email, role, and custom fields. Note that if a user with the same email exists, the call will fail.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Users
(
 name
,email
,organization_id
,phone
,default_group_id
,locale
,moderator
,skip_verify_email
,only_private_comments
,signature
,tags
,time_zone
,role
,external_id
,alias
,details
,notes
,remote_photo_url
,user_fields
)
VALUES(
   ''Bob Walton''
  ,''bob@abc.com''
  ,5397098432795
  ,''111-222-3333''
  ,114094762733
  ,''en-US''
  ,''false''
  ,''true'' --true=do not send verify account email
  ,1 --user can put only private comments
  ,''Best regards, Support Team'' --Only agents and admins can have signatures
  ,''["paid","trial","solved"]'' 
  ,''America/New_York''
  ,''end-user'' --agent or admin 
  ,''zcrm_1558554000052161270''
  ,''some alias''
  ,''some details''
  ,''some notes''
  ,''https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png'' --this does not work in INSERT (works only in UPDATE/UPSERT for now)
  ,''{"birthdate": "1981-01-23", "gender": "M"}''
)';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];

Update a user

<p>Updates an existing user by their ID. This example demonstrates modifying user properties such as name, email, role, and custom fields using the <code>UPDATE</code> statement.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Users
SET name=''Sam Walton''
  ,email=''sam@abc.com''
  ,organization_id=5397098432795
  ,phone=''111-222-3333''
  ,default_group_id=114094762733
  ,locale=''en-US''
  ,skip_verify_email=''true'' --do not send verify account email
  ,moderator=''false''
  ,only_private_comments=1 --user can put only private comments
  ,signature=''Best regards, Support Team'' --Only agents and admins can have signatures
  ,tags=''["paid","trial","solved"]'' 
  ,time_zone=''America/New_York''
  ,role=''end-user''
  ,external_id=''zcrm_1558554000052161269''
  ,alias=''some alias''
  ,details=''some details''
  ,notes=''some notes''
  ,remote_photo_url=''https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png''
  ,user_fields=''{"birthdate": "1981-01-23", "gender": "M"}''
Where id=21811221397915';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];

Upsert a user

<p>Creates a new user or updates an existing one. This example demonstrates using the <code>UPSERT INTO</code> statement, which updates the user if they exist (identified by email or external ID) or creates them otherwise.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Users
(
 name
,email
,organization_id
,phone
,default_group_id
,locale
,moderator
,skip_verify_email
,only_private_comments
,signature
,tags
,time_zone
,role
,external_id
,alias
,details
,notes
,remote_photo_url
,user_fields
)
VALUES(
   ''Bob Walton''
  ,''bob@abc.com''
  ,5397098432795
  ,''111-222-3333''
  ,114094762733
  ,''en-US''
  ,''false''
  ,''true'' --true=do not send verify account email
  ,1 --user can put only private comments
  ,''Best regards, Support Team'' --Only agents and admins can have signatures
  ,''["paid","trial","solved"]'' 
  ,''America/New_York''
  ,''end-user'' --agent or admin 
  ,''zcrm_1558554000052161270''
  ,''some alias''
  ,''some details''
  ,''some notes''
  ,''https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png'' --this does not work in INSERT (works only in UPDATE/UPSERT for now)
  ,''{"birthdate": "1981-01-23", "gender": "M"}''
)';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];

Delete a user

<p>Deletes a user by their ID. Note that this operation typically soft-deletes the user (changes the active flag) rather than permanently removing them immediately.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Users Where id=21855694556443 --it doesnt delete user from system but only changes active flag';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];