Optional: Embedding Pega Next-Best-Action Advisor with Pega Web Mashup
You can embed Pega Next-Best-Action Advisor in your third-party customer service application as a Pega Web Mashup gadget. This allows you to display next-best-action recommendations in the context of your customer service application.
- Deploy and configure Pega Web Mashup.For more information, see Pega Web Mashup.
- Create an operator based on the sample NBAMashupSysAdmin operator account.For more information, see Creating generic operator accounts for Pega Next-Best-Action Advisor sample application.
- Save this sample code in the local Tomcat server:
<html> <head> <!-- Getting the Customer ID value --> <script src ='http://host:port/prweb?pyActivity=pzIncludeMashupScripts'></script> <script> pega.web.api.setAuthenticationParameters("PEGAGADGETTWO", { UserIdentifier: 'your NBAMashupSysAdmin operator', Password: btoa('your NBAMashupSysAdmin password' }); </script> </head> <body style="text-align:center" > <!--Note: The values for UserIdentifier and Password may be assigned dynamically. The values shown here are for a specific user.--> <div id="NBAMashup" style="overflow:auto;padding-top:20px;" data-pega-gadgetname ='PEGAGADGETTWO' data-pega-action ='display' data-pega-action-param-classname ='CPM-Portal' data-pega-action-param-harnessname ='CSAdvisor' data-pega-action-param-model ='' data-pega-action-param-readonly ='true' data-pega-applicationname ='NBAMashup' data-pega-threadname ='STANDARD' data-pega-systemid ='pega' data-pega-resizetype ='stretch' data-pega-url="http://host:port/prweb" data-pega-redirectguests ='true' PegaA_params='{UserIdentifier:"your NBAMashupSysAdmin operator",Password:"your NBAMashupSysAdmin hashed password",pzSkinName:"CSEndUser",CustomerID:"CustomerID of a sample customer",ActionID:"NBA"}' > </div> <!-- ********************** End Pega content ********************** --> </body> </html>
- Update the following values in the sample code to the correct values for your Pega Next-Best-Action Advisor application:
- host:port
- your NBAMashupSysAdmin operator
- your NBAMashupSysAdmin password
- your NBAMashupSysAdmin hashed password
- CustomerID of a sample customer
Previous topic Optional: Creating generic operator accounts for the Pega Next-Best-Action Advisor sample application