Endpoint Create Tickets (Bulk)
Name
post_tickets
Description
Create tickets in bulk (job is queued) and wait until done. This is faster than one request at a time [API reference]
Related Tables
Parameters
| Parameter | Required | Options | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no parameters | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| job_id |
DT_WSTR
|
nvarchar(100)
|
100 | |
| message |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
| total |
DT_I4
|
int
|
||
| status |
DT_WSTR
|
nvarchar(50)
|
50 | |
| url |
DT_WSTR
|
nvarchar(500)
|
500 | |
| account_id |
DT_I8
|
bigint
|
||
| ticket_id |
DT_I8
|
bigint
|
||
| index |
DT_I4
|
int
|
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| subject |
DT_WSTR
|
nvarchar(1012)
|
1012 | |
| recipient |
DT_WSTR
|
nvarchar(255)
|
255 | |
| status |
DT_WSTR
|
nvarchar(28)
|
28 | |
| type |
DT_WSTR
|
nvarchar(255)
|
255 | |
| priority |
DT_WSTR
|
nvarchar(24)
|
24 | |
| comment_body |
DT_NTEXT
|
nvarchar(MAX)
|
||
| comment_body_html |
DT_NTEXT
|
nvarchar(MAX)
|
||
| comment_public |
DT_BOOL
|
bit
|
||
| comment_author_id |
DT_I8
|
bigint
|
||
| tags |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| additional_tags |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| remove_tags |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| external_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| requester_name |
DT_WSTR
|
nvarchar(255)
|
255 | |
| requester_email |
DT_WSTR
|
nvarchar(255)
|
255 | |
| requester_id |
DT_I8
|
bigint
|
||
| submitter_id |
DT_I8
|
bigint
|
||
| assignee_id |
DT_I8
|
bigint
|
||
| organization_id |
DT_I8
|
bigint
|
||
| group_id |
DT_I8
|
bigint
|
||
| collaborator_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| follower_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| email_cc_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| forum_topic_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| problem_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| is_public |
DT_BOOL
|
bit
|
||
| due_at |
DT_DBTIMESTAMP
|
datetime
|
||
| sharing_agreement_ids |
DT_WSTR
|
nvarchar(255)
|
255 | |
| fields |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| followup_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| brand_id |
DT_I8
|
bigint
|
||
| allow_channelback |
DT_BOOL
|
bit
|
||
| allow_attachments |
DT_BOOL
|
bit
|
Examples
SSIS
Use Zendesk Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Destination
This Endpoint belongs to the Tickets (Bulk) table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to create tickets:
| There are no parameters to configure. |
ODBC application
Use these SQL queries in your ODBC application data source:
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"
}
]'
)
post_tickets endpoint belongs to
Tickets_Bulk
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data 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];
post_tickets endpoint belongs to
Tickets_Bulk
table(s), and can therefore be used via those table(s).