Question
IBM
ID
Last activity: 21 Nov 2016 22:57 EST
Getting data from PEGA from a web app
Hi,
I have a web application (HTML, CSS and Java Script). As part of the process, the app facilitates the users to do a search for example searching for a Contact name, thn we would send a request to PEGA and expect a result foming back.
We started exploring by putting a Pega gadget on the HTML page, however we have no idea on how to pass the search parameter, which is collected from the user, to the PEGA gadget. Is there a tutorial that includes a way to pass parameter to a PEGA gadget?
Or maybe there is better option on how to do a search for a particular record within PEGA and expect a result back.
Thank you
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Virtusa IT Consulting
AE
Hi,
You can pass the parameters as 'Contact name' by using PegaA_params="{ContactName:'ParamValue'}" in your gadget in div tag and use the 'ContactName' parameter as filter in the section which you want to display in external web app.
Thanks,
Habeeb Baig
PEG
IN
You can use web mash up formerly known as IAC.
Please refer https://pdn.pega.com/embedding-application-pega-gadget-using-pega-web-mashup
IBM
ID
OK, It seems that mash up is the way to go. Let say I have a gadget that is included in a mashup that is displayed inside a div tag, and the gadget displays information based on the parameter that is passed from the user. I assume that I can use the PegaA_params to pass that parameter. Now how do I know the correct name of the parameter to pass?
Thanks,
Henri
Virtusa IT Consulting
AE
You should consider parameters as static, are you expecting dynamic parameters from other application?
IBM
ID
I am expecting one parameter from the other application, which is in this particular case a contact name that needs to be inputted to the Pega Gadget. Then I would expect that the output would be shown on the PEGA gadget.
Pegasystems Inc.
IN
Typically when you click on button in your web application, you can design a javascript function in your system to collect input parameters and you can them as arg in below format:
function paramObjectToPegaApp() {
var pegaAParamObj = {};
pegaAParamObj.inputKey1="someValue1";
pegaAParamObj.ContactName="someValueFromWebApplication"; //if needed fill these input fields by making calls to other systems
pegaAParamObj.AccountNumber="someAccoutNumber";
return pegaAParamObj;
}
Later you can use
var PegaAParamObject = paramObjectToPegaApp();
pega.web.api.doAction("GadgetName", "createNewWork (or appropriate action)", "PegaSample-CustomerRequest", "pyStartCase", PegaAParamObject);
There are huge enhancments/things are not explored in mashup. I would suggest to spend going through below link which will help you in building your requirements in correct way.
IBM
ID
Thank you,
That makes a lot of sense. Please pardon my lack of knowledge on Pega.
pega.web.api.doAction("GadgetName", "createNewWork (or appropriate action)", "PegaSample-CustomerRequest", "pyStartCase", PegaAParamObject);
What would be the action if we want to display the result of a query based on the input on PegaAParamObject. The html addition is the following:
<script src ='PegaInternetApplicationComposer.js'></script>
<div data-pega-gadgetname ='PegaGadget'
data-pega-action = 'display'
data-pega-action-harnessName='SFAPortalContacts'
data-pega-className='PegaCRM-Portal-SFA-SalesRep'
data-pega-applicationname ='GISFW'
data-pega-threadname ='STANDARD'
data-pega-systemid ='pega'
data-pega-portalName = 'SFASalesRep_Web'
data-pega-event-onload = "init"
data-pega-url ="http://x.x.x.x/prweb/[email protected]&action=display&harnessName=SFAPortalContacts&className=PegaCRM-Portal-SFA-SalesRep&readOnly=true&label=SFAPortalThread&tabIndex=2&portalThreadName=STANDARD&portalName=SFASalesRep_Web&" ></div>
And the gadget displays like the attached .png file.
Thank you again.