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.
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.
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.
HTTP POST
or HTTP GET
. Regardless of the request method, Twilio sends the same request headers and payload to your webhook URL.To learn more about testing your configuration, see Getting Started with Twilio Webhooks.
The webhook will trigger when either of the following events occurs:
Event | Description |
---|---|
note_created | Triggers when a note is created. This includes when the note is auto-generated, or if an agent chooses to manually enter a note instead. |
note_updated | Triggers when an agent clicks Complete. Any updates or edits to the auto-generated note are included in the event payload. |
Payload sent when a note is created in Flex.
Example response
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"type": "wrapup",17"date_created": "2024-01-17T21:09:00Z",18"date_updated": "2024-01-17T21:09:00Z",19"version": 1,20"context": {21"task_sid": "WTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"22}23}
Payload sent when an agent edits or updates a note in Flex.
Example response
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"type": "wrapup",17"date_created": "2024-01-17T21:09:42Z",18"date_updated": "2024-01-17T21:09:00Z",19"version": 2,20"context": {21"task_sid": "WTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"22}23}
Property | Description |
---|---|
sid | Note identifier. |
event_type | The type of action that triggered this webhook event. Either note_created or note_updated . |
instance_sid | Flex instance identifier. |
channel_sid | Interaction channel identifier. |
participant_sid | (Optional) Identifier for the agent who creates the note. |
profile_connect_sid | (Optional) Customer Profile identifier. |
summary | (Optional) The summary content. Value is the summary present when an agent clicks Complete. Can be auto-generated or edited by the agent. |
sentiment | (Optional) The customer sentiment associated with the channel. Value is the sentiment present when an agent clicks Complete. Can be auto-generated or edited by the agent. Values can be: Positive , Neutral , Negative . |
disposition_code_sid | (Optional) The unique ID of a disposition code resource associated with the outcome of a channel. Value is the disposition code present when an agent clicks Complete. Can be auto-generated or edited by the agent. |
generated_summary | Summary generated by the LLM. |
detected_language | The supported language detected by the LLM. Values can be en-US , es-MX , and pt-BR . |
generated_sentiment | The customer sentiment associated with the channel. Generated by the LLM. Values can be: Positive , Neutral , Negative . |
generated_disposition_code_sid | The unique ID of a disposition code resource associated with the outcome of a channel. Generated by the LLM. |
type | Type of the note. Currently can be wrapup . |
date_created | Date note was created. ISO8601 time. |
date_updated | Last modification date of the note. ISO8601 time. |
version | The version of the wrap-up note resource. |
context.task_sid | Unique task identifier. |
Values can be:
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 generated contains all necessary information to retry wrap-up notes. To learn more, see Debugging Webhook Events.
Some frontend errors you may encounter are:
Error case | Error name | Agent action |
---|---|---|
Notes failed to generate | 45600 - Flex UI error | Add notes manually then complete task |
Notes submission failed | 45600 - Flex UI error | Click complete without notes or dismiss error and try again |