Skip to content

Commit 498ca56

Browse files
ralf401fliebe92
andauthored
Fixes #712 - Re-added ticket summarize endpoint; changes about API experience
Co-authored-by: Florian Liebe <[email protected]>
1 parent cdc8239 commit 498ca56

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

api/ticket.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ For better overview, they have been split into different sections:
1616
/api/ticket/states
1717
/api/ticket/tags
1818
/api/ticket/index
19+
/api/ticket/ticket-summary
1920
/api/ticket/timeaccounting

api/ticket/ticket-summary.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
Ticket Summary
2+
==============
3+
4+
Show/Trigger
5+
------------
6+
7+
Required permission: ``ticket.agent``
8+
9+
``POST``-Request sent: ``/api/v1/tickets/{ticket id}/summarize``
10+
11+
The ticket summarize endpoint uses ``POST`` because creating and fetching the
12+
summary happen in a single operation:
13+
14+
- If a summary exists, it is returned.
15+
- If a summary does not exist, creation is triggered in the background
16+
(async job).
17+
18+
Using ``GET`` would be incorrect since the call may also create data. If you
19+
want a summary to exist, call the endpoint; if it's not ready yet, retry after
20+
at least 30 seconds.
21+
22+
Sample response if the generation of a new summary was just triggered by the
23+
request:
24+
25+
.. code-block:: json
26+
:force:
27+
28+
// HTTP Code 200 Ok
29+
30+
{
31+
" result": null
32+
}
33+
34+
Sample response for an existing summary (e.g. for the same ticket like above
35+
after waiting until creation has finished):
36+
37+
.. code-block:: json
38+
:force:
39+
40+
// HTTP Code 200 Ok
41+
42+
{
43+
"result": {
44+
"language": "en-US",
45+
"customer_mood": "frustrated",
46+
"open_questions": [],
47+
"upcoming_events": [
48+
"2023-03-15T14:00:00Z"
49+
],
50+
"customer_emotion": "😐",
51+
"customer_request": "complaint wrong delivery of order #51519891",
52+
"conversation_summary": "Customer David Bell complains about the wrong delivery of his order. Agent Emma Taylor responds with a generic apology, but then Christopher Miller takes over and provides more detailed information about the correct items being prepared for shipment.",
53+
"fingerprint_md5": "7a7a3daecf4c93a1460cc9ea6e9168cb",
54+
"relevant_for_current_user": false
55+
}
56+
}

0 commit comments

Comments
 (0)