Skip to main content
LinkedIn
Copied!

Table of Contents

Custom data for Legacy Webchat

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

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.

    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.

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.
Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us