Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM

On this page
Looking for more inspiration?Visit the

Agent Copilot: wrap-up notes webhook (public beta)


(new)

Public Beta

Agent Copilot is currently available as a Public Beta product and the information contained in this document is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by a SLA.

(warning)

Not a HIPAA Eligible Service or PCI Compliant

Agent Copilot is not a HIPAA Eligible Service or PCI compliant and should not be used in Flex workflows that are subject to HIPAA or PCI. However, we offer mitigation tools such as PII redaction. To learn more, see AI data use.


Overview

overview page anchor

You can use a webhook so that notes flow from Flex to your own system, like a CRM or database. When a note is created and an agent clicks Complete, Twilio sends your web application an HTTP request to the URL you specify.

To learn more about Agent Copilot, see Agent Copilot for administrators.


  1. In Twilio Console(link takes you to an external page), go to Flex > AI features > Agent Copilot.
  2. Under Wrap-up notes, click Manage auto-generation service.
  3. Under Wrap-up notes webhook URL, enter your URL where you'd like data sent.
  4. Select your preferred method: HTTP POST or HTTP GET. Regardless of the request method, Twilio sends the same request headers and payload to your webhook URL.
  5. Click Save.
  6. To receive data, make sure to validate the request against the signature.

To learn more about testing your configuration, see Getting Started with Twilio Webhooks.


The webhook will trigger when either of the following events occurs:

EventDescription
note_createdTriggers when you create a note. This includes when the note is auto-generated, or if an agent chooses to enter a note instead.
note_updatedTriggers when an agent clicks Complete. The event payload includes any updates or edits to the auto-generated note.

note_created event

note_created-event page anchor

When you create a note in Flex, Flex sends this payload.

Example note created event response

example-note-created-event-response page anchor
1
{
2
"sid": "KQxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
3
"event_type": "note_created",
4
"instance_sid": "GOxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
5
"interaction_sid": "KDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
6
"channel_sid": "UOxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
7
"participant_sid": "UTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
8
"profile_connect_sid": "YIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
9
"summary": null,
10
"sentiment": null,
11
"disposition_code_sid": null,
12
"generated_summary": "The customer requested a return for a shoe.",
13
"detected_language": "en-US",
14
"generated_sentiment": "neutral",
15
"generated_disposition_code_sid": null,
16
"codes": {
17
"generated": [
18
{
19
"disposition_code": "DC Name",
20
"topic_path": "Topic 1|Sub Topic 2"
21
}
22
],
23
"selected": [
24
{
25
"disposition_code": "DC Name",
26
"topic_path": "Topic 1|Sub Topic 2"
27
}
28
]
29
},
30
"type": "wrapup",
31
"date_created": "2024-01-17T21:09:00Z",
32
"date_updated": "2024-01-17T21:09:00Z",
33
"version": 1,
34
"context": {
35
"task_sid": "WTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
36
}
37
}

When an agent edits or updates a note in Flex, Flex sends this payload.

Example note updated event response

example-note-updated-event-response page anchor
1
{
2
"sid": "KQxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
3
"event_type": "note_updated",
4
"instance_sid": "GOxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
5
"interaction_sid": "KDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
6
"channel_sid": "UOxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
7
"participant_sid": "UTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
8
"profile_connect_sid": "YIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
9
"summary": "test1",
10
"sentiment": "positive",
11
"disposition_code_sid": null,
12
"generated_summary": "The customer requested a return for a shoe.",
13
"detected_language": "en-US",
14
"generated_sentiment": "neutral",
15
"generated_disposition_code_sid": null,
16
"codes": {
17
"generated": [
18
{
19
"disposition_code": "DC Name",
20
"topic_path": "Topic 1|Sub Topic 2"
21
}
22
],
23
"selected": [
24
{
25
"disposition_code": "DC Name",
26
"topic_path": "Topic 1|Sub Topic 1"
27
}
28
]
29
},
30
"type": "wrapup",
31
"date_created": "2024-01-17T21:09:42Z",
32
"date_updated": "2024-01-17T21:09:00Z",
33
"version": 2,
34
"context": {
35
"task_sid": "WTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
36
}
37
}
PropertyNecessityDescriptionAccepted valuesChar Limit
sidRequiredThe unique identifier applied to the note.
event_typeRequiredThe type of action that triggered this webhook event.note_created,note_updated
instance_sidRequiredThe unique identifier applied to the Flex instance.
channel_sidRequiredThe unique identifier applied to the interaction channel.
participant_sidOptionalThe unique identifier applied to the agent who creates the note.
profile_connect_sidOptionalThe unique identifier applied to the customer profile.
summaryOptionalA summary generated of the note content.3000
sentimentOptionalThe customer sentiment generated and associated with the channel.Positive,Neutral,Negative
disposition_code_sidOptionalThe unique identifier of the disposition code resource generated and associated with the outcome of a channel.
generated_summaryRequiredThe summary that the large language model (LLM) generated.
detected_languageRequiredThe supported language that the LLM detected.en-US,es-MX,pt-BR
generated_sentimentRequiredThe customer sentiment that the LLM generated then associated with the channel.Positive,Neutral,Negative
generated_disposition_code_sidRequiredThe unique identifier of a disposition code resource that the LLM generated then associated with the outcome of a channel.
codes.generated.disposition_codeRequiredThe generated disposition codesapplied to the note.
codes.generated.topic_pathRequiredThe topic path for the note represented as a combined string of topic and subtopic separated with a pipe character (|).
codes.selected.disposition_codeRequiredThe chosen disposition code applied to the note.
codes.selected.topic_pathRequiredThe topic path for the note represented as a combined string of topic and subtopic separated with a pipe character (|).
typeRequiredThe type defined for the note.wrapup
date_createdRequiredTimestamp when the note got created in the ISO8601 format.
date_updatedRequiredTimestamp when the note got modified in the ISO8601 format.
versionRequiredThe version of the wrap-up note resource.
context.task_sidRequiredThe unique identifier applied to the task.

Agent Copilot can generate 20 notes per second. If you hit the rate limit, you'll see a 429 error.


If the webhook fails, the default behavior is to retry once. You can override this behavior as instructed in Webhooks (HTTP callbacks): Connection Overrides.

In Console Debugger, you can configure an optional webhook to receive data about errors in real-time. The debugger event(link takes you to an external page) generated contains all necessary information to retry wrap-up notes. To learn more, see Debugging Webhook Events.

Frontend errors return the 45600 - Flex UI error. The error cases include:

Error caseAgent action
Notes failed to generateAdd notes manually then complete task
Notes submission failedClick complete without notes or dismiss error and try again