From Bright Pattern Documentation
Jump to: navigation, search
(Created page with "<translate> = Call Flow = Call Flow consists of two methods that get information about an interaction that is active or completed. == Add Interaction Rendered Handler == Gets...")
 
(Updated via BpDeleteTranslateTags script)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
<translate>
 
= Call Flow =
 
Call Flow consists of two methods that get information about an interaction that is active or completed.
 
  
== Add Interaction Rendered Handler ==
+
= addInteractionRenderedHandler(callback) =
 
Gets information about an active interaction.
 
Gets information about an active interaction.
  
 +
== Request ==
 
=== Syntax ===
 
=== Syntax ===
 
  window.bpspat.api.addInteractionRenderedHandler(callback)
 
  window.bpspat.api.addInteractionRenderedHandler(callback)
Line 11: Line 9:
 
  }  
 
  }  
  
=== Parameters ===
+
=== Arguments ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
| '''Parameter'''
 
| '''Parameter'''
Line 18: Line 16:
 
|-
 
|-
 
| callback
 
| callback
| function (data)
+
| function
 
| JavaScript method executed when API method request is completed
 
| JavaScript method executed when API method request is completed
 
|}
 
|}
  
== Response ==
 
The response object contains the following fields.
 
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
| '''Name'''
 
| '''Description'''
 
|-
 
| data.item.id
 
| interaction ID (string)
 
|-
 
| data.global_id
 
| global interaction ID (GIID; string)
 
|-
 
| data.phone_number
 
| customer phone number
 
|-
 
| data.service
 
| name of the service handling the interaction
 
|-
 
| data.screenpop_data
 
| information shown on screen-pop
 
|}
 
 
=== 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";
 
}
 
 
 
== Add Interaction Completed Handler ==
 
Gets information about a completed interaction.
 
 
=== Syntax ===
 
window.bpspat.api.addInteractionCompletedHandler(callback)
 
callback = function(data) {
 
}
 
 
=== Parameters ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
| '''Parameter'''
 
| '''Type'''
 
| '''Description'''
 
|-
 
| callback
 
| function (data)
 
| JavaScript method executed when API method request is completed
 
|}
 
  
 
== Response ==
 
== Response ==
The response object contains the following fields.
+
The response object may contain the following fields.
  
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
| '''Name'''
 
| '''Name'''
 +
| '''Data Type'''
 
| '''Description'''
 
| '''Description'''
 +
| '''Example'''
 
|-
 
|-
 
| data.item.id
 
| data.item.id
| interaction ID (string)
+
| string
 +
| Interaction ID
 +
| "121212121"
 
|-
 
|-
 
| data.global_id
 
| data.global_id
| global interaction ID (GIID; string)
+
| string
 +
| Global interaction ID (GIID)
 +
| "asd234asdf234df"
 
|-
 
|-
 
| data.phone_number
 
| data.phone_number
| customer phone number
+
| string
 +
| Customer phone number
 +
| "4151234567"
 
|-
 
|-
 
| data.service
 
| data.service
| name of the service handling the interaction
+
| string
 +
| Name of the service handling the interaction
 +
| "Inbound Voice"
 
|-
 
|-
 
| data.screenpop_data
 
| data.screenpop_data
| information shown on screen-pop
+
| string
|-
+
| Information shown on screen-pop
| data.disposition
+
| "Case: 123123"
| disposition of the interaction
 
|-
 
| data.notes
 
| any notes recorded by the agent for the interaction
 
|-
 
| data.recording_url
 
| recording URL (if any)
 
 
|}
 
|}
  
Line 115: Line 64:
 
  data.screenpop_data: "Case: 123123"
 
  data.screenpop_data: "Case: 123123"
 
  data.service: "Customer Support";
 
  data.service: "Customer Support";
 
data.disposition: "Case resolved";
 
data.notes: "good guy";
 
data.recording_url: "http://"
 
 
  }
 
  }
 
 
 
</translate>
 

Latest revision as of 04:02, 29 May 2024

• 5.19 • 5.3 • 5.8


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
data.item.id string Interaction ID "121212121"
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 "Inbound Voice"
data.screenpop_data string Information shown on screen-pop "Case: 123123"

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

}

< Previous | Next >