From Bright Pattern Documentation
Jump to: navigation, search
(Created page with "<translate> = addInteractionCompletedHandler(callback) = Gets information about a completed interaction. == Request == === Syntax === window.bpspat.api.addInteractionComplet...")
 
(Updated via BpDeleteTranslateTags script)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<translate>
+
 
 
= addInteractionCompletedHandler(callback) =
 
= addInteractionCompletedHandler(callback) =
 
Gets information about a completed interaction.
 
Gets information about a completed interaction.
Line 30: Line 30:
 
| '''Example'''
 
| '''Example'''
 
|-
 
|-
| data.item.id
+
| item_id
 
| string
 
| string
 
| Interaction ID
 
| Interaction ID
| "123123123"
+
| "5AA90906-ECA9-4587-8F98-5A9D859AB3D9"
 
|-
 
|-
| data.global_id
+
| global_id
 
| string
 
| string
 
| Global interaction ID (GIID)
 
| Global interaction ID (GIID)
| "asd234asdf234df"
+
| "A39ECD09-28A2-4F25-8681-F4W76FE1288B"
 
|-
 
|-
| data.phone_number
+
| phone_number
 
| string
 
| string
 
| Customer phone number
 
| Customer phone number
 
| "4151234567"
 
| "4151234567"
 
|-
 
|-
| data.service
+
| service
 
| string
 
| string
 
| Name of the service handling the interaction
 
| Name of the service handling the interaction
 
| "Customer Support"
 
| "Customer Support"
 
|-
 
|-
| data.screenpop_data
+
| screenpop_data
 
| string
 
| string
 
| Information shown on screen-pop
 
| Information shown on screen-pop
 
| "Case: 123123"
 
| "Case: 123123"
 
|-
 
|-
| data.disposition
+
| disposition
 
| string
 
| string
 
| Disposition of the interaction
 
| Disposition of the interaction
 
| "Product sold"
 
| "Product sold"
 
|-
 
|-
| data.notes
+
| 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!"
 
|-
 
|-
| data.recording_url
+
| recording_url
 
| string
 
| string
 
| Recording URL (if any)
 
| Recording URL (if any)
| "http://www.exampleURL.com/123456"
+
| "\/msgplayback?tenant_id=1G64...cda3"
 
|}
 
|}
  
 
=== Example ===
 
=== Example ===
 +
<syntaxhighlight lang="json">
 
  {
 
  {
data.item_id: "123123123";
+
  "command": "INTERACTION_COMPLETED",
data.global_id: "asd234asdf234df"
+
  "data": {
data.phone_number: "55511122233"
+
    "item_id": "5AA90906-ECA9-4587-8F98-5A9D859AB3D9",
data.service: "Customer Support"
+
    "global_id": "A39ECD09-28A2-4F25-8681-F4W76FE1288B",
data.screenpop_data: "Case: 123123"
+
    "service": "Maintenance Renewal_MS",
data.service: "Customer Support";
+
    "phone_number": "19289599406",
+
    "screenpop_data": {
data.disposition: "Case resolved";
+
     
data.notes: "good guy";
+
    },
data.recording_url: "http://"
+
    "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>
 

Latest revision as of 04:02, 29 May 2024

• 5.19 • 5.3 • 5.8


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 "5AA90906-ECA9-4587-8F98-5A9D859AB3D9"
global_id string Global interaction ID (GIID) "A39ECD09-28A2-4F25-8681-F4W76FE1288B"
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) "\/msgplayback?tenant_id=1G64...cda3"

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"
  }
 }
< Previous