Posted: 20 Sep 2020 4:28 EDT Last activity: 15 Dec 2020 4:44 EST
Get Pega webchatbot's user GeoLocation in Pega platform
We are looking for getting the current Geo Location of the Pega WebChat user. The use cases where we need to provide info in chatbot based on customer's current location, we will use this location instead of asking the user for it.
We are looking for getting location in IVA WebChat channel in platform, not for the customer services component's webchat.
The link , you have shared for passing the additional data, talks about Customer service's Webchat channel. Can you please let us know how we can pass additional data for IVA webchat channel without customer service component.
Hi Vikas, even with the platform version, it's still using Mashup as the underlying technology. So, where ever it's deployed, you can update the Pega gadget code to pass in additional parameters. The changes that are described in the article would be something that you'd implement in your own application. The CS version is making use of existing platform extension points as well, so you should be able to do the same. Add a new pyDefault DT at Work-Channel-Chat to copy the param object to your pyWorkPage. Update the pyPostInitialize activity top copy from pyWorkPage to pyInteractionCase(Class Work-Channel-Interaction) page. You will need to create the properties at Work- class to hold the values. The activity pyPostInitialize is called from pzInitializeChannelConfiguration AFTER pyInteractionCase page is created.
Thank you for sharing. As per above conversation it should be possible to achieve desired functionality with custom development. This is interesting feature which we will put on our roadmap. However I cannot commit to any delivery date as of now.
Please verify if parameter is available in Work-Channel-Chat.pyPostInitialize (As I can't remember if this uses the same param page)
- Yes - Set pyInteractionCase.YourProperty = Param.yourParam (pyInteractionCase has to be defined in Pages&Classes - it is Work-Channel-Interaction)
- No - Save As Work-Channel-Chat.pyStartCase to your ruleset, add new Utility shape and assign your parameter from param page (it should be there) to Work-Channel-Chat.chatProperty and then in Work-Channel-Chat.pyPostInitialize set pyInteractionCase.YourProperty = .chatProperty (pyInteractionCase has to be defined in Pages&Classes - it is Work-Channel-Interaction)
This should allow you to use this property passed from mashup in any place as you have this on interaction case.
Create Requestor scope DataPage which will store your data from mashup.
Save As Work-Channel-Chat.pyStartCase to your ruleset, add new Utility shape and populate your DataPage with data from param page (passed from mashup). Then you can refer those DataPage in any place where you need this.