Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

APIs to support proactive chat

Updated on March 25, 2020

Pega Customer Service provides a set of JavaScript APIs to support the proactive chat feature. These APIs are used to offer a proactive chat to the customer and enable the customer to accept or decline the offered proactive chat.

After the customer accepts the offered chat, the system connects the customer to a CSR who is available in the queue that is defined in the proactive chat API. As a best practice, you do not need to configure a queue questionnaire with the queues that are mentioned in the proactive chat API; instead, you can pass the required information through metadata that is defined in the proactive chat API.

Note: To configure proactive chat, you must set the wait time in App Studio. For more information about how to set the wait time in App Studio, see Configuring proactive chat in the Pega Customer Service Implementation Guide on the Pega Customer Service product page.

pega.chat.proactiveChat.offer(queuename, metadata, bDefault)

Offers the proactive chat to the customer by launching the proactive chat window on the customer web page.

Syntax
pega.chat.proactiveChat.offer(queuename, metadata, bDefualt);
Parameters
queuename
This is a string that specifies the name of a queue where you want to route the chat.
metadata
This is a JS Object with the following key values:

{“Page Name” : “Bill Payment”, “Time spent on page” : “5 mins”}.

This activity should return an HTML stream that displays in the CSR’s chat window.

bDefaultUI
This is a boolean value that can be set to true to use the default user interface for a proactive chat. Otherwise, it is false. The default value is true/false.
Return value
-NA-
pega.chat.proactiveChat.accept()

Initiates the chat flow and allows the customer to accept the proactive chat offer.

Syntax
pega.chat.proactiveChat.accept();
Parameters
XXX
Return value
-NA-
pega.chat.proactiveChat.decline()

Does not initiate the chat flow. If the customer declines the offered proactive chat, dismisses the chat pop-up.

Syntax
pega.chat.proactiveChat.decline();
Parameters
XXX
Return value
-NA-

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us