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.
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-
Initiates the chat flow and allows the customer to accept the proactive chat offer.
- Syntax
- pega.chat.proactiveChat.accept();
- Parameters
- XXX
- Return value
- -NA-
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-
Previous topic Configuring proactive chat Next topic Implementing customized and localized chat system messages