メインコンテンツへスキップ

Querying Custom Fields

Example Reportsで
作成者一覧
公開日: 2019年6月25日|最終更新日: 2024年8月21日

One of the strengths of Deskpro is the flexibility it provides with the custom fields you can add to tickets.

As the fields are custom though, any you add obviously won't be  referenced in the reporting documentation.

The way we work around this is by using:

tickets.custom_data[#] 
copy


You need to add the field ID to the field and it can be referenced in the same way as other fields in the tickets table such as tickets.id or tickets.status.

Locating the field IDCopy link to Locating the field ID to clipboard

To locate the ticket ID you need to go into the following area in the agent interface:

Admin > Tickets > Fields

And then select the 'Show IDs' option from the UI:

You can see from this that the field reference for the 'Agent names' custom field is #41

ExampleCopy link to Example to clipboard

Based on this if I wanted to run a query showing ticket IDs and the Agent names for those tickets I can run the below:

SELECT  tickets.id, tickets.custom_data[41] FROM tickets
copy
参考になった役に立たない
次のページChat Widget Feedback

コメントを投稿するには、ログインまたは登録が必要です。