Reference

Table Tickets_Bulk


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_tickets
INSERT post_tickets
UPDATE put_tickets
UPSERT
DELETE delete_tickets
LOOKUP get_tickets_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 Tickets (Bulk) table using API Source

API Source - Zendesk
Read and write Zendesk data effortlessly. Manage tickets, users, and organizations — almost no coding required.
Zendesk
Tickets (Bulk)
Optional Parameters
Sort By
Sort Order
Extra Columns to Include
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 Tickets (Bulk) table using API Destination

API Destination - Zendesk
Read and write Zendesk data effortlessly. Manage tickets, users, and organizations — almost no coding required.
Zendesk
Tickets (Bulk)
Select
Optional Parameters
Sort By
Sort Order
Extra Columns to Include
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:

Bulk delete tickets using ID list

<p>Deletes multiple tickets by specifying a comma-separated list of IDs. This example demonstrates using the <code>Tickets_Bulk</code> table and passing a list of IDs (max 100) in the <code>WHERE</code> clause.</p>

DELETE FROM Tickets_Bulk WHERE [$$ticket_ids]='111,222,333'

Update ticket tags

<p>Adds or removes tags from a ticket. This example demonstrates using <code>additional_tags</code> to add tags and <code>remove_tags</code> to remove them via the <code>Tickets_Bulk</code> table.</p>

Update Tickets_Bulk 
SET subject='New subject'
  , additional_tags ='["new-tag1","new-tag2"]' --//add some tags
  --, remove_tags='["old-tag1","old-tag2"]' --//removes some tags
  --, tags='["tag1","tag2"]' --//overwrite all tags
  , status='pending' --new, solved, closed
Where Id = 1234

Bulk create tickets using raw JSON

<p>Creates multiple tickets by supplying a JSON array of ticket objects. This example demonstrates using the <code>_rawdoc_</code> column with the <code>Tickets_Bulk</code> table to insert multiple tickets at once.</p>

INSERT INTO Tickets_Bulk(_rawdoc_) 
VALUES(
  '[
    {
      "subject": "Test ticket #1",    
      "comment": {
        "body": "Test ticket #1"
      },
      "priority": "urgent"
    },
    {
      "subject": "Test ticket #2",    
      "comment": {
        "body": "This is a comment for #2"
      },
      "priority": "normal"
    }
  ]'
)

SQL Server

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

Bulk delete tickets using ID list

<p>Deletes multiple tickets by specifying a comma-separated list of IDs. This example demonstrates using the <code>Tickets_Bulk</code> table and passing a list of IDs (max 100) in the <code>WHERE</code> clause.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Tickets_Bulk WHERE [$$ticket_ids]=''111,222,333''';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];

Update ticket tags

<p>Adds or removes tags from a ticket. This example demonstrates using <code>additional_tags</code> to add tags and <code>remove_tags</code> to remove them via the <code>Tickets_Bulk</code> table.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'Update Tickets_Bulk 
SET subject=''New subject''
  , additional_tags =''["new-tag1","new-tag2"]'' --//add some tags
  --, remove_tags=''["old-tag1","old-tag2"]'' --//removes some tags
  --, tags=''["tag1","tag2"]'' --//overwrite all tags
  , status=''pending'' --new, solved, closed
Where Id = 1234';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];

Bulk create tickets using raw JSON

<p>Creates multiple tickets by supplying a JSON array of ticket objects. This example demonstrates using the <code>_rawdoc_</code> column with the <code>Tickets_Bulk</code> table to insert multiple tickets at once.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Tickets_Bulk(_rawdoc_) 
VALUES(
  ''[
    {
      "subject": "Test ticket #1",    
      "comment": {
        "body": "Test ticket #1"
      },
      "priority": "urgent"
    },
    {
      "subject": "Test ticket #2",    
      "comment": {
        "body": "This is a comment for #2"
      },
      "priority": "normal"
    }
  ]''
)';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];