From Bright Pattern Documentation
(Created page with "<translate> = addInteractionCompletedHandler(callback) = Gets information about a completed interaction. == Request == === Syntax === window.bpspat.api.addInteractionComplet...") |
|||
Line 30: | Line 30: | ||
| '''Example''' | | '''Example''' | ||
|- | |- | ||
− | | | + | | item.id |
| string | | string | ||
| Interaction ID | | Interaction ID | ||
| "123123123" | | "123123123" | ||
|- | |- | ||
− | | | + | | global_id |
| string | | string | ||
| Global interaction ID (GIID) | | Global interaction ID (GIID) | ||
| "asd234asdf234df" | | "asd234asdf234df" | ||
|- | |- | ||
− | | | + | | phone_number |
| string | | string | ||
| Customer phone number | | Customer phone number | ||
| "4151234567" | | "4151234567" | ||
|- | |- | ||
− | | | + | | service |
| string | | string | ||
| Name of the service handling the interaction | | Name of the service handling the interaction | ||
| "Customer Support" | | "Customer Support" | ||
|- | |- | ||
− | | | + | | screenpop_data |
| string | | string | ||
| Information shown on screen-pop | | Information shown on screen-pop | ||
| "Case: 123123" | | "Case: 123123" | ||
|- | |- | ||
− | | | + | | disposition |
| string | | string | ||
| Disposition of the interaction | | Disposition of the interaction | ||
| "Product sold" | | "Product sold" | ||
|- | |- | ||
− | | | + | | notes |
| string | | string | ||
| Any notes recorded by the agent for the interaction | | Any notes recorded by the agent for the interaction | ||
| "Third time calling this week!" | | "Third time calling this week!" | ||
|- | |- | ||
− | | | + | | recording_url |
| string | | string | ||
| Recording URL (if any) | | Recording URL (if any) | ||
Line 72: | Line 72: | ||
=== Example === | === Example === | ||
+ | <syntaxhighlight lang="json"> | ||
{ | { | ||
− | + | "command": "INTERACTION_COMPLETED", | |
− | + | "data": { | |
− | + | "item_id": "5AA90906-ECA9-4587-8F98-5A9D859AB3D9", | |
− | + | "global_id": "A39ECD09-28A2-4F25-8681-F4W76FE1288B", | |
− | + | "service": "Maintenance Renewal_MS", | |
− | + | "phone_number": "19289599406", | |
− | + | "screenpop_data": { | |
− | + | ||
− | + | }, | |
− | + | "disposition": "Silence", | |
+ | "recording_url": "\/msgplayback?tenant_id=1G64131D-C1C4-4A57-8SC4-B6B2ED7412C8&rtp_processor_id=7C0DCA41-F507-82B9-9D40-0E3B9F302K9F&message=recordings\/example.brightpattern.com\/2019-03-27\/BF9CD8C1-BAC1-4218-A4B7-D264D3DA0A71&key_id=D811QFBA-5F8A-4AE5-A80C-8F07B7372BEF&CRC=f0fbca89588f9ffdf52c521967a0cda3" | ||
+ | } | ||
} | } | ||
− | + | </syntaxhighlight> | |
</translate> | </translate> |
Revision as of 00:09, 27 March 2019
<translate>
addInteractionCompletedHandler(callback)
Gets information about a completed interaction.
Request
Syntax
window.bpspat.api.addInteractionCompletedHandler(callback) callback = function(data) { }
Arguments
Parameter | Type | Description |
callback | function | JavaScript method executed when API method request is completed |
Response
The response object may contain the following fields.
Name | Data Type | Description | Example |
item.id | string | Interaction ID | "123123123" |
global_id | string | Global interaction ID (GIID) | "asd234asdf234df" |
phone_number | string | Customer phone number | "4151234567" |
service | string | Name of the service handling the interaction | "Customer Support" |
screenpop_data | string | Information shown on screen-pop | "Case: 123123" |
disposition | string | Disposition of the interaction | "Product sold" |
notes | string | Any notes recorded by the agent for the interaction | "Third time calling this week!" |
recording_url | string | Recording URL (if any) | "http://www.exampleURL.com/123456" |
Example
{
"command": "INTERACTION_COMPLETED",
"data": {
"item_id": "5AA90906-ECA9-4587-8F98-5A9D859AB3D9",
"global_id": "A39ECD09-28A2-4F25-8681-F4W76FE1288B",
"service": "Maintenance Renewal_MS",
"phone_number": "19289599406",
"screenpop_data": {
},
"disposition": "Silence",
"recording_url": "\/msgplayback?tenant_id=1G64131D-C1C4-4A57-8SC4-B6B2ED7412C8&rtp_processor_id=7C0DCA41-F507-82B9-9D40-0E3B9F302K9F&message=recordings\/example.brightpattern.com\/2019-03-27\/BF9CD8C1-BAC1-4218-A4B7-D264D3DA0A71&key_id=D811QFBA-5F8A-4AE5-A80C-8F07B7372BEF&CRC=f0fbca89588f9ffdf52c521967a0cda3"
}
}
</translate>