Table of Contents

APIs to support proactive chat

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.

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.

The following sections detail the list of the APIs that support 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-

Suggest Edit

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.