Skip to main content

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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Passing custom data to the chatbot

Updated on September 10, 2021

When a customer launches the chatbot several properties are passed on to it by default. You may have to pass additional data dynamically to alter the bot behavior or to capture some data to send to the agent during a chat escalation.

Follow these steps to do so:

  1. In the downloaded self-service configuration folder of your web chatbot channel, open the PegaHelperExtension.JS file. 
  2. Update the preparePegaAParams function by adding the new key-value pairs, for example, pegaAParamObj.myparam= “Wednesday”;
  3. Create a new property in the Work-Channel-Chat class to hold that value, for example, MyChatServer. For more information, see Creating a property.
  4. In the Work-Channel-Chat class of your self-service application, update the pyDefault data transform to set .myServer to param.myParam.
  5. Use the SetContactContextWebChatBot data transform to copy the value set in the data transform, for example, .myServer, to the pyInteractionCase page.
    pyInteractionCase page is the context of the Bot interaction.

When the customer escalates the bot interaction to a CSR, the RetrieveBotTranscript activity is used to copy items from the pyInteractionCase page of the chatbot to the CSR side. 

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. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us