Inbound Event (Contact Us) API

Follow

Inbound Event (Contact Us) API
The Inbound Event (Contact Us) API provides a set of functions that allow you to extend your web presence to capture events initiated by your customers and send them into ENGAGEcx.  The API provides the following methods:

Method Description
ContactUsUI.showChat() Used to request the ENGAGEcx chat popup to appear on the web page
ContactUsUI.sendChat() Used to initiate a chat popup from a web form
ContactUsUI.showClick2Call() Used to request the ENGAGEcx Click2CallBack popup to appear on the web page
ContactUsUI.sendClick2Call() Used to initiate a Click2CallBack interaction from a web form
ContactUsUI.showEmail() Used to request the ENGAGEcx e-mail popup to appear on the web page
ContactUsUI.sendEmail() Used to initiate a e-mail interaction from a web form
ContactUsUI.showVmail() Used to request the ENGAGEcx voicemail popup to appear on the web page
ContactUsUI.sendVmail() Used to initiate a voicemail interaction from a web form
ContactUsUI.sendCustom() Used to initiate a custom interaction from a web form
ContactUsUI.sendAction() Used to send a non-interaction event from a web page
ContactUsUI.getContent() Used to retrieve information from ENGAGEcx in the context of a web page

 
The Inbound Event (Contact Us) API relies on jQuery, Sexy and easyXDM external frameworks. References to these libraries are included in the javascript code snippet generated for the ENGAGEcx channel that the interactions are intended to use.  Copy the entire snippet into your web page header.  

 

An example HTML can be found in this article:  Inbound Event (Contact Us) API - Sample.

 



ContactUsUI.showChat
This function is used to request the ENGAGEcx Chat popup to appear on the web page.  

You may change the location or appearance of the Chat popup by including an override CSS file via the cu_css parameter in the java code snippet.  See Article "How to Change the Appearance of Your Drawer via CSS" for more detail.  

The function has two parameters:

Parameter Type Required? More Information
HTML element Element or String N Used to position where the Popup window will appear on the web page. If passed as a string, this parameter must be the ID of an HTML element on the current web page.
Parameter List Object N See details below
Custom Parameter List Object N This list of name/value pairs may be used to pass standard and custom fields as part of the chat interaction.


Parameters in parameter list:  

Parameter Type Required?
username String N
send_transcript Boolean N
email String N
message_text String N
init_chat Boolean N
cu_wfid Number N

If init_chat is true, the chat is immediately initiated and the value of message_text is sent to the server.


A basic example of this function is:

<button onclick="ContactUsUI.showChat()">Show Chat Sample</button>

If your web page has more than one channel, you need to qualify which channel to communicate through using cu_wfid set to the external id of your channel.  You can find the external id in the generated javascript provided for the channel. 

<button onclick="ContactUsUI.showChat(
{cu_wfid:15})">
Show Chat Sample for Channel with cu_wfid 15</button>

 

 



ContactUsUI.sendChat
This function is used to initiate the Chat popup from a web form.  

You may change the location or appearance of the Chat popup by including an override CSS file via the cu_css parameter in the java code snippet.  See Article "How to Change the Appearance of Your Drawer via CSS" for more detail.  

The function has two parameters:

Parameter Type Required? More Information
Parameter List Object N See details below.
Custom Parameter List Object N This list of name/value pairs may be used to pass standard and custom fields as part of the chat interaction.


Parameters in parameter list:  

Parameter Type Required?
username String N
send_transcript Boolean N
email String N
message_text String N
init_chat Boolean N
cu_wfid Number N

If init_chat is true, the chat is immediately initiated and the value of message_text is sent to the server.


A basic example of this function is:

<button onclick="ContactUsUI.sendChat()">Send Chat Sample</button>

If your web page has more than one channel, you need to qualify which channel to communicate through using cu_wfid set to the external id of your channel.  You can find the external id in the generated javascript provided for the channel. 

<button onclick="ContactUsUI.sendChat(
{cu_wfid:15})">
Show Chat Sample for Channel with cu_wfid 15</button>

 

 

ContactUsUI.showClick2Call 
This function is used to request the ENGAGEcx Click 2 Call Back popup to appear on the web page.    You may change the location or appearance of the popup by including an override CSS file via the cu_css parameter in the java code snippet.  See Article " How to Change the Appearance of Your Drawer via CSS" for more detail.  

Parameter Type Required? More Information
HTML element Element or String N Used to position where the Popup window will appear on the web page. If passed as a string, this parameter must be the ID of an HTML element on the current web page.
Parameter List Object N Used to set parameters related to the interaction.
Custom Parameter List Object N This list of name/value pairs may be used to pass standard and custom fields as part of the interaction.


Parameters in parameter list:  

Parameter Type Required?
from_number String N
cu_wfid Number N


A basic example of this function is:

<button onclick="ContactUsUI.showClick2Call()">
Show Click2Call Sample</button>

 


ContactUsUI.sendClick2Call

This function is used to initiate a Click2CallBack interaction from a web form.   

The function has one parameter: 

Parameter Type Required? More Information
Parameter List Object N This is a set of name/value pairs that contain request values and success/error callback functions. 


Parameters in parameter list: 

Parameter Type Required?
from_number String Y
success Function() N
error Function(errors) N


In addition to the fields described above, the parameters object can contain optional parameters of String, Boolean or Numeric types that correlate to your implementation's custom fields.

A basic example of this function is:

function simpleSendClick2Call(){
  ContactUsUI.sendClick2Call({
	from_number: 'PHONE_NUMBER_HERE',});
}

 

 

ContactUsUI.showEmail

This function is used to request the ENGAGEcx eMail popup to appear on the web page.   You may change the location or appearance of the popup by including an override CSS file via the cu_css parameter in the java code snippet.  See Article "How to Change the Appearance of Your Drawer via CSS" for more detail.  

Parameter Type Required? More Information
HTML element Element or String N Used to position where the Popup window will appear on the web page. If passed as a string, this parameter must be the ID of an HTML element on the current web page.
Parameter List Object N Used to set parameters related to the email interaction.


Parameters in parameter list:  

Parameter Type Required?
email String N
subject String N
body_text String N
cu_wfid Number N

A basic example of this function is:
<button onclick="ContactUsUI.showEmail()">Show Email Sample</button>

 

 

ContactUsUI.sendEmail
This function is used to initiate an eMail interaction from a web form.    

The function has one parameter:  

Parameter Type Required? More Information
Parameter List Object N This is a set of name/value pairs that contain request values and success/error callback functions. 


Parameters in parameter list:  

Parameter Type Required?
username String Y
email String Y
body_text String N
subject String N
success Function() N
error Function(errors) N


In addition to the fields described above, the parameters object can contain optional parameters of String, Boolean or Numeric types that correlate to your implementation's custom fields. 

A basic example of this function is:

function simpleSendEmail(){
 	  ContactUsUI.sendEmail({
  		username: 'John Smith',
  		email: 'john.smith@acme.com',
  		body_text: 'This is a sample message from John Smith',
  		subject: 'Contact Us Request',
  		});
	}

 


ContactUsUI.showVmail

This function is used to request the ENGAGEcx voice mail popup to appear on the web page.   You may change the location or appearance of the popup by including an override CSS file via the cu_css parameter in the java code snippet.  See Article "How to Change the Appearance of Your Drawer via CSS" for more detail.  

Parameter Type Required? More Information
HTML element Element or String N Used to position where the Popup window will appear on the web page. If passed as a string, this parameter must be the ID of an HTML element on the current web page.
Parameter List Object N This list may be used to override the drawer parameters set in the header.  You are not likely to set these values unless you are managing interactions for more than one channel on the same web page. 


A basic example of this function is:

<button onclick="ContactUsUI.showVmail()">
Show Vmail Sample</button>

 

 

ContactUsUI.sendVmail
This function is used to initiate a voicemail interaction from a web form.   The function places a phone call from ENGAGEcx to the phone number provided in the from_number field.  When the individual answers the phone call, he or she is prompted to leave a voicemail message. 
The function has one parameter:  

Parameter Type Required? More Information
Parameter List Object N This is a set of name/value pairs that contain request values and success/error callback functions. 


Parameters in parameter list:  

Parameter Type Required?
username String Y
email String Y
body_text String N
subject String N
success Function() N
error Function(errors) N


In addition to the fields described above, the parameters object can contain optional parameters of String, Boolean or Numeric types that correlate to your implementation's custom fields.  
A basic example of this function is:

function simpleSendVoicemail(){
 	  ContactUsUI.sendVmail({
  		from_number: 'PHONE_NUMBER_HERE',});
}

 

 

ContactUsUI.sendCustom
This function is used to initiate a custom live or custom nonlive interaction from a web form. 
The function has one parameter:  

Parameter Type Required? More Information
Parameter List Object N This is a set of name/value pairs that contain request values and success/error callback functions. 


Parameters in parameter list:  

Parameter Type Required?
mediaType String
'custom-live'
'custom-nonlive'
Y
cu_wfid Number N
success Function() N
error Function(errors) N


In addition to the fields described above, the parameters object can contain optional parameters of String, Boolean or Numeric types that correlate to your implementation's custom and standard fields.  
A basic example of this function is:

function simpleSendCustom(){
  ContactUsUI.sendCustom({
    mediaType: 'custom-live',
    a_custom_field: 'Custom Field Value',});
}

 

 

ContactUsUI.sendAction
This function is used to send non-interaction events from a web page. 
The function has one parameter:  

Parameter Type Required? More Information
Parameter List Object N This is a set of name/value pairs that contain request values and success/error callback functions. 


Parameters in parameter list:  

Parameter Type Required?
cu_wfid Number N
success Function() N
error Function(errors) N


In addition to the fields described above, the parameters object can contain optional parameters of String, Boolean or Numeric types that correlate to your implementation's custom and standard fields.  
A basic example of this function is:

function simpleSendCustom(){
  ContactUsUI.sendAction({
    A_CUSTOM_FIELD: 'Custom Field Value',});
}

 

 

ContactUsUI.getContent
This function is used to retrieve information from ENGAGEcx from a web page. The success function is called with the content received from ENGAGAEcx. Note that the channel called with this method must be a Content Only channel.
The function has one parameter:  

Parameter Type Required? More Information
Parameter List Object N This is a set of name/value pairs that contain request values and success/error callback functions. 


Parameters in parameter list:  

Parameter Type Required?
cu_wfid Number N
success Function(data) N
error Function(errors) N


In addition to the fields described above, the parameters object can contain optional parameters of String, Boolean or Numeric types that correlate to your implementation's custom and standard fields.  
A basic example of this function is:

function simpleSendCustom(){
  ContactUsUI.getContent({
    A_CUSTOM_FIELD: 'Custom Field Value',
    success: function(data) {getContent_done(data)}
  });
}

 

 

Additional Options

Parameter Description
skip_custom_pages If the skip_custom_pages property of the Custom Parameter List object of any show function call is set to false, any drawer display pages defined in the channel configuration will not be shown to the individual.
 
Have more questions? Submit a request

Comments

Powered by Zendesk