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...")
 
Line 30: Line 30:
 
| '''Example'''
 
| '''Example'''
 
|-
 
|-
| data.item.id
+
| item.id
 
| string
 
| string
 
| Interaction ID
 
| Interaction ID
 
| "123123123"
 
| "123123123"
 
|-
 
|-
| data.global_id
+
| global_id
 
| string
 
| string
 
| Global interaction ID (GIID)
 
| Global interaction ID (GIID)
 
| "asd234asdf234df"
 
| "asd234asdf234df"
 
|-
 
|-
| 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)
Line 72: Line 72:
  
 
=== 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>
 
</translate>

Revision as of 00:09, 27 March 2019

• 5.19 • 5.3 • 5.8

<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>

< Previous