Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Next-best-action architecture

Updated on May 10, 2021

Pega Sales Automation uses Decision Management capabilities to identify the next best action for every opportunity in the application.

Pega Sales Automation Implementation Guide

Note: To increase the performance of the next-best-action widget, instead of calculating next best actions immediately, the system architecture calculates and stores next best actions in the NextBestActions data set first, and then displays the next best actions from that data set. To support this improvement, the UsePreloadedNBA dynamic system setting is set by default to true, and the GenerateNBA job scheduler, runs every day at noon local time.

Ruleset and class

Next best actions in Pega Sales Automation use the SA-Artifacts ruleset. The SA-SR class (Sales Automation–Strategy Results) is the foundation for the entire Pega Sales Automation next-best-action structure. This class has direct pattern inheritance from Data-pxStrategyResults.

The next-best-action structure of Pega Sales Automation next best action uses the NextBestActions data set of the PegaCRM-Data-NextBestActions class to store next best actions. The PegaCRM-Data-NextBestActions class is the main class for storing next best actions.

Business issue, business group, and propositions

The SANBAIssue business issue contains related business groups and propositions for next best actions in Pega Sales Automation.

Properties

Depending on the UsePreloadedNBA property setting, the next-best-action architecture varies.

When the UsePreloadedNBA property is set to false, the NBAForSalesRepOpp page list property includes the results of decision strategies and populates the repeating grid of the NBASalesRepOpp section of an opportunity. This page list is populated by the NBASalesRepOpp activity.

When the UsePreloadedNBA property is set to true, you can configure most of the next best actions to display daily. These actions are maintained by using the dynamic class representation (DCR) in the crmAppExtModel data transform. The following are the next-best-action properties:

  • NBA_InitialOutReach
  • NBA_InactiveDays
  • NBA_OppFollowUpDays
  • NBA_OrgTrendDays
  • NBA_ContactInactiveDays
  • NBA_Interactions
  • NBA_TopActionsLimit
  • NBA_ETAForEmailReply
  • NBA_EmailsReceivedinLastXDays
  • NBA_EmailFollowUpDays
  • NBA_AppointmentsScheduledAfterXHours

Activities

The next-best-action architecture varies depending on the UsePreloadedNBA property setting.

When the UsePreloadedNBA is set to false, next best actions in Pega Sales Automation use the following activities:

  • NBASalesRepOpp – Uses the opportunity ID as an input parameter and populates the next best actions in the NBAForSalesRepOpp property. The activity opens an opportunity in the GivenSAOpp page, which acts as the parent for the entire next-best-action data model for the activity. The activity then populates the accounts, leads, households, competitors, and contacts related to the organization to create a tree structure of pages.
  • CaptureTopActions – Stores the next-best-action interaction response in the interaction history.
  • GetNextBestAction – Populates the D_opportunitiesNextBestAction data page, which populates the Next best actions widget on the sales representative's dashboard. The activity runs the crmOpportunitiesForNBA report definition, and for each opportunity, it calls the NBASalesRepOpp activity to get the top actions for that opportunity. The activity stops when it reaches ten actions.

When the UsePreloadedNBA property is set to true, next best actions in Pega Sales Automation use the following activities:

  • GenerateNextBestActions – Runs based on the GenerateNBA job scheduler and populates next best actions into the data set.
  • PreloadedNBA_Dashboard – Populates the D_opportunitiesNextBestAction data page, which populates the Next best actions widget on the sales representative's dashboard.
  • CaptureTopActions – Stores the next-best-action interaction response in the interaction history.
  • GenerateNBAonChangeOwner – Generates lead-related next best actions when the owner of the lead changes.
  • RemoveWORelatedNBA – This activity is a part of the tasks, activities, and appointments creation flows, and runs when the system creates these items. This activity calls another activity, for example, RemoveRelatedWONBA, RemoveRelatedWONBA_Opp, and RemoveRelatedWONBA_Contact to remove leads, opportunities, and contacts-related next best actions when the system creates tasks, activities or appointments.
  • crmLinkPegaCPMObject – Includes the RemoveRelatedWONBA, RemoveRelatedWONBA_Opp, and RemoveRelatedWONBA_Contact activities to remove leads, opportunities, and contacts-related next best actions when an email or an appointment is associated with any of these work objects.
  • InteractionsWithProspects – Used to generate the interaction next best actions, called in the GenerateNextBestActions activity.
  • DiscardSANBA – Used to discard an individual next best action from the next best actions list.
  • DiscardSANBAforOpr – Used to discard a group of similar-proposition next best actions for a logged-in operator.

Report definitions

The next-best-action architecture varies, depending on the UsePreloadedNBA property setting.

When the UsePreloadedNBA property is set to false, the NBASalesRepOpp activity uses the following report definitions to populate the GivenSAOpp page:

  • ContactsRelatedToOrganizaton – Shows contacts related to an organization.
  • LastActivityByOrg – Shows the last activity that was performed by an organization.
  • ActiveHouseholdMembersForAllHouseHoldsLinkedWithContact – Shows a list of active contacts for the primary contact's households for the current opportunity.
  • crmOpportunitiesForNBA – Shows a list of opportunities that were closed in the current quarter and those that were closed more than a year ago.

When the UsePreloadedNBA is set to true, next best actions in Pega Sales Automation use the following report definitions:

  • crmAllLeadsList – Lists all unresolved leads and next best action data flows associated with leads.
  • EmailRecipients – Lists all email addresses of prospects with whom sales representatives exchanged emails in the last x days.
  • AppointmentEmailRecipients – Lists email addresses of prospects with whom sales representatives scheduled appointments in the last x days.
  • GetLatestCP – Lists the latest close plan update datetime of an opportunity in the last x days.
  • AppointmentsCreatedorScheduledFromGivenDateTime – Lists appointments that are scheduled for a given date.
  • EmailsRelatedToWO – Lists emails that are created after a given date.
  • crmOpportunitiesRelatedToOrganization – Lists opportunities related to a given organization.
  • GetOrgContMatrixHeaderList – Lists the contact management levels defined in Pega Sales Automation.
  • ContactsbyOrgAndMgmtLevel – Lists the contacts of a given organization with a given management level list.
  • CrmGetAllEventsCountForOrg – Lists the event names for a given time period for a given organization.
  • GetEmailNBAsWithNegativeSentiment – Lists the email next best actions that have a negative sentiment, that are available to a logged-in operator.
  • CheckNBAForAppointment – Lists all of the next best actions on the appointment.
  • GetEmailDetails – Lists the email details of the next best actions for an email.
  • GetAppointmentDetails – Lists the appointment details of the next best actions for an appointment.
  • GetEmailDetailsWithRcpntCount – Lists the email details of an email action's next best actions, with the email recipient count.

Data flows

The next-best-action architecture varies, depending on the UsePreloadedNBA property setting.

When the UsePreloadedNBA property is set to false, the NBASalesRepOpp activity uses the following data flows:

  • BuildOpportunitySpine – Shows a list of contacts, products, and competitors for an opportunity.
  • NBASalesRepOpp – Runs the parent NextBestActionsForSalesRep decision strategy.

When the UsePreloadedNBA is set to true, the GenerateNextBestActions activity uses the following data flows:

  • LoadNBAForAllOpps – Loads all opportunities and inserts a related next best action into the NextBestActions data set.
  • LoadNBAForAllLeads – Loads all leads and inserts a related next best action into the NextBestActions data set.
  • LoadNBAForAllContacts – Loads all contacts and inserts a related next best action into the NextBestActions data set.
  • LoadNBAForAllOrg – Loads all organizations and inserts a related next best action into the NextBestActions data set.
  • InteractionsWithProspects – Loads all email addresses and inserts a related next best action into the NextBestActions data set.
  • LoadNBAForAllEmails – Loads all of emails and inserts email actions-related next best actions into the NextBestActions data set.
  • LoadNBAForAllAppointment – Loads all appointments and inserts-related next best actions into the NextBestActions data set.

Strategies and substrategies

The next-best-architecture varies, depending on the UsePreloadedNBA property setting.

When the UsePreloadedNBA property is set to false, next best actions in Pega Sales Automation use the following strategies:

  • NextBestActionsForSalesRep – This strategy is the parent strategy. It uses the GivenSAOpp page and has multiple substrategies. In this strategy, the results from substrategies are grouped and ranked in priority order in the Top 3 Actions component. This component provides the top three actions and the top action to the Results component. The top three actions are displayed in the opportunity, and the top action is displayed in the Next best actions widget on the sales representative's dashboard.
  • Substrategies – Evaluates a specific condition and generates an action for all the substrategies within the parent strategy. Substrategies evaluate the appropriate page list in the data structure, generate actions, and filter out actions that have been completed and stored in decision history (.pyOutcome !=”Clicked”) by the CaptureTopAction activity. The Proposition filter filters out unwanted and unqualified actions by using When rules. The Set Property component populates the following properties for Pega Sales Automation Next Best Action:
    • OpportunityCompetitorStrategy
    • HouseholdMemberStrategy
    • OpportunityContactStrategy
    • ContactRecentLeadStrategy
    • OpportunityProductStrategy
    • ServiceActionStrategy
    • OrganizationContactStrategy

When the UsePreloadedNBA property is set to true, Pega Sales Automation Next Best Action uses the following strategies:

  • OpportunityContactNBA, OpportunityCompetitorNBA, OpportunityStrategyNBA – Filter the valid opportunity-related next best actions by using proposition filter conditions. The NextBestActions data set stores the outcome of this strategy.
  • LeadsFollowUpActionsStrategy – Filters the valid lead-related next best actions by using proposition filter conditions. The NextBestActions data set stores the outcome of this strategy.
  • ContactFollowUpStrategy, ContactMissingKeyInfoStrategy – Filter the valid contact-related next best actions by using proposition filter conditions. The NextBestActions data set stores the outcome of this strategy.
  • GenerateNBAForOrgActions – Filters the valid organization-related next best actions by using proposition filter conditions. The NextBestActions data set stores the outcome of this strategy.
  • ConvertInteractionToContact – Filters the valid email address-related next best actions by using proposition filter conditions. The NextBestActions data set stores the outcome of this strategy.
  • GenerateNBAsForSentimentEmails – Filters valid emails with a negative sentiment and checks in the interaction history. The NextBestActions data set stores the outcome of this strategy.
  • GenerateNBAsForEmailActions – Filters valid emails-related next best actions by using the proposition filter condition. The NextBestActions data set stores the outcome of this strategy.
  • GenerateNBAsForAppointmentActions – Filters valid appointment-related next best actions by using the proposition filter condition. The NextBestActions data set stores the outcome of this strategy.

Dashboard widget

The D_OpportunitiesNextBestAction data page populates the Dashboard_NextBestActions widget.

Data page

The next-best-action architecture varies, depending on the UsePreloadedNBA property setting.

When the UsePreloadedNBA property is set to false, the D_OpportunitiesNextBestAction data page populates the next best actions dashboard widget by calling the GetNextBestAction activity.

When the UsePreloadedNBA property is set to true, the D_OpportunitiesNextBestAction data page populates the Next best actions dashboard widget by calling the PreloadedNBA_Dashboard activity. This activity calls the D_GetPropositions data page to group the next best actions and populate the next best actions list.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us