From Bright Pattern Documentation
Jump to: navigation, search
Tracy (talk | contribs)
Created page with "<translate> = addInteractionRenderedHandler(callback) = Gets information about an active interaction. == Request == === Syntax === window.bpspat.api.addInteractionRenderedHa..."
 
Tracy (talk | contribs)
No edit summary
Line 30: Line 30:
| '''Example'''
| '''Example'''
|-
|-
| data.item.id
| item.id
| string
| string
| Interaction ID
| Interaction ID
| "121212121"
| "121212121"
|-
|-
| 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
| "Inbound Voice"
| "Inbound Voice"
|-
|-
| data.screenpop_data
| screenpop_data
| string
| string
| Information shown on screen-pop
| Information shown on screen-pop
Line 57: Line 57:


=== Example ===
=== Example ===
<syntaxhighlight lang="json">
  {
  {
data.item_id: "123123123";
  "command": "INTERACTION_RENDERED",
data.global_id: "asd234asdf234df"
  "data": {
data.phone_number: "55511122233"
    "item_id": "5AA90906-ECB9-4597-8F98-5A9D859AB3D9",
data.service: "Customer Support"
    "global_id": "A39ECF09-28A2-4F25-8681-F4D76FE1288B",
data.screenpop_data: "Case: 123123"
    "service": "Maintenance Renewal_MS",
data.service: "Customer Support";
    "phone_number": "19294599406",
  }  
    "screenpop_data": {
 
    }
  }
  }
</syntaxhighlight>





Revision as of 00:05, 27 March 2019

<translate>

addInteractionRenderedHandler(callback)

Gets information about an active interaction.

Request

Syntax

window.bpspat.api.addInteractionRenderedHandler(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 "121212121"
global_id string Global interaction ID (GIID) "asd234asdf234df"
phone_number string Customer phone number "4151234567"
service string Name of the service handling the interaction "Inbound Voice"
screenpop_data string Information shown on screen-pop "Case: 123123"

Example

 {
  "command": "INTERACTION_RENDERED",
  "data": {
    "item_id": "5AA90906-ECB9-4597-8F98-5A9D859AB3D9",
    "global_id": "A39ECF09-28A2-4F25-8681-F4D76FE1288B",
    "service": "Maintenance Renewal_MS",
    "phone_number": "19294599406",
    "screenpop_data": {
    }
  }
 }



</translate>

< Previous | Next >