From Bright Pattern Documentation
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 |
| data.item.id | string | Interaction ID | "123123123" |
| data.global_id | string | Global interaction ID (GIID) | "asd234asdf234df" |
| data.phone_number | string | Customer phone number | "4151234567" |
| data.service | string | Name of the service handling the interaction | "Customer Support" |
| data.screenpop_data | string | Information shown on screen-pop | "Case: 123123" |
| data.disposition | string | Disposition of the interaction | "Product sold" |
| data.notes | string | Any notes recorded by the agent for the interaction | "Third time calling this week!" |
| data.recording_url | string | Recording URL (if any) | "http://www.exampleURL.com/123456" |
Example
{
data.item_id: "123123123";
data.global_id: "asd234asdf234df"
data.phone_number: "55511122233"
data.service: "Customer Support"
data.screenpop_data: "Case: 123123"
data.service: "Customer Support";
data.disposition: "Case resolved";
data.notes: "good guy";
data.recording_url: "http://"
}