LinkedIn
Copied!

Table of Contents

APIs to support proactive chat

Version:

Only available versions of this content are shown in the dropdown

Pega Customer Service provides a set of JavaScript APIs to support the proactive chat feature. These APIs 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 available in the queue defined in the proactive chat API. As a best practice, you do not need to configure a queue questionnaire with queues mentioned in the proactive chat API. Instead, you can pass the required information through metadata defined in the proactive chat API.

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.
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 Collaboration Center to ask questions, engage in discussions, share ideas, and help others.