Skip to main content


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

Custom data for Legacy Webchat

Updated on March 16, 2021

When a customer opens the bot, the bot captures the necessary details to identify the customers and associate the conversation with the corresponding account.

Pega Customer Service Implementation Guide
The PegaHelperExtension.js file captures the following information from the website to pass on to the Pega Customer Service application by default:

  • pegaAParamObj.ContactId
  • pegaAParamObj.AccountNumber
  • pegaAParamObj.username
  • pegaAParamObj.CustomerURL
  • pegaAParamObj.Language
Sometimes you need to capture different or additional customer information depending on your organization needs. For example, if you are an insurance organization and the customers use their policy number to sign in to the website for chats, the PegaHelperExtension.js can be modified to capture the customer's policy number instead of the contact ID. To customize the data that the bot captures, follow these steps:
  1. In the downloaded self-service configuration folder of your bot channel, open the PegaHelperExtension.JS file.
  2. In the preparePegaAParams function, add the new key-value pairs.
    For example: pegaAParamObj.policyId = “123456789”
  3. In the Work-Channel-Chat class, create a new property to hold that value.
  4. In the Work-Channel-Chat class of your self-service application, update the pyDefault data transform to set .myServer to param.myParam.
  5. Copy the value set in the SetContactContextWebChatBot data transform to copy to the pyInteractionCase page.
    pyInteractionCase page is the context of the bot interaction.
  6. To set the properties from pyInteractionCase to the chatinteraction page, which is used while routing the request, use the cyInvokeRoutingExtn data transform.
Result: When the customer escalates the bot interaction to a CSR, the ToasterPopForChat activity copies the items from the chatinteraction page to the CSR side chat interaction page.

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