Question
Use Javascript API from webchat mashup
We are using "display" action from webchat mashup to display a particular harness on click of some button in chatbot. In that harness we have some section which needs a parameter from chatbot.
How can we pass parameter from chatbot to harness/section using "display" action ?
"Display" action is available here: https://community.pega.com/knowledgebase/articles/pega-web-mashup/pega-web-mashup-page-javascript-actions
***Moderator: Pallavi to update platform capability tags***
Hello Vikas,
By using data-pega-action-param-parameters attribute in the mashup div, we can send the parameters to Mashup.
For more information refer: https://community.pega.com/knowledgebase/articles/pega-web-mashup/pega-web-mashup-attribute-reference#data-pega-action-parameters
In below sample, we are sending pzSkinName andUserIndentifier params to Mashup.
<div id="gadget"
data-pega-gadgetname ='PegaGadget' data-pega-action ='display' data-pega-action-param-harnessname ='pyCmPerform' data-pega-action-param-classname ='O511PY-ITSM-Work' data-pega-action-param-model ='' data-pega-action-param-readonly ='true' data-pega-isdeferloaded ='false' data-pega-applicationname ='ITSM' data-pega-threadname ='new' data-pega-resizetype ='stretch' data-pega-url ='http://localhost:8400/prweb/' data-pega-action-param-parameters ='{"pzSkinName":"MySkin","UserIdentifier":"user"}' ></div>
Regards,
Praveen