Using Pega Next-Best-Action Advisor in your desktop application
You can embed Pega Next-Best-Action Advisor into a desktop application by using a mashup script, and customize the script to meet your specific needs. You can then use Pega Next-Best-Action Advisor to either acquire new customers, retain existing customers, or make offers directly from your own application.
Use case
U+ Comm, a large customer service company, uses Pega Next-Best-Action Advisor without the Pega Customer Service application, but would like a tool for negotiating bundles. U+ Comm can implement the Next-Best-Action Advisor Bundle Negotiator either as a standalone application, or more typically, as integrated into their existing customer service application.
For more information on Pega Platform capabilities, see Capabilities.
The following figure shows an example of Pega Next-Best-Action Advisor embedded into a customer service application:
Use this tutorial to learn how to implement the mashup script in your own application, and how to customize the attribute parameters in the dynamically generated code to suit your business requirements. You can, for example, identify a customer by their ID.Embedding and using the embedded Pega Next-Best-Action Advisor
As a System Architect (SA), use the following process and figure to learn how you can embed Pega Next-Best-Action Advisor into your desktop application. As a CSR, learn how to use Pega Next-Best-Action Advisor that is embedded in another desktop application or a website to fulfill the customer journey.
- The CSR takes a call.
- The CSR or Pega Next-Best-Action Advisor identifies the customer.When Pega Next-Best-Action Advisor is part of Pega Customer Service, customers are identified prior to invoking Pega Next-Best-Action Advisor. As part of a desktop application, customers are identified in one of the following ways:
- Manually, by the CSR looking at customer name and Customer ID.
- Automatically, after the the Customer ID invokes the embedded Pega Next-Best-Action Advisor.
- The CSR views the detailed customer information (Customer 360).
- The SA enables invoking next best action to assess customer needs.
- If the next-best-action recommendation is to make the customer an offer, the CSR fulfills the Make Offer journey.
- If the next-best-action recommendation is to upgrade or retain the customer, the CSR fulfills the Upgrade/Retain journey.
- The CSR configures the offer.
- The CSR confirms the offer.
- Post Offer processing, for example, pay, schedule, and change order.
Sample code to generate the mashup script
As a System Architect, enable the negotiation capability by launching one of the supported next best actions directly from a desktop application by using the embedded Pega Next-Best-Action Advisor.
- Use the following JavaScript function to generate the mashup script that is based on the CustomerID entered by the user: Sample mashup code.
- In the sample mashup code, use the following URL for
reference:
http://10.225.93.39:9080/prweb/app/CSCSampleApplication_4829/!STANDARD?pyActivity=%40baseclass.doUIAction&action=createNewWork&isWebMashup=true&className=PegaComm-FW-CPMCFW-Work-Negotiation-Retention&flowName=pyStartCase&UserIdentifier=Cscsysadmin&Password=UnVsZXNAMTIzNDU%3D&pzSkinName=CSEndUser&CustomerID=C1000022
- For more information on using mashups, see Tutorial: Creating a mashup with Pega Web Mashup.
Next steps
As a System Architect, use the standard Pega Platform capabilities to build a service which takes the results from Pega Next-Best-Action Advisor and makes them available to the host system, for example, a customer service application.
Configure the bundle offers and capture further information such as payments. This integration is beyond the scope of this document. For more information, see Personalizing and purchasing offer bundles in a self-service portal.
Sample code to invoke next-best-action
In Pega Customer Decision Hub, you can determine the next best action by invoking the next-best-action strategy framework. As a System Architect, use the following code sample to call the next-best-action real-time container: Sample code to invoke next best action.
In the code sample, replace the following variables, where:
- Retrieve Customer ID code is your company's own code that retrieves the Customer ID.
- Your company's URL is a web address of your company's next best action container.
- Context can be one of the predefined values listed below.
Type | Value | Key |
Intent | Evaluate internet equipment | Recents |
Intent | Moderate | CallVolumeIndicator |
Intent | Build Value | InteractionGoal |
Intent | phone | Channel |
Intent | Passive | NetPromoterCategory |
Channel | N/A | Queuename |
Intent | N/A | CustomerValue |
Intent | N/A | NewCustomer |
Intent | Transfer line | IVR |
Intent | N/A | CreatedFromAnonymous |
Intent | Transfer line | IVROption |
Call type | N/A | DNIS |
Call type | INBOUND | Purpose |
Intent | true | RetailOffersOnly |
CustomerDetails | PEGACRM-ENTITY-CONTACT CON-20513 | ID |
Intent | N/A | Context |
IntentReason | N/A | Intent |
Intent | PegaComm-FW-CPMCFW-Work-Interaction-Call | ObjClass |
Intent | N/A | SuggestedActions |
Intent | N/A | NegotiationCost |
Intent | BillingInquiry | WSSAction |
Intent | N/A | Registered for eBill |
Bundle | Internet | ServicesRequired |
Bundle | Mobile | ServicesRequired |
Bundle | Phone | ServicesRequired |
Bundle | TV | ServicesRequired |
Bundle | Internet | ServicesType |
Bundle | Mobile | ServicesType |
Bundle | Phone | ServicesType |
Bundle | TV | ServicesType |
Bundle | 3 | BundleCount |
Skipping bundle configuration
When negotiating bundles, as a CSR, you can configure the bundle offer by, for example, choosing the mobile phone color. When the negotiation flow is a part of the embedded Pega Next-Best-Action Advisor implementation, as a SA, you can skip the configuration by deleting the dedicated configuration shape, for example, Equipment Details.
The configuration shape is provided in Pega Next-Best-Action Advisor, but it is more typically used in Pega Customer Service.
- In the navigation pane of Dev Studio, click App.
- On the Classes tab, search for PegaComm-FW-CPMCFW-Work-Negotiation.
- In the list of results, expand .
- Click Negotiation.
- In the Negotiate with contact case flow, save the rule to a ruleset in your implementation application, and then click Check out.
- Delete the bundle configuration step by right-clicking the Equipment Details shape, and then selecting Delete.
- Click Save, and then click Check in.
Previous topic Architecture of the Pega Next-Best-Action Advisor capabilities Next topic Understanding Bundle Negotiator