The via object tells you how or why an action or event was created. The following resources in the Support REST API use the via object:
Via objects have the following properties:
Name | Type | Comment |
---|---|---|
channel | string | This tells you how the ticket or event was created. Examples: "web", "mobile", "rule", "system" |
source | object | For some channels a source object gives more information about how or why the ticket or event was created |
Example
"via": {
"channel": "rule",
"source": {
"to": { },
"from": {
"id": 22472716,
"title": "Assign to first responder"
},
"rel": "trigger"
}
}
The source
attribute gives more information about the source of the ticket. It consists of from
, to
, and rel
attributes. Examples:
source | from | to | rel |
---|---|---|---|
an email | address, name, original_recipients | address, name | null |
"Submit a request" on website | null | ||
Zendesk widget | zendesk_widget | ||
Feedback tab | feedback_tab | ||
Zendesk mobile agent apps | mobile | ||
API - ticket sharing | api | ||
API - ticket endpoints | null | ||
API - follow-up ticket | ticket_id, subject | follow_up | |
Business rule (trigger) | id, title, deleted, revision_id (Enterprise) | trigger | |
Business rule (automation) | id, title, deleted | automation | |
a forum topic | topic_id, topic_name | null | |
a Twitter message or mention | profile_url, username, name | profile_url, username, name | direct_message |
a chat | null | ||
a chat offline message | chat_offline_message | ||
a call | phone, formatted_phone, name | phone, formatted_phone, name | voicemail, inbound, or outbound |
a Facebook post or message | name, profile_url, facebook_id | name, profile_url, facebook_id | post or message |
system - ticket merged | ticket_id, subject | merge | |
system - ticket follow-up | ticket_id, subject | follow_up | |
system - problem ticket solved | ticket_id, subject | problem | |
AnyChannel | service_info, supports_channelback, supports_clickthrough, registered_integration_service_name |
10 Comments
Hello, Darren Chan
Is there any definition of "original_recipients" in email from? I'd like to know when this parameter filled and what kind of value in it.
Hi Megumi. Definitions for that attribute are here:
The Via Object
...with an example of what's returned here:
List Email CCs for a Comment
Hello Bryan, Thank you for the answer.
Is "original_recipients" always filled in the ticket via "email"? I found a ticket that does not have "original_recipients".
Yes, this attribute is filled in when "email".
I'm using the Zendesk API to create new tickets arrived in another ticketing system.
I try to use the "via" attribute to customize the displayed via text in the Zendesk front end's ticket detailpage. Whatever I set for the "via" attribute, it's replaced with "channel": "api" and in the front end the agents see "from Zendesk support"... actually there should be something like "from XY" so that our agents see where the ticket is actually coming from.
Is that somehow possible?
Hi Andy Loeber,
Setting "via" is very limited — in this case, because it sounds like you're going through POST /api/v2/tickets, the system sets it and you don't have control.
It's more of an indicator of the entry point into Zendesk (in this case the API), rather than what external system the data might be coming from.
Even for APIs that can set it (example: POST /api/v2/channels/voice/tickets.json) the options are limited.
Hi @...
Thank you for your answer. This coincides with my observations.
As a solution I put some recognizable extra text in the ticket's subject so that our agents can recognize that the ticket's coming from external.
Hi. I am trying to get the email address that was used to complete a web_widget form, but it doesn't exist in the via>source>from attribute (as confirmed in the table above). The email address does existing on the ticket within ZenDesk, but I cannot see how to get it through the API. Can anyone shed some light on this please?
Hi Tommy Newman! In order to get the email address in this case, you would need to pull the requester_ID attribute in Tickets and then you could make a request to the User's API to grab that from the email attribute.
Perfect, that worked! Thanks so much
Please sign in to leave a comment.