SFA ImplementationGuide 721
SFA ImplementationGuide 721
7.21
IMPLEMENTATION GUIDE
© Copyright 2016
Pegasystems Inc., Cambridge, MA
All rights reserved.
Trademarks
For Pegasystems Inc. trademarks and registered trademarks, all rights reserved. Other brand or product names are
trademarks of their respective holders.
For information about the third-party software that is delivered with the product, refer to the third-party license file
on your installation media that is specific to your release.
Notices
This publication describes and/or represents products and services of Pegasystems Inc. It may contain trade secrets
and proprietary information that are protected by various federal, state, and international laws, and distributed under
licenses restricting their use, copying, modification, distribution, or transmittal in any form without prior written
authorization of Pegasystems Inc.
This publication is current as of the date of publication only. Changes to the publication may be made from time to
time at the discretion of Pegasystems Inc. This publication remains the property of Pegasystems Inc. and must be
returned to it upon request. This publication does not imply any commitment to offer or deliver the products or
services described herein.
This publication may include references to Pegasystems Inc. product features that have not been licensed by you or
your company. If you have questions about whether a particular capability is included in your installation, please
consult your Pegasystems Inc. services consultant.
Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or
typographical errors, as well as technical inaccuracies. Pegasystems Inc. may make improvements and/or changes to
the publication at any time.
Any references in this publication to non-Pegasystems websites are provided for convenience only and do not serve
as an endorsement of these websites. The materials at these websites are not part of the material for Pegasystems
products, and use of those websites is at your own risk.
Information concerning non-Pegasystems products was obtained from the suppliers of those products, their
publications, or other publicly available sources. Address questions about non-Pegasystems products to the suppliers
of those products.
This publication may contain examples used in daily business operations that include the names of people,
companies, products, and other third-party publications. Such examples are fictitious and any similarity to the names
or other data used by an actual business enterprise or individual is coincidental.
This information is the property of:
Pegasystems Inc.
One Rogers Street
Cambridge, MA 02142-1209
USA
Phone: (617) 374-9600
Fax: (617) 374-9620
[Link]
Typical sales automation applications do little more than capture data and are largely
disconnected from enterprise systems and the actual sales processes. Representatives end up
using manually created spreadsheets, reports, and forecasts. Sales methodologies are
inconsistently applied, and the selling process cannot be adjusted to accommodate variations
such as business unit, geography, the customer, sales team or the representative.
Pega Sales Automation optimizes success at every stage in the sales lifecycle. Pega Sales
Automation offers intelligent guidance, process automation from lead to fulfillment, and
unprecedented agility to instantly adapt your sales process. With Pega, you can quickly
standardize and optimize the sales process across multiple business units, products, team
members, geographies, accounts, and channels and dynamically adapt to each specialized
circumstance.
Key Features
Account and Contact Management
Lead Management
Forecast Management
Local Campaigns
Householding
The following classes are for efficient management of Accounts and Contacts in Business-to-
Business (B2B) and Business-to-Consumer (B2C) sales interactions:
sPegaCRM-Entity-Org (Organization)
PegaCRM-Entity-Account (Account)
PegaCRM-Entity-Contact (Contact)
The relationship between an organization entity and an account entity is one-to-many. This
allows for granular and custom security configurations. For example, an organization (belonging
to one geographical territory) can contain multiple accounts corresponding to different projects
and multiple sales personnel operating in the same geographical territory. However, different
business lines can own and have exclusive read access to these two different accounts.
Different implementations can choose to use different data enrichment services and enrich the
data through agreed upon modes as described in their service contracts. In addition to standard
attributes such as name and address, properties have been added to the data model to capture
account attributes that include:
ExternalID - Similar to the Data Universal Numbering System (D-U-N-S) the Capital IQ
(CapIQ) is used by organizations around the world as a global standard for business
identification and tracking.
Site - Information about the account’s location, such as single location, Headquarters, or
Branch
NAICS Code - The six-digit North American Industry Classification System (NAICS) code is
the standard used by businesses and governments to classify business establishments into
20 industries
NAICS Description - A brief description of an organization’s line of business, based on its
NAICS code
Ownership - Ownership type for the company, for example, public or private
SIC Code - Standard Industrial Classification code of the account’s main business
categorization
SIC Description - A brief description of an organization’s line of business, based on its SIC
code
Year Started - The year the company was established or the year when current ownership
or management assumed control of the company
These attributes are exposed as columns in tables. You can easily update them using the bulk
upload tool available for sales operations personnel.
Auto-Creation of Accounts
The Org/Account setup process can be streamlined by automatically creating an Account when
an Organization is created. This feature can be activated by setting the
AutomaticAccountCreation DSS setting to true. When enabled, the Account will be created with
attributes derived from the parent Organization. This can be especially useful in scenarios when
the Org/Account relationship is generally 1:1, or when an Organization hierarchy is used to
model a more complex customer.
An Account clipboard page is created and initiated as work page. Values are mapped onto this
clipboard page for the Business Account which is then stored in the database by calling of the
standard PRPC activity Addwork. For the property mapping the Data Transform
crmPrepareAccountCreation is used as shown in the following screenshot:
In case that the Business Account creation fails, the action is rolled back and an error message
is set to pyWorkPage of the Organization.
B2B: This is the standard functionality in which an organization deals with another
organization, and the customer base is purely an organization with multiple contacts and
accounts associated with the organization.
For instance, a tire manufacturer would sell to a car manufacturer. So, all the customers of a
tire manufacturer are companies who make cars.
B2C: This is a functionality in which an organization deals with individuals for the business,
and the customer base is purely an individual with the contact record itself acting as the
account for the leads and opportunities.
For instance, a Television manufacturer would sell its products to consumers, and not to any
other company.
Property: SellingMode
This property is introduced in PegaCRM- class. This property will be used in Accounts,
Opportunities, and Leads work objects to differentiate the work object as a B2B work object or a
B2C work object.
Description: A setting to identify the application Selling Mode. Values include: B2B, B2C or
B2B_B2C.
Navigation Rule
SFAWebPortal_TopNavigation
Description: Menu to display the quick create menu in the header.
SFAPortalMenuItems
When Rule
isSellingModeB2B
isSellingModeB2C
Description: To find out whether sellingmode is B2C or not
isSellingModeB2BB2C
Description: To find out whether sellingmode is B2BB2C or not
Flow
crmCreate
Class: PegaCRM-Entity-Contact
Description: This flow rule will create a contact and an Individual account, and it will
establish a Primary-Individual relationship between the contact and the newly created
Individual account. If you specify an Organization, this flow will establish an Employee
relationship between the contact and the corresponding organization. If you specify an
Account, the flow will establish a Primary-Business relationship with the corresponding
account.
crmCreate
Class: PegaCRM-Entity-Account-Ind
Description: This rule will create an individual account, and it also creates a C2A link. This
flow rule will be called during creation of the contact.
crmCreate
Class: PegaCRM-Work-SFA-Opportunity-Ind
crmCreate
Class: PegaCRM-Work-SFA-Lead
crmConvertLead
Class: PegaCRM-Work-SFA-Lead
Description: For conversion of an individual lead to an opportunity or contact, this flow rule
will be called. For Opportunity conversion, the flow will take the corresponding individual
account linked to the contact and associate the converted opportunity with the account.
Section
pyWorkPrimaryDetails
Class: PegaCRM-Entity-Account-Ind
Description: During creation of an individual account, the following section rule will be called.
It will take Primary Contact, Territory, and Owner. The AccountValue sum will be calculated
based on AgeScore, GenderScore, LifeStageScore, MaritalStatusScore, and
OpportunityScore, and that information will display in the details tab after creation of the
Individual Account. The scores will depend on the selection of the contact in the individual
account creation (Primary Contact column).
pyWorkPrimaryDetails
Class: PegaCRM-Entity-Contact
Description: During creation of a contact, the following section rule will be called. Accounts
autocomplete result will be visible when an Organization is selected. Organization is not a
required field. However, TerritoryID for the contact is required.
pyWorkPrimaryDetails
Class: PegaCRM-Work-SFA-Lead-Ind
Description: This section rule will be called during creation of the Individual Lead work
object. As with Business Lead, it will not take Lead Company, Industry, Revenue,
Employees, and Contacts. LastName and Territory are required properties.
SFAPortal_AccountsList
Description: This section will show the accounts list view. The section contains 3 grid layouts
with different when conditions (isSellingModeB2B, isSellingModeB2C,
isSellingModeB2BB2C). Based on the sellingmode DSS, a corresponding grid will be
displayed.
SFAPortal_OpportunitiesList
Description: This section will show the Opportunities list view. The section contains three
grid layouts with different When conditions (isSellingModeB2B, isSellingModeB2C,
isSellingModeB2BB2C). Based on the DSS setting, a corresponding grid will be displayed.
SFAPortal_LeadsList
Description: This section will show the leads list view. The section contains three grid
layouts with different When conditions (isSellingModeB2B, isSellingModeB2C,
isSellingModeB2BB2C). Based on the DSS setting, a corresponding grid will be displayed.
DeclareTrigger: changeContactTerritoryID
Description: This trigger will be called whenever contact TerritoryID changes. When the
Contact TerritoryID changes, the corresponding individual account TerritoryID is changed.
DataPage
Declare_crmAccountInd
Description: This data page will open the current individual account details.
D_crmPrimaryIndividualAccount
Description: This data page will load the Primary-Individual account corresponding to the
contact.
Declare_crmOpportunityInd
Description: Used to load an individual opportunity.
Activity
crmLoadPrimaryIndividualAccount.
Description: Used to load a Primary Individual account corresponding to the contact.
crmOpenOpportunity
Description: Used to open an individual opportunity
Report Definition
crmAccountsList
Description: In the Sales Automation portals (Sales Representative, Sales Manager and
Sales Operations portals), this report definition is used to show the accounts. The Report
definition takes SellingMode as an input parameter. Based on the input parameter, the
corresponding details are shown in the list view.
crmOpportunitiesList
Description: In the Sales Automation portals (Sales Representative, Sales Manager and
Sales Operations portals), this report definition is used to show the opportunities. The
Report definition takes SellingMode as an input parameter. Based on the input parameter,
the corresponding details will be shown in the list view.
Description: In the Sales Automation portal for showing the leads this report definition will be
used. The report definition will take SellingMode as an input parameter. Based on the input
parameter corresponding details will be shown in the list view.
Data Instances:
The following relationships are used to support associations between contacts, organizations
and account:
Backward Compatibility/Migration
To migrate from a version lower than Sales Automation 7.12 we need to fill SellingMode in the
work object instances of Accounts, Opportunities, and Leads.
Activity
MigrateSellingMode (PegaCRM-Entity-Account)
Description: This activity will add SellingMode(B2B) to the earlier version Accounts work
object instances.
Engagement Trends
The activities that lead to strong customer engagement are measurable through data.
Monitoring customer engagement data is a necessary step in preserving strong customer
relationships and ultimately driving business.
The “Engagement Trends” is a feature in which users can view engagement data across an
organization. Customer engagement is tracked across the following dimensions: Digital Activity,
Activities, Email Activity and Contact Growth. The data being surfaced through Engagement
Trends is highly valuable to sales and management teams as they evaluate the status of
customer relationships as well as to marketing teams to gauge campaign effectiveness.
To see the trends, open an Organization and click on the Trends tab.
Digital Activity
Website Logins: Website logins represent the number of logins that contacts within an
organization have logged into the website of the seller.
Subscription: The subscription data aggregates the number of contacts within an organization
who signed up for an account in a given month.
Downloads: This graph represents the number of assets downloaded by contacts of the
organization. The contact is derived from the registrant and aggregated across an organization
for each month.
Activities
The number of Customer Activities for a particular organization is shown in both graphical and
tabular form.
Email Activity:
Email Activity is recorded and shown in graphical and tabular form based on the categorisation
of emails sent and received.
Summary By Contact: It displays the email flow for every contact of the organization.
Contact Growth:
It shows the contacts added to the organization in graphical and tabular form.
This class maps to either table from External Data warehouse or Internal sample table
(CED_SAMPLE_DATA).
The columns in the following screen shots are maintained in the sample table
(CED_SAMPLE_DATA).
Report Definition
There are total five Report definitions for getting different trends for the Organization, all
these report definitions are filtered by “OrganizationID” and “EventType”.
Sample data for reference is provided that can be modified by changing Organization’s pyID
and Event Type.
Below are the Report Definitions used:
CustomerActivityOnOrg:
EmailActivityOnOrg:
CrmOrgWebSiteActivity:
CrmOrgSubscriptionActivity:
CrmOrgDownloads:
Prerequisite for using Engagement Maps is setting up the new product hierarchy. This can be
achieved from the Sales Operations portal, from the Tools -> Manage Products.
The product hierarchy can also be imported into Sales Automation by using Product Bulk
Upload tool.
Engagement Maps can be accessed from the left navigation. Engagement maps can be viewed
when the selling mode is B2B, B2C or B2B_B2C. When in B2B mode, the Accounts in Reps or
Managers territory are displayed as rows in Engagement Map. In B2C mode, Contacts are
displayed.
Once the mode is finalised, user has option to select how the engagements are viewed: Product
or Product Group.
The filters are available to restrict the map to any particular Account or Contact.
Engagement Map shows cells as white space, Active, Sold-Active, Sold, Blocked or NA.
Active: The account has at least one open-active opportunity with that product. When clicked
on the status, list of opportunities because of which status is obtained is displayed.
Sold-Active: The account has at least one open-active and at least one Resolved-won
opportunity with that product. When clicked on the status list of opportunities because of which
status is obtained is displayed.
Sold: The account has only Resolved-won opportunities with that product
Blocked and NA: These status are derived from the Product overrides in the account or
Contact.
The Product overrides on Account or Contacts can be updated directly from Engagement Maps
by right-clicking on the cells and choosing the status. This can be performed only when viewing
by product.
The overrides can also be maintained on the Account or Contact detail page.
Activities Used:
Activity Description
This acts as source for D_EngagementMap data page.
Depending on whether the view is B2B or B2C it calls
PrepareEngagementMapStructure different activities
This prepares the list of what products/ Groups should
PrepareEngagementMapFilters be seen
EngagementMapStructureForAccounts This prepares the EM structure for B2B scenario
EngagementMapStructureForContacts This prepares the EM Structure for B2C scenario
Activity Description
PercentagesForEngagementMap This calculates the percentages in the header
This activity is called when we update the status from
updateEngagementStatuses EM screen in 'View By Product' view
This is overridden in Product class for bulk upload of
AddData products
This validates each row in the CSV or XML file whether
validateProduct it has proper data. This is for bulk upload scenario
EngagementMapFilters section
Source for the above grid is D_EngagementMap and its clipboard structure looks as follows:
crmAccountListForEngagement
EngagementStatusesForAccountOverrides
EngagementStatusesForB2BOpportunities
crmContactListForEngagement
EngagementStatusesForContactOverrides
EngagementStatusesForB2COpportunities
D_crmProducts is the source for this tree grid. And here is how its clipboard structure looks. At
each level ChildItem represents Category, Family , Group or family in the respective level of
hierarchy.
Activity Description
Bulk upload for product updates is not supported. This
activity is an extension point given in bulk upload
framework to perform updates. In this case simple exits
OpenDataForBulkMerge after entering
This is the extension activity given in bulk upload
AddData framework to add data.
This validates each row in CSV or each record in XML
validateProduct and checks whther the details entered are valid
Relationships
Building and managing relationships is a key component of any Sales Automation
implementation. Pega Sales Automation provides an application that you can easily extend for
new types of relationships. Standard relationship types that are shipped are Employee, Primary-
Business and Primary-Individual
Class Structure
PegaCRM-Relationship (Class Group)
PegaCRM-Relationship-Hierarchy-(Abstract class for hierarchical relationships)
Database Table
CRM_RELATIONSHIP
Field Description
Field Description
EndDate End date for this relationship
FromRole Specifies the role from
LinkedFrom Parent work object whom it linked to
LinkedTo Child work object where it linked to
LinkedtoClass Class to which it linked
Path Stores the complete hierarchy of the linked object
StartDate Start date for the relationship
ToRole Specifies the role to
Hierarchical Relationships
A sample implementation of hierarchical relationships is in building the n-Tier organization
hierarchy. Pega Sales Automation allows building and viewing the corporate linkage by
associating an Organization as a parent to another, creating a parent-child relationship.
Many-To-Many Relationships
The following relationships model many-to-many relationships between entities in the Sales
Automation system.
Contact-To-Organization (C2O)
Contact-To-Account (C2A)
Contact-To-Contact (P2P)
(Sales)Operator-To-Contact (Affinity)
The Relationships tab of a Contact object provides all the contact’s relationships grouped by the
type of relationship.
The Relationships tab under Contact shows all relationships to the Contact, grouped by type.
All associations with respect to a contact are captured as a relationship. When a contact is
created and associated with an instance of organization, a C2O relationship is created with a
relation type of Employee. Similarly with the account provided, a C2A relationship of type
Primary-Business is created. This allows the contact to be related to other organizations and
accounts (if required), but with different relationship types.
For example, when a contact C1 is created with O1 as organization and A1 as account, Pega
Sales Automation implicitly creates:
Contact C1
Primary C2O object for C1 an O1
And Primary C2A objects for C1 and A1
Relationship types are managed by Sales Ops through the Tools>Manage Relation Types
gadget
You can associate a contact to other contacts by establish a peer-to-peer relationship (P2P)
using the Add Contact link.
C2O Creation Process: There are two ways that the user can associate any active contact with
an org in the system:
C2O Creation-I: By clicking on the Add Org link on contact’s Relationships tab
C2O Creation-II: By clicking on the Add Contact link on the organization’s Contact tab
C2A Creation Process: To establish a C2A link between a contact and an account, you should
first establish an active C2O relationship between the Corresponding contact and account’s org.
Similarly, the expiration of C2O flow will check for the any dependent C2As.
C2ACreation-I: By clicking on the Add Account link on the contact’s Relationships tab
C2O Creation-II: By clicking on the Add Contact link on the account's Contact tab
When you click the Add org link of the Relationships tab of Contact, the M2M screen appears.
Edit Flow of C2O/C2A: Editing the flow for these link objects is simple where you can edit a few
of the details or expire the link by providing an end date.
C2O’s expiration has a restriction as shown below. If you try to expire a C2O, which has some
dependent C2As, then you are shown an error saying that there are dependent C2A as listed.
Classes:
PegaCRM-Link-Entity-
PegaCRM-Link-Entity-C2O
PegaCRM-Link-Entity-C2A
PegaCRM-Link-P2P
Database Tables:
crm_link_c2o
crm_link_c2a
crm_link_p2p
Affinities
The Affinities feature allows a sales rep to establish relationships between a member of the
selling organization and customers or contacts. This gives sales reps visibility into whether other
sales reps know the same contact. The affinity instance includes details such as Strength, how
close the relationship is, the customer’s likelihood of taking call, accessibility for meeting
requests, and so on.
Fields Detail:
Field Description
Affinity for Operator with whom this Affinity is associated (It’s the Logged in
User always)
Contact Contact/Customer with whom Sales Automation links the above
Operator
Org Organization of the Contact
Account Account of the contact
AirportCode Airport code of contact
Title Title
Relationship Description Details of Relation between the Operator and the
Customer/contact.
Sold Before At Did user sold earlier to this contact at a different company or org
Likelihood of Call return Likely hood of customer coming back
Field Description
Strength Strength of the Affinity
Affinity Since Date that the relationship between the operator and contact
began
Last Face-To-Face Last face-to-face date
Returns Email Does the contact respond to Email?
Meeting Accessible Is the contact accessible for meetings?
Have Sold to them Before Did user sell to him in the past?
Notes Any other information or details
Suggested Visits List of Suggested Visits with contacts
Class: PegaCRM-Link-Affinity
DB Table: crm_link_affinity
The Affinities top tab shows the list of Affinities for the logged in Operator. From the Affinities
tab, you can:
You can manage the Affinities using the Edit and Close flows. Affinities can also be viewed from
the Affinities tab of org, account and contacts.
Suggested Visits
Once an Affinity has been established, a sales rep can request a visit with the customer by
creating a Suggested Visit.
Only those users with the following access group permissions are allowed to see the
Suggested Visits button. You need to add this role name in the user’s access group to provide
the permission to the required user.
Privilege: ShowAllForSuggestedVisits
Account Merge
Account merge functionality enables a user to find duplicate accounts and merge them while
keeping the essential information intact.
This is performed by first finding the duplicate account, then selecting the correct information
from both entities and then deleting the duplicate work object.
From the Find Duplicates screen, select the duplicate account. You can limit choices using
the provided filters.
Once a duplicate Account is selected, a screen displays that allows the user to select
property values from either of the accounts or to enter a different value. The screen has a
Master record (which is retained) and a Duplicate record (which is deleted). The user selects
field values to retain and then clicks Submit to merge the accounts.
Once the accounts are merged, the final Account screen comes up, which has the field
values as selected from the previous screen.
Flow:
crmFindDuplicatesWrapper: This is the wrapper flow for all the work objects
crmFindDuplicates: This is the flow specific to the Account Merge functionality. Same flow is
used for both B2B and B2C.
In the crmFindDuplicates flow, the crmFindDuplicates flow action is invoked. This flow action
refers to the crmFindDuplicates section. If any changes are required in the find duplicates
UI, we need to override the crmFindDuplicates section.
Activity: crmPostMerge
Description: This activity merges all the associated entities from the deleted account to the
retained account. After executing this activity the retained account contains all the entities
from the deleted account.
Addresses
Beginning with version 7.21, Sales Automation has the option to support multiple addresses for
Organizations, Accounts and Contacts. Customers upgrading from a previous version will have
the option to either migrate to support multiple addresses, or continue to use a single address.
Address Type: indicates the purpose to which the address is intended to use for. Available
types are Alternate Address, Business Address, Personal Address and Shipping Address.
More address types can be added as needed. Each work object can have one of each
address type.
Primary (Address): It is required to have on primary address. This address is used to
calculate and store Geolocation information and is presented as the first address and is
represented in the map section at the right beside the address (or addresses).
When editing or adding addresses, the primary checkbox and address type are available, as
well as the “Add Addresses” link. For the first address, address type will default as follows:
Address data for Outlook and Mobile is displayed in a simplified UI to display only the primary
address. When a new address is created on Mobile or via the Pega for Outlook, it will default to
primary and the address type will default behind the scenes.
Migrating Addresses
Existing customers using the single address model can migrate to a multiple address model
using a migration activity to copy the existing addresses into the new structure.
Please reference the Upgrade Guide for details on how to migrate addresses.
Customers can choose to keep the single-address data structure from Sales Automation 7.14
and prior versions, or to leverage the new multiple address structure.
All rules required to cover the appropriate address feature are checking this DSS by the When
rule isToggleMultipleAddresses (applying to @baseclass) to decide which to use.
Property Structure
For the new multiple addresses support a new Page List Property Addresses applying to
PegaCRM- was created which is using the Data Class Data-Address-Postal, while the old Page
Property Address (using the same Data Class) still is used for the old single address support.
Index Tables
The following description references to Organization again, however it’s applicable for all other
entities containing addresses.
Each entity has a Detail tab which represents detailed information about the entity. This tab also
includes the address or addresses. The technical rules which is used for is the section
pyWorkSummary and applies to the appropriate entity class.
This section includes a couple of other sections which are used to present the address data:
This section represents the single address support, and the properties stored there are related
to the Page Property Address. If the When rule isToggleMultipleAddress evaluates to false, the
section crmAddress (applying to PegaCRM-Entity- and PegaCRM-Work-) is presented.
If the entity is in review mode, the upper Dynamic Layout 1 is presented, in edit mode Dynamic
Layout 2.
crmAddresslistReview Section
crmAddressList Section
This section is implemented as a Grid Repeat layout and uses the standard functionality of
PRPC.
For the appropriate entities on a mobile device the section pyWorkSummary_Mobile is used to
present the data in review mode. This section is extended by a section include with
crmAddressListReview_Mobile (applying to PegaCRM-Entity- and PegaCRM-Work-) which
presents the address data of the primary address in Paragraph
crmAddressDetailsReview_mobile (applying to PegaCRM-Entity- and PegaCRM-Work-).
For edit mode the section pyWorkSummary_Mobile_Write is used for entities. This section is
also extended by a section include with crmAddressMA_Mobile (applying to the appropriate
entity class) as shown in the screenshot below.
Field Values
For optimization and easier code maintenance (localization) the following field values are
provided:
ListRelatedToB2C Contact
ListRelatedToB2C Opportunity
pyMessageLabel AddressTypeMustBeUnique
pyMessageLabel OnePrimaryAddressrequired
pyMessageLabel OnlyOnePrimaryAddressRequired
Duplicate Matching
Duplicate matching functionality is currently available for Contacts. Customer-defines matching
rules are applied to alert the user of potential duplicate records when:
The Duplicate Search supports the detection of duplicate entities but it does not prevent
duplicates because the user has the ability to ignore the potential duplicates. It is simply a tool
to identify potential duplicates and do not deny the creation of a new Contact.
Out of the box, the Duplicate Search runs automatically in the background when the user puts
data into the following fields. Customers can easily configure this matching logic to suit specific
business needs.
First Name
Last Name
Email Address
The implemented logic checks whether these fields have content and performs the check when
the appropriate field is updated.
If the Email Address matches another Contact entity that the user has access to Single
Field Trigger
If First Name AND the Last Name matches another Contact entity that the user has access
to Double Field Trigger
The system runs the Duplicate Search in the background and show the “See X potential
duplicates” link under the updated field if a match is detected.
Click on First Name or Last Name: the selected Contact record will be opened in review
mode. The already opened screen to create a new Contact will still be kept in the
background and can be selected from the recent list again for further processing.
Click on Ignore Button: the overlay will close, and the user may continue to create the new
Contact.
Click on Cancel Add Button: the whole process to create a new Contacted will be cancelled,
the user returns to the initial point. When Converting a Lead to a Contact this will instead be
a “Use Existing” button that allows the user to select an existing Contact for the conversion.
The center UI component where the event to run the Duplicate Search is triggered is section
[Link]. For the properties WorkEmail, FirstName and
LastName Action Sets are defined, they differ only by the parameter SetSearchOn set in Action
1 as described below. The following actions are defined:
WorkEmail
Event: Change.
Action 1: Refresh–This Section. In the context of this refresh the Data Transform SetSearchOn
is triggered with the parameter SetSearchOn = “Email”.
FirstName/LastName
This differs in the case when a Contact will be newly created when a Lead will be converted into
a Contact. The primary context represented by clipboard page pyWorkPage is now PegaCRM-
Work-SFA-Lead. The context is also changed when a Contact is created by relating it to an
Organization or an Account. pyWorkPage then will be in the context of PegaCRM-Entity-Org or
PegaCRM-Entity-Account. In all of this three cases the Contact creation will be handled by the
clipboard page LinkContactPage.
The Data Transform crmSetContextForDuplicateSearch ensures that the data used for the
Duplicate Search is created and used properly.
UI – Additional Sections
When hovering over the link an overlay appears which shows the duplicate candidates. The
overlay is described in a later chapter.
This Data Page is used to present a list of potential duplicate entities. It is defined as a list of
PegaCRM-Work- (for future use and extension), has a Thread scope and reloads once per
interaction.
Because of the standard behavior of Data Pages related to the scope and refresh strategy, this
page is newly created when it is triggered by the When rule AnyDuplicates which runs any time
when the appropriate input field in the UI is changed. So the important part of the Duplicate
Search happens in the Load Activity BuildDuplicateList.
This activity runs the Duplicate Search based on the information already placed on the
clipboard. The steps are described in more detail in this chapter.
To restart a clean process for Duplicate Search Step 3 clears the property
DuplicateDetectionMessage, Step 4 clears potential existing messages on PrimaryPage.
If When Rule RunDuplicateSearch evaluates to true, step 5 sets the parameter properties to call
the appropriate Report Definition GetDuplicateList while Step 6 passes the needed parameters
for the search to Report Definition by using the Data Transform BuildDuplicateSearchCriteria.
When rule RunDuplicateSearch evaluates in this implementation any time to true. This
mechanism is planned to be used as an extension point to run the Duplicate Search
conditionally in future. If it evaluates to false, the activity steps immediately to step 11 and runs
Method Page-Remove on D_DuplicateList.
In case that that more than one potential duplicate entry is identified, in step 8 the Property
DuplicateDetectionMessage is set with “See [X] potential duplicates”. If only one duplicate entry
is found, step 9 sets property DuplicateDetectionMessage with “See 1 potential duplicate”. After
setting the property, both steps are jumping directly to step 12 and end the activity.
As already described above, step 11 removes the Data Page D_DuplicateList from the
clipboard.
Households
Overview
For B2C Selling business models, there are requirements around associating individuals into a
specific ‘Household’ or more generally into ‘Groups’. These associations allow for modelling
efficient upsell use cases for a household and provide for efficiency in consolidated mailings.
Display a grouping of contacts called household with the ability to identify a contact as a
primary person of contact.
Add a contact to the household
Remove a contact from the household
Associate opportunities or Accounts to the household
Household List
Household is a new concept that is used to group people into an entity. If the DSS setting for
household “UseHousehold” is enabled and the selling mode is “B2C” or “B2B_B2C”, the left
navigation menu will display Household menu on both the desktop and mobile. On mobile
devices, When the selling mode is “B2C”, the Household tile is also displayed on the mobile
launch pad.
When the Households link is selected and clicked, the right side of the portal will display all the
households you have access to.
Creating Household
You can create a new household by pressing the button on the top right corner of the household
list. It will display a screen that allows you to fill in information about the household and identify
all the members in the household.
On this screen you can enter the name of the household, phone number, description, and the
address of the household. There is also a checkbox called “Use Head of Household Info”.
When checked, the information will be populated with the information from the head of the
household. This checkbox is available only when the DSS setting “UseHouseholdDefaultName”
is enabled.
The second half of the screen is the list of members associated with the household. You can
add members by clicking the Add/Remove Members button. It will open a modal dialog.
The dialog will display a list of contact information for all Sales Automation members that you
have access to. To add a member to the household click the name. This will remove it from the
available list and add it to the household. Once a member is in a household, you can set their
start date, end date and role. There are validations when you submit or when you select the
role. A household must have only one head of household. The head of household will
determine the territory the household resides and who has access to the household. You can
also remove members by clicking the trashcan. This will remove the contact from the household
and return it back to the available list.
Once member updates are complete, Click Submit to return to the main household screen. You
can still update the role, start date, and end date before creating the household.
When you select to Add/Remove Members, the list of members is displayed for you to update.
In both update screens, a “Show Inactive Members” checkbox is displayed. Once a member
has been added and submitted to the household, if they are removed they are also added to the
inactive list for historical purposes. This checkbox will toggle hiding and displaying a list of
inactive members.
Contact
If household is enabled and the selling mode is B2C or B2B_B2C a Household tab on the
contact screen can be used to display the household this contact is associated with.
Here, you can create a household and add members. You can also add the member to a new
household or to an existing household.
You can enter the information for the household. The “Add/Remove Member” button is not
available because option is intended to provide a quick way to create the household, adding this
contact as a member.
After selecting an existing household to add the member to, the household information is pre-
populated. The member that you want to add to the existing household is listed at the top. The
role, end date, and start date are updatable. When adding a new member, you are allowed to
reconfigure member roles for the household. So, for existing members, the only field you can
modify from this screen is role.
Classes
Household
Data Model
Flows
Household has the basic crmCreate, crmEdit, crmClose and crmReactive flows, and several
additional flows. They include
Household Members
Data Model
The Household member class extends a base class called PegaCRM-Relationship. The
relationship class is used to identify the relationship of a person to the entity. We can identify
whether this member is head of household and when they joined or left the group. Some of the
key properties in the relationship class are:
− FromRole : Used to identify the role of the person’s relationship in the entity
− LinkedFrom : The contact id (person)
− LinkedFromClass : The contact class
− LinkedTo : The household id (entity)
− LinkedToClass : The household class
− StartDate : Relationship start date
− EndDate : Relationship end date
Team Selling
Pega Sales Automation provides the ability of Team Selling on Account level.
Each Account would normally have a single Owner that has full permission to this object, with
permissions based on territories. A sales representative who does not have access to the
appropriate territory and is not part of the related Sales Team would not have access to the
account.
With the concept of Team Selling, it is possible for sales representatives in other territories to
get permission to an Account. To implement this feature, a sales person is assigned to the
Sales Team as a member with the role Sales Rep. In this case the new assigned sales person
will become automatically a co-owner of the appropriate Account and will have the same
permissions the owner has on the object.
The Team Selling or co-owner permissions will automatically be removed when a sales person
is removed from the Sales Team list of the related Account.
There are two UI sections where the co-owners can be identified. One is the Tab Sales Team
where any team member entry with the role Sales Rep is automatically a co-owner.
In this Tab also the Account Owner can be identified with the Role Owner.
The other section is in the Account details where a comma separated list of all co-owners shows
up in the property Owner(s).
A customer activity is any meaningful communication between a sales rep and a customer or
potential customer that is designed to drive a sale or develop a professional relationship. A ten-
minute phone call to introduce the customer to your company and describe the products offered
is a customer activity. A 1-hour discussion about sports, holiday plans, and the summer
blockbuster is not. A customer activity involves at least one contact and at least one member of
the sales team. It has a purpose, an outcome, an interaction date, and can have follow-up tasks.
The activity should also be related to an account or opportunity.
Fields Detail:
Field Description
Subject Subject for the interaction made
Date Date on which interaction takes place
Communication type The channel used for the interaction like email, mobile, In Person
Related To type The work object the interaction is related to
Related To Name of the work object
What was the outcome? Specify the final outcome
Customers List of all customers who participated in the interaction
Internal Staff List of all the internal staff people who participated in the
interaction
Follow-Up Activities Any follow-up activities that need to take place after the
interaction
The Activity functionality is part of the product and is shipped with the PegaCRM and
PegaCRM-SFA rulesets.
Flow: crmCreate
Activity: InitializeCustomerActivity
Activity: CreateToDo
Description: Loop through follow up task list and create new task for each follow up entries.
Activity: UpdateStatus
The following figure shows the Review screen. From one activity, you can create another
activity work object.
You can create activities from Opportunity, Contact, Account & Organization, and make
associations from these work objects.
Activity: crmOpenActivity
Lead Management
Pega Sales Automation enables organizations to manage leads from initial capture and routing,
through the qualification process, and ultimately though conversion to an Opportunity. Leads
are usually sourced via bulk import, web services, or manual entry.
Click on any of the leads in the Leads screen to open the lead object in the Review screen.
Capture
Pega Sales Automation supports multiple lead-capture strategies:
Manual lead input – Quick Create menu on top of each user portal enables you to create a
lead manually.
Bulk import utilities. See the Bulk Upload section under Administration Tools:
Real-time integration with Pega Next Best Action Marketing – Once you import the Pega
Next Best Action Marketing adapter rulesets, you can create leads through local campaigns
or program functionalities. Requires NBAM licensing.
Web service access for real-time integration with third-party marketing automation – lead
creation is exposed as a web service in Pega Sales Automation.
Exposing an IAC lead capture form on a public website.
Route
Marketing Ops or Sales Ops teams can use Pega’s decision logic to set up routing rules so that
leads are assigned to the correct individuals upon entry. Below is an example of using a
decision table that could be configured to route leads.
Push notifications are available to alert representatives of new leads on their mobile devices.
See the Push Notifications section in this chapter for more details.
Nurture
You can use local campaigns in Pega Sales Automation, to drive marketing campaigns or sales
strategies. Local campaigns offer a high degree of flexibility so you have control over each detail
of an offer.
You can qualify, disqualify, or convert leads based on the result of the campaign.
You can configure process flows to define the appropriate actions based on campaign
response.
You can create email templates based on corporate designs to use in the campaign.
Qualify
As a lead progresses through its lifecycle, the owner can qualify or disqualify the lead.
Sales Reps can qualify Marketing-qualified leads in one click by changing the stage for the lead.
You can Qualify a lead by selecting Actions > Edit on the review screen of a lead and by
changing the status.
Convert
The last stage of the lead management process is to convert the lead to an opportunity or
contact on the appropriate account.
You can convert leads to new opportunities, existing opportunities, new contacts, or existing
contacts.
Sales Reps can convert a lead in a manner that makes the most sense for the business. To
convert the leads, the sales reps launches the following screen by selecting Actions > Convert
Lead on the Review screen of a lead.
Opportunity Management
Opportunities are qualified deals that you track, nurture, and manage. Opportunities are the
foundation of your sales pipeline, goal attainment, and forecast.
Sales managers are able to easily assess their team’s opportunity pipeline and performance
with visibility into management reports, dashboards and forecasts.
Click the Opportunities tab in the left navigation pane to display the opportunities page.
In the Opportunities Screen, click any of the available opportunity links to display the
Opportunity Object.
Fields Detail
Field Description
Name Name of the Opportunity
Short Name Short Name of the Opportunity
Description Description of the opportunity.
Amount Estimated total sales amount.
Close Date Date when you plan to close the opportunity.
Stage Current stage of opportunity based on selections you make from
a predefined list, for example, Prospect or Proposal.
Probability Likelihood the opportunity will close, stated as a percentage.
Forecast Category Forecast category of the Opportunity
Source Source of the opportunity, for example, Advertisement, Email, or
Web.
Must Win High priority opportunity – Company really wants to win
Account Name of account the opportunity is linked to.
Owner Assigned owner of opportunity.
Territory Territory with which the opportunity is associated.
Age Age of Opportunity in days. i.e., from creation to closure.
Partners Partners of the Opportunity
Competitors We can track competitors in the opportunity.
Products Specific product or service that is purchased and delivered to the
prospect as it relates to that specific sale.
Sub Tabs
The Opportunity screen has the following tabs:
Tab Description
Details Displays Partners, Competitors, Products and Stage History
Contacts List of all the contacts associated with this opportunity.
Activities Displays Activities, Tasks, Emails and Appointments associated
to the Opportunity.
Leads List of the leads that are converted to this opportunity.
Narratives Updates for the current and previous weeks.
Attachments All file attachments associated to the opportunity.
Sales Team All sales team members and followers of the Opportunity
Pulse Pulse social content
Sales Methodology
Sales Automation leverages Pega’s Case Lifecycle Management to model your sales
methodology and guide your reps through every step of the process.
Opportunities progress through sales stages from initial qualification through to closure of the
deal. Pega Sales Automation ships with standard stages, which can be modified to support
your sales process. Stages are assigned probability values that represent the likelihood of a
deal closing.
The following decision table is used for holding the probability values corresponding to the
stage.
When an Opportunity is created, steps that you configured are created for each stage in your
sales process. Launching a step initiates a flow that can be configured to automate a process,
capture data, and ensure that a step is executed. For example: require a contract, launch an
email template, capture competitors or create an Appointment for the team working the
Opportunity.
Because every organization has a different process, Pega Sales Automation does not ship with
specific steps. However installing the Sample Application exposes 14 sample steps that
showcase the capabilities of this feature, as seen in the following figure. For information about
how to install, configure and demonstrate the sample steps, see the Tech Note Working with the
SFA Sample Application, available from the Pega Sales Automation page on the Pega
Developer Network (PDN): [Link]
All steps used in the stage view are defined within the case type rule, and any step definition
represents a flow which is performed when the step is called.
The following screenshot show an excerpt of the case type rule containing stages and steps:
All steps are maintained in the case type rule. So if steps should be added or removed, this
needs to be configured in this rule prior the steps can be configured and used.
To bridge that gap the solution is implemented using the following features:
Load Activity
The Load Activity crmLoadStageStatusDP is used to propagate the needed visualization data
on Data Page D_crmCaseStagesAllSteps.
The following description does not cover all details of the activity but focuses on the relevant
functionality for the visualization. Note that visualization in this context means displaying the
needed identifier and providing related information. It is not concerned with UI styling, which is
not part of this description.
Step 2: this java step collects all data used to display the stage view later on. It accesses the
case type rule to get the stage and step definition and creates the appropriate data
structures for the current opportunity object.
Step 5: this java step prepares the data content which is important to show the stage view
chevrons later as expected.
Step 6: the prepared visualization data will be copied to the final Data Page.
Data Page
Data Pages that do not exist on the clipboard are created automatically at the first access or
reference. The Load Management algorithm determines when refresh will occur. This behavior
is used to simplify the implementation of the propagation of the stage view visualization data.
The Data Page used to provide the stage view content is named D_crmCaseStagesAllSteps
and is configured for Thread mode. This is done because each opportunity has the same stage
view but the step completion state can differ.
The Data Page will be reloaded once per interaction to immediately cover any step state
changes.
UI sections
The data for an opportunity case is displayed using the section pyWorkSummary. This section
is extended using the section crmDisplayStages which contains a Repeating Layout of all
class entries stored on Data Page D_crmCaseStagesAllSteps of Class Embed-Stages. This
data is used in section crmStageName which is embedded in section crmDisplayStages.
For the step presentation each stage entry on the Data Page contains a list steps belonging to a
specific step. This data is used in section crmStageProcesslist as a Repeating Layout of Page
.pxProcess of class Embed-StageProcessHistory. This section is embedded in section
crmStageName.
The Opportunity Lifecycle Management provides the ability to indicate step completion.
Therefore a green checkmark is used in the UI.
The indicator is set automatically when a step completes by clicking the Submit button.
During post-processing of the flow actions of each step a Data Transform stores that information
in the Value Group Property crmFlowsCompleted by adding the current flow name as value.
The property itself is stored into the opportunity object. The following pictures show an example
on a flow action as well as on the clipboard.
The Value Group Property crmFlowsCompleted is used any time when the stage view within
the opportunity is re-rendered.
In the stage view, each step is represented by a link which performs a specific step flow when
clicked. Those step flows generally do not create a new work object but they modify specific
data of the opportunity itself or provide the ability to run certain actions such as sending emails
and appointments as well as attaching documents to the opportunity.
The following description illustrates the common implementation of a step, and specific
implementation excerpts with regard to attachments, emails, appointments and validations.
The screenshot below shows the technical base flow definition which is almost identical for all
step flows.
1. Set properties, especially the initial value “Proposal” to identify the relevant attachment
category for this flow.
2. Use the ProposalDevelopment assignment shape for user interaction and internally place
the work object into the workbasket SFADefault where it is picked up by the user.
3. Save user input using the crmProposalDevelopment flow action, which is performed when
the user clicks the Submit button. The user input is saved, the completion checkmark is set,
the flow ends and the user returns to the opportunity screen.
4. Perform the flow action crmCancelAction when the user clicks the Cancel button and runs
some cleanup actions. The user returns back to the opportunity screen without any
modifications.
If needed on flow actions, pre-processing actions (Activity or Data Transform) can run before
the UI is shown to the user, validations can run to validate the user input, and post-processing
actions can run to finalize the user interaction.
Related to the flow Proposal Development, the following actions are defined:
Validation crmValidateProposal –
This validation runs when the user clicks the Submit button. It verifies that a proposal is
attached to the opportunity. This is required for the step flow to complete successfully.
Common handlings of Pega such as RuleSet Definitions, configuring Operator ID’s or check in /
check out are not part of this description.
As long as no other rules from different RuleSets are used, all rules apply to PegaCRM-Work-
SFA-Opportunity and will be saved in RuleSet PegaCRM-SFA.
The Sales Automation application is designed such that all steps are defined as manually
launched processes.
Check out the case type rule for Opportunity and select the Stages tab.
To associate the new step with the Qualification stage, click the add icon below the existing list
of manually launched processes.
Enter the name of the process that should be launched for the step by either selecting an
existing flow or creating a new one. In this example the existing flow ExecutiveVisit will be
selected.
If a new flow will be created then it is important that this flow is saved before saving the case
type rule, otherwise an error message will occur.
Clicking on the add symbol (pointed by the arrow) will allow you to create a new flow or edit the
existing flow.
This example Flow is constructed very similar to the step flows. Features they have in common
are:
Each flow contains an assignment for user interaction. This assignment is named as the flow
itself.
Each assignment has the flow action crmCancelAction which is performed when the user
clicks the Cancel button. It will clean up prepared data for the flow if applicable.
Each assignment has a flow action to perform the flow-specific action and follows the
naming convention crm<FlowName>
All that is required is to include a new flow behind a new step. The new step in the Case Life
Management then appears the Qualification stage. Assuming that the flow behind the step is not
in draft mode, it can be performed with a click on the step ExecutiveVisit.
If required the step flow can now be modified and extended as needed.
Connector properties (A): sets an indicator whether the flows are currently running in a stage
flow. This influences the behavior of the contained flows.
Connector properties (B): resets the indicator mentioned for Connector properties (A).
Because each contained flow can be cancelled, the indicator is reset on the crmCancelAction
flow action of the appropriate flow, because potentially following flows are not performed and
the end of the stage flow can not be reached.
Beware that in any contained flow where the user clicks the Submit button, this flow will be later
on indicated on the stage view as completed.
As the next step the flow needs to be associated with the stage. The stage itself represents a
link within the stage name.
Technically this link is located in section crmStageName and requires an Actions set
configuration, as shown in the image below. The stage flow name must be the same as the
stage itself.
Opportunity Merge
Account merge functionality enables a user to find duplicate Opportunities and merge them
while keeping the essential information intact.
This is performed by first finding the duplicate Opportunity, then selecting the correct information
from both entities and then deleting the duplicate work object.
From the Find Duplicates screen, the duplicate opportunity is selected; it can be searched
by using the filters provided.
Once a duplicate Opportunity is selected, a screen is displayed that allows the user to
select values for the fields from either of the opportunities or to enter a different value. The
screen has a Master record (which is retained) and a Duplicate record (which is deleted).
The user selects values for the fields and then clicks Submit to merge the opportunities.
Once the opportunities are merged, the final Opportunity screen comes up, which has the
field values as selected from the previous screen.
Flow: crmFindDuplicates
Description: This is the flow specific to the Opportunity Merge functionality. Same flow is
used for both B2B and B2C.
In the crmFindDuplicates flow, the crmFindDuplicates flow action is invoked. In this flow
action, the crmFindDuplictes section is referenced. If any changes are required in the Find
Duplicates UI, the crmFindDuplicates section is overridden. There are two different
crmFindDuplicates section rules to implement B2B and B2C functionality.
Activity: crmPostMerge
Description: This activity merges all the associated entities from the deleted opportunity into
the retained opportunity. After executing this activity, the retained opportunity contains all
the entities from the deleted opportunity.
Forecast Management
Forecast Overview
Forecasting provides Sales Management with a summary of the pipeline for the year, broken
down by fiscal quarter and forecast category. The overall capability sets include:
Ability for Territory owners in the hierarchy to adjust the three critical values related to
opportunities (Stage, Amount, Close Date) and set a Forecast category on each opportunity
Ability to represent the Forecast to Sales management according to fiscal quarters and
Forecast categories, drill downs into the relevant details
Appropriate security measures to ensure override values and Forecasting capabilities are
only shown to the right levels in the territory manager tree
Ability to get business insights into “What’s changed”
Forecast is a tabular representation of all the opportunities the user is working on. It is used for
analysis, understanding the pipeline, and planning. You can forecast by clicking the Forecast
tab.
Forecast displays the four quarters of the fiscal year and the forecast categories. The number at
the cross-section of two values is the total opportunity amount for those opportunities that fall in
that category. To view a different year, adjust the filter.
You can select a territory for which you want to see a forecast from the autocomplete, which
shows list of territories whose forecast you have access to view.
To see the forecast values for all the opportunities you own, you can select Owned by me in
the autocomplete list.
By selecting the grand total value, a list of all your opportunities for fiscal year 2012 appears
below. You can open each opportunity by selecting the name from the list.
To update your forecast, select Update Stage from the Take Action menu in the opportunity
record.
The update stage editing mode allows you to change the stage, close date, and forecast
category. The changes made here automatically appear in a refreshed forecast table.
To override the forecast at various levels up the hierarchy of territories for an opportunity, select
Forecast from the Take Action menu.
Only operators who own a territory can override the forecast values at that level. An operator
with the SFAForecastUpdateAll permission can update the forecast for all opportunities at
every level.
Narratives
Narratives add a qualitative dimension to the forecasting process. Sales reps enter weekly
updates summarizing their accomplishments for the current week, and their plans for the
coming week. All levels of sales management can see Narratives for the opportunities in their
Territory and contribute their own insights.
Click the Forecast Tab in the left navigation, and then select the Narratives sub-tab. The default
filter is all Opportunities for the Current Quarter. Selecting an Opportunity displays the most
recent narratives for that Opportunity, along with any Management insights. Sales reps and
managers can add and update the narratives in the right pane.
The Filter by dropdown allows for a Custom Search, or a search by Organization Name
When selecting Custom, search dialogues for Quarter, Forecast Categories, Territories and
Account Executives (reps) become available. This allows Reps and Managers to search across
all Narratives that they have access to.
Narrative data is often used on sales calls to review the relevant opportunities and share
updates across the sales organization. The Export to PDF link generates an easy to read
report to easily share and distribute with your team.
Creating Narratives
From the “Forecast” tab in the left navigation pane, select “Narratives”.
Once a Sales Rep selects “Narratives”, the Rep will get a list of all the Opportunities under
his domain on the left side. Every opportunity in the list has a checkbox. If Narratives are not
filled for the current week, then the checkbox remains in an unchecked state.
When the narratives are filled and saved, the checkbox is automatically checked. Also, the
name of the Rep who last updated the narrative is also mentioned.
The down arrow on the page gives brief information about the selected opportunity and by
clicking the “View Opportunity” link; the complete opportunity record is opened.
The management insight dialogue allows managers to provide insight and feedback to the
sales rep and other managers.
If more than one manager is involved in an opportunity, they can all add their Insights in
different dialogues.
The pattern establishes a basic structure and UI rules for displaying the top, left, and main
sections of the landing page, as well as a mechanism for traversing a list of work objects on the
left and opening them in the main section.
The Sales Automation Landing page for sales reps follows a generic pattern we have
established at the PegaFW layer. The pattern is meant to identify the structure of the landing
page and extension points. All changes made should be in an implementation layer.
Class: Data-Portal-LandingPage
Ruleset: PegaFW-LandingPages
Usage:
UI Rules:
LandingPage - This harness rule provides the structure for all landing pages. Override it
only if you want the layout to be radically different.
LandingPageHeader
LandingPageLeft LandingPageMain
LandingPageHeader – this section rule contains the Header Text, Actions, and SubHeader.
Header Text is a property set in the pyDefault data transform and is displayed using
formatted text. It is expected that both LandingPageActions and LandingPageSubHeader
are overridden.
LandingPage
Actions
LandingPageSubHeader
LandingPageLeft - this section will hold the list of work objects the user should be
browsing or working on. It contains a grid repeat populated with D_LandingPageWorkList.
Clicking on a row sets the focus and changes the value of the Work ID and Class properties
used to populate the LandingPageMain section. You can also use the up and down arrows
to do the same.
This section should be overridden in your implementation class.
LandingPageMain – this section contains the content you wish to display for each work
object as it’s selected. By default it displays the pyWorkSummary section using
D_LandingPageWork as the context. The section is refreshed whenever WorkID is changed.
This section should be overridden in your implementation layer.
Note: do not remove the Work Action, Class, and ID fields; these are needed to update
the context when a new work object is selected.
Data Model
The data model is very simple, consisting of a few properties to keep track of the current work
object and a data transform used to initialize the landing page.
pyDefault – sets the HeaderText property. Override this data transform in your
implementation layer to customize the header or initialize any other fields.
HeaderText – displayed at the top of the landing page
WorkAction - the default flow action users are expected to take on each work object
WorkClass – the class of the object the user is working on
Data Pages
Two data pages are used by the landing page rules. These data pages are designed to be very
generic so they can be extended or reused as needed.
D_LandingPageWork – this is an editable data page defined on Work- that holds the work
object the user has opened in the landing page. It calls an activity OpenLandingPageWork,
which takes the WorkID and WorkClass parameters.
D_LandingPageFilter acts as a one-stop page to make sure that the data is filtered as per
requirements. By setting appropriate values for the filter page properties, we will be able to
filter the data on load
Some of the items we filter by are
DateFilterForLP holds the date time range that needs to be considered on the report
BaseFilterForLP holds the value of the base filter. Valid values are “Select…”, “Custom”
and “Search by Opportunity”
ForecastFilterForLP holds the forecast stage from the filter
MyOwnTopBTListString Populates the Top level BT for the logged in user
TerritoryID Holds the territory Signature of the filtered territory
pyOwnerName Holds the filter values for the Users.
OrganizationName Holds the filtered values for Organization
Sections
LandingPageLeft
The LandingPageLeft section holds a repeating Layout that has a Data Page
D_ClosePlanWorkList that is a thread level page with source as the report definition
WorkListforLandingPage. It also has a post response data transform that sets results from
the data transform to the primary page. The Repeating Grid Layout gives pagination on 8
rows. On the UI front, each row holds the Opportunity Name, Organization name for that
Opportunity, Owner name, Forecasted Amount for the logged in User and Opportunity Close
Date. We also have a check box for representing if the Close plan update has been set. The
logic for the same is set in the post response data transform for the Parent data page. An
onclick event has been configured for the below actions.
a. If there are any unsaved close plan updates in the previous screen, then display a pop-
up modal with the message that there are some unsaved items. The user is given the
option to either save it from the modal itself or discard the changes. For this there is a
JavaScript written to perform doGridAction in the [Link] file
added to the Harness. It calls a flow action via the script doGridAction
(ev,"FLOWACTION","ConfirmDialog", {"noThreadProcess":"true"},null,"false");.
In the ConfirmDialog Flow action we call the ConfirmDialog section that gives the
message that you have some unsaved items
The opportunity list in the Narrative tab is populated from D_ClosePlanWorkList data page.
Export PDF
The Export PDF link calls the local action getClosePlanExport which loads the section
ConfirmExportYesNo on the modal
The Continue with Export button opens up a new Window and loads an Activity that streams the
PDF related data.
ExportClosePlantoPDF activity loads the getMyTopTerritories activity to get the Top Level
territories in the current context.
It then loads the Harness as a stream. The Harness Holds the sections in the same
arrangement as required on the PDF. Here the Harness Used is ClosePlanReport in Rule-
HTML-Harness. This contains the UpdateSummary section which has a dynamic layout with a
source of D_ClosePlanReportList and it populates the data to the section
ExportOpportunityDetails
The updates are loaded from the list .ClosePlanUpdates. This property refers to a data page
and accesses the data from that page via a key.
Calling the HTMLToPDF in ExportClosePlantoPDF creates the PDF and the below code takes
care of naming and export.
The Opportunity modal view is shown by launching the local action OpportunityDetailsWrapper
as on Overlay.
The editability of the Close Plans Updates for current week is controlled by
CanCreateManagementInsights when rule shown below. Note:It makes sure if the user has a
privilege CanCreateManagementInsights we make sure it is not editable.
Mobile
Desktop vs Mobile Features
Offline First
Pega SA is a Mobile-ready application with offline capabilities. The application is built on the
ideology of Offline First. It works with an assumption that it is always functioning in offline mode;
as a "special case", if the system happens to be online, the synchronization of the data happens
immediately.
Mobile Launch Pad: The launch pad in the mobile application shows all the work objects in the
form of tabs. Clicking one of these tabs causes the landing page for the corresponding work
object to be displayed. These tabs also have an Add “+” icon that enables quick creation of new
work objects. The launch pad effectively helps in navigating through the application.
In the offline mode, the launchpad looks the same but the “+” icons are not present for the work
objects which can’t be created in offline mode.
Left Navigation Menu: Navigation to any part of the application becomes even easier using the
left navigation panel. The option to open the left navigation panel is available on almost all of the
screens. This panel provides links to all work objects along with links for launch pad, dashboard,
Recent and Following, and “Log Out” options.
In the offline mode, the left navigation menu looks the same except for the indicator on the top
to indicate the offline mode.
Enhanced Search: Sales Automation mobile UX has been enhanced to support Search
functionality. Global search is available in the launch pad and via the left navigation panel. The
search results are presented with separate tab icons to easily filter search result for different
work objects.
In the work object search landing screens, the search is limited to the specific work object.
Also, in B2B_B2C mode the work object specific search provides results based on the specific
tab selected - Individual, Business or All.
Lucene search is disabled in the offline mode. If search is attempted, user gets a prompt saying
the action can’t be performed in offline mode.
Work object landing screens: Whenever a work object is selected from the launch pad or left
navigation panel, the landing screen for the work object is displayed. This screen lists the work
objects in different tabs as required by the work object. Also, the landing screen has a work
object specific search capability.
In the offline mode, the landing screens are modified to accommodate the offline requirements.
Not all the records are displayed in the offline mode.
Work
Mobile Offline Mobile Online
Object
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
All: Show List of logged activities in All: Show List of logged activities in
Activities
last 90 days ordered by update date last 90 days ordered by update date
descending descending
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
All:Blank screen prompting user to All:Blank screen prompting user to
Contacts enter search term enter search term
Nearby: List of contacts within a
Nearby: Hidden
distance range
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
Accounts Business: List of Business Accounts Business: List of Business Accounts
Individual: List of Individual Accounts Individual: List of Individual Accounts
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
Business: List of Business Business: List of Business
Opportunities Opportunities Opportunities
Individual: List of Individual Individual: List of Individual
Opportunities Opportunities
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
Leads Business: List of Business Leads Business: List of Business Leads
Individual: List of Individual Leads Individual: List of Individual Leads
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
Organizations
All: List of All Organizations All: List of All Organizations
Favorites: Recent + Followed cases Favorites: Recent + Followed cases
Households
All: List of All Households All: List of All Households
Work object detail screens: When any Work Object is selected from the landing screen, the
detail screen is displayed. It contains the main details and the sub-tabs are listed which can be
selected to expand and display appropriate information.
In the offline mode, Activity detail screen is shown exactly as it is shown in the online mode. For
rest of the objects, only selective information (Master information) is shown and rest of the
details are hidden.
Pro-active log feature: The search result or any list view of the Work Object’s display links to
make a call or to find a location. After completing a call, the operator is prompted to log an
activity. Also, for any contact in the search list, there is also an option to quickly create Activities
related to that contact.
In the offline mode also, this feature works. When a call is initiated, because of the offline mode,
it gets cancelled, but the modal window to create an activity is opened and gives user to log an
activity in the offline mode as well.
Geo-Location: The Work Objects with an address will display with a location icon in list views.
Clicking on the location icon displays the location of the Work Object in the Google map. The
Contacts landing page also has a tab for displaying “Nearby” contacts. This tab uses geo-
location and latitude / longitude stored on each contact to display nearby contacts.
Salesperson Dashboard: The Salesperson dashboard can be selected from the left navigation
panel. Using the responsive tabs icon, a user can navigate to all the available dashboards.
Recent and Following list: “Recent” and “Following” can be selected from the left navigation
panel. “Recent” lists all the work objects recently opened. “Following” lists work objects being
followed by the logged in operator.
Forecast
Forecasting provides Sales Management with a summary of the pipeline for the year, broken
down by fiscal quarter and forecast category. Forecast is a tabular representation of all the
opportunities the user is working on. It is used for analysis, understanding the pipeline, and
planning. This forecast feature is now available in mobiles as well.
Forecast can be accessed from the left navigation pane. The opportunities are divided based on
the forecast category and the quarter. Filters are also available to enhance the mobile
experience.
Narratives add a qualitative dimension to the forecasting process. Sales reps enter weekly
updates summarizing their accomplishments for the current week, and their plans for the
coming week. All levels of sales management can see Narratives for the opportunities in their
Territory and contribute their own insights.
Narratives are now available in the mobile also in the online mode. They are available by the
name Close Plans in the mobile. They can be accessed from the left navigation pane. A new
close plan can be added from mobile as well.
Appointments:
Appointments are now available on Mobile and it displays the Pega 7 calendar. It is accessible
from the left navigation. When opened, it shows current week and list of appointments with
present day highlighted. User can navigate to any date and check the appointments for that day.
When any appointment is opened, it shows the location, attendees, time and objective of the
appointment. Users get “Late for Meeting” notifications based on Current Location, Meeting
Location, and Driving time to location with traffic. The Notifications also show on each
appointment in Mobile
A new sub tab under Appointment, “Social Activity”, lists the tweeter feed of all the attendees.
This helps reps better prepare for their conversations.
1. Open the respective Edit Case Type , in settings tab go for General settings and find the
Check box to Enable Offline
2. From Designer Studio->Mobile->Offline in the CaseTypes Tab , we can see the Case types
which are Offline enabled and which are not
1. Open the respective Edit Access Group, in Advanced Tab , in Run time Configuration find
the checkbox for Enable Offline Support
2. From Designer Studio->Mobile->Offline in the Access groups Tab, we can see the Access
Groups which are Offline enabled and which are not
− As Grid Repeat Layouts are not supported by Pega 7.2 , all the Grid Repeat Layouts’ are
replaced by Repeating Dynamic Layouts for the List Views.
− As a data source for the Repeating Dynamic Layout, all the Report Definitions are
replaced by Data Pages to get the packaging done easily.
− To provide the Search functionality in Offline also, two data pages are created, one is
Parameterized data page which is binded to the RDL and the other is Non-
parameterized data page which is used to populate the data to the binded data page
with the usage of JS function (loaded at the Portal Harness Level)
For Example, for Activities:
− To hide few tabs in Offline, like Nearby tab in contacts can be achieved by using
Visibility Expression “[Link] == true “ which shows up
the tab only if the server is available.
− Primary Details Section: It displays the main Master Details of the respective Work
Object in both Online and Offline mode.
− Secondary Details Section: It displays the sub-tabs list with the run of flow action and
shows up only in Online and in Offline it shows the indication saying “ Cannot perform
this operation when offline”
In the offline mode also, this feature works. When a call is initiated, because of the offline
mode, it gets cancelled, but the modal window to create an activity is opened and gives user
to log an activity in the offline mode as well.
As Data Transforms are not supported for Offline Functionality, pre-population of the values
while Logging an activity is achieved with the help of JS function which gets called when the
flow get called ( function is present in the [Link] file which gets loaded at
portal harness level).
Geolocation
Geolocation functionality enables sales reps to display maps of contact locations, and perform
proximity searches for their contacts to easily get directions, from any device.
When the map first displays, you may be prompted to track your location. If you allow the blue
pin will show. If you deny, the blue pin will not show.
A “Get Directions” button is located below the map. If you click Get Directions a new browser
window will open for Google maps. The map displays the two points and provides directions
between them.
Proximity Search
On the Contacts list screen, there is a “Find Contacts Near Me” button, as displayed below.
This button performs a proximity search of your nearby contacts and displays a map showing
any Contacts within the specified radius. The search works on any device with location services
enabled.
There is also a “Find Other Contacts Near” button on a Contact Address that will perform a
proximity search of the Contact’s address, and will display any other contacts within the
specified radius of that Contact.
As seen below, proximity searches display a map with one red pin per contact within the radius,
and a list of the contacts showing name, distance, and a link to get directions.
PegaFW-Data-GeoLocation
PegaFW-Data-GeoLocation-Address_component
PegaFW-Data-GeoLocation-Bounds
PegaFW-Data-GeoLocation-Geometry
PegaFW-Data-GeoLocation-Location
PegaFW-Data-GeoLocation-MapPoints
PegaFW-Data-GeoLocation-Northeast
PegaFW-Data-GeoLocation-Result
PegaFW-Data-GeoLocation-Results2
PegaFW-Data-GeoLocation-Southwest
PegaFW-Data-GeoLocation-Viewport
Description: Setting to enable GeoLocation functionality. Valid values are: true, false.
Description: This Data Page is used to convert addresses into geographic coordinates which
are used to place markers on maps and to identify entities in given vicinity.
Description: The Data Page uses the following parameters to achieve the desired functionality:
Key: Holds the Google API Key to utilize the Google Geolocation features. The Key is held in a
Dynamic System Setting that can be modified by an administration.
Creating a key can be done by utilizing Google’s APIs Console, please click here for instructions
on how to generate the key.
Language: The language in which you want the result to be returned. (Click for a list of
supported languages.)
Region: The region code to limit geocoder results. (Click for a list of valid region codes.)
Component: Various component filters to further restrict geocoder results. (Click for
information on Component Filtering.)
Description: Sets the appropriate values (from the above parameters) for the Google GeoCode
API request.
Description: Captures the response from Google GeoCode API and updates the primary page.
In particular, the “Lat” and “Long” values will be used for the GeoLocation functionality.
Status: One of the following statuses are sent whenever GeoCoding is used
Key: Holds the Google API Key to utilize the Google Geolocation features. The Key is held in a
Dynamic System Setting that can be modified by an administration.
Creating a key can be done by utilizing Google’s APIs Console, please click here for instructions
on how to generate the key.
Language: The language in which you want the result to be returned. (Click for a list of
supported languages.)
Description: Sets the appropriate values (from the above parameters) for the Google GeoCode
API request.
Description: Captures the response from Google GeoCode API and updates the primary page.
In particular, the address values will be used for the GeoLocation functionality.
Flow: crmCreate
Class: PegaCRM-Entity-Contact
Description: This flow rule will check if the contact being created has an address. If the contact
has an address then it will check to see the method of creation, Manual vs. Bulk.
Activity: ValidateNew
Description: Validation activity for various values related to contacts. For GeoLocation, we call
crmRetrieveLatLong in a flow utility.
Activity: crmRetrieveLatLong
Description: ValidateNew activity passes the contact’s address values to this activity. The
values are concatenated and passed to D_GeoCode Data Page for conversion to location
values. If the Data Page retrieves a status value, from Google GeoCode API, other than “OK”,
the contact is queued for an agent to retry.
Description: If the crmCreate flow identifies the process being used as Bulk Upload, every
contact that has an address is queued for GeoLocation.
Activity: crmQueueForGeoCoding
Description: Queue a contact for the GeoCode agent to retry the retrieval of location information
for a given address.
AgentMaxRetryAttempts
Description: Determines the number of times the agent will attempt to retrieve location
information.
AgentDelayInterval
Description: Determines the amount of time before the agent begins to run (in milliseconds).
Agent: GeoCode
Description: Will run every 30 seconds and attempt to retrieve location information for the
queued contacts.
Activity: crmGeoCodeInstance
Class: PegaCRM-Entity-Contact
Description: This flow rule will check if the contact being edited has an address. If the contact
has an address then it will attempt to get geographical location (using crmRetrieveLatLong
activity).
Edit (Bulk)
Activity: CreateWorkFromUploadXML
Description: During the bulk upload process, any object (Contact for our example) that is being
updated with new address information will be flagged for GeoLocation.
Description: “Find Contacts Near Me” utilizes the current users’ location and compares it to the
location of all the contacts that are available to the user.
Section: SFAPortal_ContactsListActions
Description: This section has been updated with the “Find Contacts Near Me” button and calls
SFAPortal_ContactsListActions_LatLong section.
Section: SFAPortal_ContactsListActions_LatLong
Class: Data-Portal
Description: This section facilitates in getting the current users Lat/Long values on the
pxRequestor Page. The mechanism that gets the values and updates the requestor page was
intended to be a part of cases. However, the Sales Automation application does not use cases
and thus we have to create this section and defer load it. This causes the appropriate values to
appear on the requestor page and enables the rest of the geolocation functionality.
Description: Launches the harness that allows the end user to view all contacts that are near
them, for a given radius.
Activity: FindContactsInTheArea
Class: Data-Portal
Description: Create a page to hold the default radius, radiusunit, type of query that is being
made and the long/lat values.
Note: These values are used in a later activity to accurately determine the distance between 2
location points.
Type Of Query – This property determines if the query of contacts is being made for the
requestors’ location or a specific entity’s (Contacts) location.
Activity: SearchEntitiesInArea
Class: PegaFW-Data-GeoLocation
Description: Calculates the entities within a given radius based on either the current users’
location or the current entities location. The distances are calculated using the mathematical
equation below:
Harness: EntitiesInArea
Class: Data-Portal
Description: Calls a section that holds a list of the contacts that are within a given radius from
the current user, a map with a marker for each contact, and two filters to change the radius and
distance type (miles or kilometers).
Section: EntitiesInAreaBody
Class: PegaFW-Data-GeoLocation
Description: Displays the list of contacts, a map with makers for each contact, the total number
of contacts and the Radius/RadiusUnit filters.
Section: ContactLocationMap
Class: PegaCRM-Entity-Contact
Description: Allows users to launch a modal window to find other contacts near the current
contact.
Description: Available only if the contact has an address and geographical location values.
Class: PegaCRM-Work-
Description: Launches a section to display a list of contacts near the current contact and a map
with markers.
Section: EntitiesInAreaBody
Class: PegaCRM-Entity-Contact
Description: Displays contact list, map of contacts with markers and filters for Radius and
RadiusUnit.
Activity: EntitiesNearOtherEntitiesPre
Class: PegaCRM-Work-
Description: This activity will use the current entities location information instead of the
requestors’ location, to find other entities.
Push Notifications
Pega Sales Automation utilizes the Pega 7 push notification feature available for mobile devices
to send notifications from the application to a mobile device.
Push notifications can instantaneously alert sales reps when important events occur, or critical
thresholds are met, without requiring them to log into an app or sift through emails. The Pega
Sales Automation application utilizes the Pega 7 push notification feature available for mobile
devices. While customers can define their own push notification criteria, the Sales Automation
application comes with two notifications pre-configured out of the box:
Lead Assignment
When a new lead is created, or when a lead has been assigned or reassigned, the owner of the
lead will receive a notification on their mobile device.
Quota Attainment
When an operator has enough closed won opportunities to meet their sales quota, they will
receive a notification on their device. Opportunities that are won after the quota has been met
will produce no additional notifications.
In the following screen, Jeff Green is about half way to his goal.
If he closes an opportunity that is more than $8,000 he will meet his goal and receive a push
notification on his mobile device.
In addition to seeing the notifications in iOS and Android, there is a screen available on desktop
and mobile devices called “Mobile Notifications” that displays the last 5 notifications by default.
The number of notifications shown is controlled by the “NumberOfRecentNotificationToKeep”
Dynamic System Setting.
Activity: [Link]
Description: Determines if operator is a mobile user. Determine how many notifications to keep
via DSS NumberOfRecentNotificationToKeep. Lastly save the notification as an instance of
PegaCRM-Data-Notification.
Activity: CheckIfMeetSalesQuota
Description: Gets the operator quota goal and determines if the goal has been met. If it is the
first time that the sales quota goal has been met then a notification is generated.
Description: Flow for creating a lead for both B2B and B2C has a utility shape to call the activity
pySendPushNotification.
Description: Flow for changing owner for both B2B and B2C has a push notification utility shape
for the new owner and one for the old one notifying them the lead has been reassigned.
Description: Flow for closing an opportunity for both B2B and B2C has a utility shape that calls
the activity CheckIfMeetSalesQuota to generate a push notification.
Message: @[Link]
Description: Message that accepts three parameters for notifying when a lead has been
assigned to you. 1st parameter is operator, 2nd and 3rd is the first and last name of the lead.
Message: @[Link]
Description: Message that accepts three parameters to notify the user that a lead has been
reassign from them. 1st parameter is operator, 2nd and 3rd is the first and last name of the
lead.
Message: @[Link]
Description: Message that accepts three parameters for meeting sales quota. 1st parameter is
Operator Name, 2nd parameter is percentage of quota met and last parameter for which time
period.
Class: PegaCRM-Data-Notification
Properties:
Incentivizing sales reps with real-time visibility into goal attainment on a daily basis
The out-of-the box functionality is configured to measure sales quota as revenue, measured
over fiscal quarters. However, you can easily extend the reports and dashboards to track any
metric that can be quantified by data in your Sales Automation system, for example:
Sales Operations users can use the Tools > Manage Time Periods option to create time
periods or to view existing time periods.
View the list of existing time periods in a hierarchical format in a tree grid.
Add a new Time period by clicking “+” (Add Icon) on the time period.
You can add child time periods using the (+) icon on the right of the parent time period row. You
can also modify existing time periods by clicking any of the time periods.
Details of Fields
Field Description
Name Name of the year, quarter or month.
Start Start date of the time period.
End End date of the time period.
Type Can be year, month or quarter
Parent If type is quarter, the parent year will be required.
On the Implementation side, each time period is a data object of type PegaCRM-Data-
TimePeriod. This includes properties as shown below.
Activity: crmLoadTimePeriodHierarchy
Description:Upon clicking the specific time period, through defer load activity, the corresponding
child time period will be displayed.
Activity: crmSaveTimePeriod
Description: To create a new time period or modify the existing time period.
Sales Operations can use the Operators tab to view the existing sales goal or to create a new
sales goal.
Click the Operators tab to display a list of operators. Click the corresponding operators for
which you want to define a sales goal.
Creation of new sales goal can be done by clicking on “+” (Add Icon).
Details of Fields
Field Description
Fiscal Year Year for which you want to define the sales goal
Quarter Quarter of the fiscal year which you want to define the sales goal
Goal Type The type of goal. “Revenue” represents a sales quota. To extend
this functionality for other types of Goals, a new custom goal type
can be created.
Quarterly Goal Quarterly goal for the selected quarter for the selected goal type
Month – Goal Value Selection of quarter will display the months and we can set monthly
goal for each of the month.
On the implementation side, each time period is a data object of type PegaCRM-Data-
SalesGoal. This includes properties as shown below.
Description: Will be called on creation of new sales goal and when modifying the existing goal.
Activity: crmOpenSalesGoal
Quota Attainment
Once a goal has been entered, sales reps and managers can track their goal attainment from
the Quota Attainment quadrant in their Sales Automation dashboard. This quadrant measures
QTD Sales versus Quota using a curricular progress (or gauge) chart.
Drill-downs
For a sales rep, the QTD Sales value on the dashboard drills down into the closed opportunities
for the rep for the current quarter.
For a sales manager, the QTD Sales value drills into a tree structure with rollups of sales versus
quota across all levels of the manager’s reporting structure.
To prepare a drill-down report, use a Connect-SQL rule. Each of the supported databases has a
corresponding Connect-SQL rule with the required query to attain the goal attainment results.
Description: To prepare a custom chart for displaying the goal attainment results in a chart form.
By default, Sales goals measure a sales quota as a revenue amount for a specific quarter. To
extend this functionality, new goal types can be added. If a new goal type is added, for example
“Leads Converted”, the dashboard charts and drilldown views would need to be revised to roll-
up lead conversions instead of closed opportunities.
Local Campaigns
Local campaigns enable sales reps to send a sales campaign to any of their their contacts in
Sales Automation. From the Sales Rep portal, the sales rep sees a navigation link that they can
click to view the local campaign dashboard. In the local campaign dashboard, sales reps can
create a local campaign, edit an existing one or view the results of the current campaign and the
last five as well.
Note: Depending on the selling mode (B2B, B2C and B2B_B2C), a different set of
campaign template offers are presented to the user. These offers will segment contacts
in the system to be use for the offer by utilizing NBAM’s segmentation rule. It will also
determine which contact properties to display for the contact list view. Also there are 2
sets of offers one for email and one SMS. It gives the sales reps more flexiblity to run
campaigns through different channels.
3. Enter the objectives for the campaign, update the campaign time period information (if
necessary) and submit.
Depending on the offer the user selects, there will be different view displayed for B2B vs B2C to
help segment the contacts and provide the right information to target the right people for the
campaign.
B2B:
B2C:
Whichever view is displayed, select the contacts to include in the campaign and click “Add
Selected”. It will be added to the added list.
1. Click the “Edit” link in the Engagement Steps section to review the
engagements/correspondence used for the campaign.
Note: The out of the box offer flows don’t require approval. So the approval step will be
skipped.
1. Click the “Launch” link in the Run section to begin the process of launching the campaign.
2. Click “Submit” to start the campaign now or optionally you can specify the time to submit.
Depending on your server and its configuration, the campaign will send the email or SMS to the
customer.
There will also be an activity for each contact indicating an offer has been sent to the contact.
The out of the box offers provide 2 choices accept or reject the offer. If they choose accept the
offer, another activity is created for the contact to track that the offer is accepted.
Depending on the offer whether it’s a B2B or B2C offer that got accepted, a corresponding B2B
or B2C lead is created and all the activities from the contact for the campaign is copied to the
lead.
Finally, the customer will receive an email or SMS confirmation and a web page is presented
thanking them for accepting the offer.
For rejecting the offer, an activity is created to track that the offer is rejected.
No lead is created but an email or SMS confirmation is sent and web page is presented.
The last outcome besides accepting and rejecting the offer is if the contact did not respond to
the offer. After a certain time period without a response, an activity is created to track that the
offer had no response and an email or SMS is sent indicating the offer is expired with no
response.
Campaign History
On the contact, there is a tab called “Campaign History”. This tab gives the sales rep a general
idea of how many offer this contact is a part of and whether they responded or if the campaign
they are associated with is still running.
Campaign Dashboard
On the campaign dashboard, the current campaign will be updated with results. The sales rep
can view the results of their campaign.
Offers Flows
The offer flows determine processing that happens in the campaign. There are 4, out of the box
offer flows (SAB2BEmailOffer, SAB2CEmailOffer, SAB2BSMSOffer and SAB2CSMSOffer).
All 4 flows basically create an activity and send an engagement for the offer and then it waits.
Then there are 3 branches the flow can take, accept, reject and no response based on the
response from the customer. The reject and no response send an engagement and hands off
to another flow that calls a web service to create a corresponding activity.
The biggest difference for the accept branch is that its web service not only creates an activity it
also creates a business lead for B2B offer and individual lead for B2C offers.
Also each of the offer flows is categorized as either B2B or B2C. They are identified as B2B or
B2C because they are tagged using the offer’s Key Code.
If the flow is a B2B offer flow, it will use the B2B segmentation which takes all the contacts and
get all the contacts that have organization populated. If the is a B2C offer flow it will use the
B2C segmentation. There is a field on the offer details tab under the Field Marketing Details
section called Segment Rule where the offer identifies which segment to use.
Engagements
Each of the offer flows have 4 engagements (the offer, accept, reject and no response).
Currently they are very generic and can be customized.
Classes
In SA NBAM’s application, any data it needs from SA, it uses an external database schema.
This external database schema uses database views to replicate SA data.
Then there are 2 when rules that uses the data page to figure out which flow has been selected.
They are isB2BOffer and isB2COffer.
It is to determine which report definition to use and gets the right properties for the view.
From the list, a Sales Rep selects and can call the best Contacts, and a suggested offer for the
Contact is displayed.
An opportunity is created.
CLV_Value predictor :
For the sample implementation, CLV_Value is a randomly generated number in the range of 0-
999. Any implementation can define their logic to calculate the CLV_Value.
WinScore predictor :
The WinScore predictor dynamically reorders the contacts in the NBAA quadrant as well as
reorders the Top Offers displayed in the Contact work-object.
WinScore is an attribute of the SA contact calculated using the following factors for each
opportunity associated with a contact:
The current SA-NBAM implementation takes care of the above factors and only the Opportunity
work-type to dynamically prioritize a given SA contact.
For a given proposition, the sample offers are fed into the adaptive model. Below is a graphic
representation of the same. It depicts how the Propensity changes with the change in WinScore
for that specific proposition.
Edit an Opportunity
If an opportunity is edited and Opportunity Amount or Close Date (or both) are changed, the
WinScore associated with all the Contacts of the opportunity gets changed. Increase in
Amount increases the WinScore and vice-versa. Change of Date in future decreases the
WinScore and vice-versa. If both Amount and Close Date are modified in a single edit, the
final WinScore change is the algebraic sum of both the factors.
For a B2B opportunity, if contacts are updated, the WinScore attribute for each of the
contacts gets modified appropriately. This causes the NBAA quadrant to reorder the
prioritized list accordingly.
Case 1) Editing an Opportunity (All contacts associated with the opportunity will have their
WinScore changed using the below logic)
Case 2) An Opportunity gets added to a contact or removed from a contact (WinScore will
increase or decrease as per the logic below depending on whether an opportunity is added to a
contact or removed from a contact)
Description: Specifies value for “Amount WinScore Weight” used in calculating the WinScore.
Default value is set to 100. All non-zero integers are valid values.
Description: Specifies value for “Close Date WinScore Weight” used in calculating the
WinScore. Default value is set to 50. Every increment of date (from the current Opportunity
close date) will negate the value for “Close Date WinScore Weight”. For instance, the default
value of 50 will change to -50.
Thus if the close date for an opportunity moves further in future, the close date winscore weight
factor will turn negative and vice-versa.
Description: Minimum Value defined for the WinScore attribute. Default value is set to 0.
Description: Maximum Value defined for the WinScore attribute. Default value is set to 10000
Activities
crmInitializeWinScore
Description: Opens each contact record and initialize the WinScore to the minimum
specified WinScore value. (Set using the DDS setting MinWinScoreValue)
PopulateWinScoreForAll
Description: Used to populate WinScore for each contact. The activity runs through all the
opportunities in the application, calculates the corresponding WinScore for each and adds
the WinScore to all the contacts associated with the opportunity.
crmCalculateWinScore
Description : Used to calculate WinScore for an opportunity and adds the change in WinScore
to the existing WinScore for all the contacts linked with this opportunity. Invoked on edit of an
opportunity. (refer Declare Trigger crmForecast)
crmValidateOpptyContacts
Description: Used to adjust WinScore values for contacts when they are being updated for a
B2B opportunity. This activity was updated to include the logic of updating the WinScore for the
contacts that have been added/removed from the B2B opportunity.
crmAdjustPrimaryContactWinScoreWrapper
Description: Used to adjust the WinScore for contacts when a Primary Contact for an individual
opportunity gets changed.
Property
WinScore
This property is introduced in PegaCRM-Entity-Contact class. This will be used to hold the
WinScore value for a contact and this value will be passed dynamically to the Adaptive Model
as a predictor.
Decision Tree
GetValidWinScore
Description: This is used to bind the WinScore value within a specified range. The range is
specified using the two Dynamic System Settings rule (MinWinScoreValue and
MaxWinScoreValue)
For further technical details, see the Pega Sales Automation Tech Note Next Best Action
Adapter, available from the Pega Sales Automation page on the Pega Developer Network
(PDN): [Link]
Sessions can be initiated by a sales rep from any Contact. There are two main methods of
initiating a co-browse session:
Session Code: The co-worker, customer or prospect retrieves a session code from the co-
browse enabled website, and shares the code with a sales rep
Email Link: The sales rep uses the Sales Automation application to send an email to the co-
worker, customer or prospect containing a link to the co-browse enabled web content.
Clicking the Support button displays a session code to share with the sales rep to initiate co-
browsing.
The sales rep can navigate to the Actions Co-Browse Enter Session Code and enter the
code provided:
Once the session code is entered, or the email link is clicked on, the co-browse session is
initiated from within the application.
The session defaults to Highlight Mode, but the rep can also select Control Mode and request
control of the session running in the customer’s browser.
Once the Session has completed, a Co-Browse Activity is automatically generated for the
Contact.
Install: The JavaScript below must be included in the website to allow co-browsing.
Customize: Allows you to change the appearance of the co-browse window and the co-browse
“Support” button.
Property: crmSessionCode
Property: crmCoBrowseDestinationURL
Description: This property is introduced in PegaCRM-Work class. This property is used to store
the URL for websites that have been enabled for co-browse. The end user can be sent to
different parts of the website, based on need.
Navigation: crmWorkMenu
Class: PegaCRM-Entity-Contact
Description: All contact records have two co-browse options, Enter Session Code and Send
Link to Contact.
Enter Session Code – The end user imitates a session by clicking on the support button and
sending the code to the Sales Automation user.
Send Link to Contact – The Sales Automation user initiates a session by sending a contact an
email with the URL for the website.
Flow: crmCoBrowseSessionCode
Class: PegaCRM-Work-
Description: Flow captures the session code and displays the co-browse screens. It will also
create an activity on completion to track the session.
Flow: crmCoBrowseEmailLink
Class: PegaCRM-Work-
Description: Flow captures the customer email and the destination URL for the co-browse
enabled website. It will also create an activity on completion to track the session.
Section: crmCoBrowseEmailLink
Class: PegaCRM-Work-
Correspondence: crmCoBrowseEmail
Class: PegaCRM-Work-
Section: crmCoBrowseSessionCode
Class: PegaCRM-Work-
Data-Transform: crmCoBrowseAttributes
Class: PegaCRM-Work-Task-CustAct
Description: Sets up values for creation of an activity on the conclusion of co-browse session.
Data-Transform: crmCoBrowsePost
Class: PegaCRM-Work-
Data-Transform: crmCoBrowseTypeSetValues
Class: PegaCRM-Work-
Description: Sets up Email and Session code for “Email Link” session type and clears all values
for “Enter Session Code” sessions.
Control: crmStartCoBrowse
The graphical, interactive dashboard capabilities are available on desktop and mobile. A rich
widget library is available for common sales metrics – pipeline, win rate, goal attainment, lead
conversion, etc. Dashboard can be personalization via predefined templates and user specific
widget selection
Real-time insights via personalized mobile dashboards enable mobile users to stay on top of
trends and key metrics while on-the-go.
Dashboard Personalization
Users can personalize their dashboards by selecting from a collection of template layouts and
can publish personalized dashboard to multiple users.
Users can personalize their dashboard by clicking the Gear icon at the right side of the
dashboard page, which opens up a widget cabinet. By default the Gear icon is enabled.
Switch Template
The user can select different out of the box (OOTB) or custom templates by clicking Switch
template in the widget cabinet. When user changes the template, the system adjusts the widget
locations automatically.
Once widget updates are complete, user can click Publish to see the changes on the
dashboard page.
Widget Cabinet
The above screenshot shows the menu used to add desired widgets into respective slots. The
user clicks the Add widgets button, which opens up the Widget picker. The user then selects
required widgets and clicks Add [Link] can click ‘Revert Dashboard’ to change
dashboard to default dashboard.
Widget picker
This panel shows icons of all the widgets. The user can personalize the dashboard by picking
the desired widgets.
Users can drag the widget among the slots in the widget cabinet area and click Publish to see
the changes.
Publish Dashboard
Users can publish a dashboard for personal viewing or to be shared with multiple users (in
Access Groups).
Publishing options
Sales ops can publish a dashboard for Sales Ops, Sales Manager & Sales Rep at Access
group level. These will be the default that reps and managers see when they first log in.
Sales Manager can publish a dashboard for himself.
Sales Rep can publish a dashboard for himself.
Note: When a user customizes their dashboard, the default dashboard published by sales ops will be
overridden.
A Sales Ops can publish a default dashboard for Sales Ops, Sales manager and Sales Rep
users.
Procedure
1. Go to Tools, Click the appropriate Personalize Dashboard button. Click the Gear icon to
open the Edit dashboard panel.
2. Click Switch Template.
3. Select a template. Each template includes a preview of the number, size, and relative
position of slots that it contains.
a. Add widgets to each slot in your template.
b. In the Edit dashboard panel, click Add Widget next to the slot that you are configuring.
c. Select the check box next to a widget to include in the slot.
d. Click Add Selected.
e. Drag and drop the widget to change its position in the slot.
f. To remove a widget from a slot, click the Delete icon.
The following Sales manager widgets are displayed with an explorer tree on the left, and a chart
with table to the right that displays GRAPH and LIST views. The tree is driven by a Reporting
hierarchy, where selecting a node shows data for the sales rep along with his/her reportees.
Pipeline
Quota Attainment
Pipeline growth trend
Lead Conversions by Stage
Leads by Source
Opportunity Revenue by Industry
Opportunity by sales stage
Open Tasks
Lead to opportunity conversions
Win/Loss Analysis
When there is no reporting hierarchy for the logged-in user, the explorer tree will be hidden.
Data Visibility
Data visibility for all the dashboard metrics is driven accordingly:
Managers can see all data assigned to them and also to their reportees.
Sales reps see all data assigned to them specifically.
Sales Ops sees all data for the Territory access they have access to.
Pipeline
The Pipeline quadrant shows a sales funnel of all open opportunities by sales stage. It is
broken down by revenue and probability of closure for each stage, with the ability to select
Individual and Business selling modes.
Sales reps see their own personal pipeline and can drill down into the specific opportunities for
each stage. Sales managers see the total number of opportunities per stage for everyone on
their team, with the ability to drill down and explore the detail of their team’s pipeline.
LIST view shows open opportunities by stage. Clicking Opportunity Stage displays the list of
opportunities by stage in a Modal dialogue.
Clicking any of the open opportunities in LIST view shows the detailed information of the
appropriate opportunity in Sales Automation application.
Details
When implementing the Pega Sales Automation application, it is necessary to modify the
opportunity stage, and then modify the SQL function StageDisplayOrder.
The flow action crmPipelineWidgetFA is used to open the modal dialogue showing data related
to each Opportunity Stage in List view including Total.
Leaderboards
The leaderboard quadrant gives managers and sales reps a view of the top representatives in
the organization in terms of closed deals and sales activities.
The Closed Deals Current Quarter leaderboard shows the representatives who generated the
highest amount of revenue. Clicking on any of the representatives gives a detailed look into the
closed opportunities.
The leaderboard defaults to the Top 5 representatives on login; however you can use the toggle
button to view the bottom 5.
The screen below shows the same leaderboard quadrant but for the Bottom 5 representatives.
The Most Active Current Quarter leaderboard shows the representatives that have the most and
least activity with contacts. Clicking on any of the representatives gives a detailed look into each
of the activities taken by the representative.
Details
The data source of the widget is mentioned in the above Report definitions. It is used to fetch
all the data and populate the Data Pages, which are used in a Repeating grid shown in the UI.
For each Data Page, we are fetching data depending upon the logged in persons access. For
example, in D_LeaderboardTop5Sales:
Opportunities by Competitor
The Opportunities by Competitor quadrants allows managers to gauge who they are up against
by displaying the number of opportunities by competitor. Clicking on any of the competitors in
LIST view shows the appropriate open opportunities for the selected competitor.
Section Data-Portal
SalesManagerDashboardOpportunityByCompetitors
Details
This simple widget fetches the data using the Report Definition
SFASalesManager_OppsByCompetitors and uses the chart and List View grid.
Quota Attainment
The Quota Attainment quadrant compares sales for the current quarter and the quota for the rep
or manager.
For a sales rep, drilling into the QTD Sales shows a list of all of the closed opportunities for the
current quarter in a modal window.
For sales managers, drilling into the QTD Sales shows managers’ team sales.
To see individual Sales rep sales, the Sales manager can select a node from the explorer tree
on the left, which is driven by reporting hierarchy.
Clicking any of the closed opportunities in LIST view shows detailed information for that
opportunity in the application.
Details
The data-source of the widget Connect-SQL GoalAttainment aggregates the data, which is
getting used by the custom HTML chart section CirclfiulComponent. The activity
SalesGoalAttainment manipulates the data fetched through this connect-SQL and adds
details for QTD Sales & Quota.
Leads by Source
The Leads by Source quadrant allow managers to evaluate the most effective methods for
bringing in new leads. It’s easy to determine which lead sources produce the most leads.
The Leads by Source widget is a Pie chart of leads by source for all leads created in the last six
months, A Sales rep/Manager can toggle between GRAPH and LIST views.
The LIST view shows a snapshot of all the Leads. Clicking on any of the Lead Percentages
shows detailed information in a Modal dialogue. Further drilling down on ‘Lead Name’ allows the
managers/reps to see detailed information on the lead.
Clicking ‘Total’ allows the managers to see list of all Leads by Source, which includes his/her
hierarchy.
Clicking on any of the Lead in LIST view shows the detailed information of the appropriate Lead
in the application.
Details
The data-source of the widget crmLeadsBySourcePercent aggregates the data which is used
by the pxchart control. The activity crmLeadByLeadSource will manipulate the data fetched
through this report definition and add details for Total.
The Data Page fetches data for the previous six months only; we can change the parameter or
can extend it using the following parameter in the Data Source of the Data Page.
The Opportunity Revenue by Industry widget is a Pie chart of opportunity industry for all
opportunities won in the last 6 months. A Sales rep/Manager can toggle between GRAPH and
LIST views.
The LIST view shows a snapshot of all the won opportunities, organized by Industry. Clicking
‘Revenue’ amount shows a list of opportunities by industry in a Modal dialogue.
Clicking ‘Total Revenue’ allows the managers to see list of Opportunity revenue by Industry,
which includes his/her hierarchy.
Further Drilling down on ‘Opportunity Name’ in the LIST shows detailed information of the
Opportunity.
Details
The Data Page is fetching data for previous six months only; we can change the parameter or
can extend it using the following parameter in Data Source of Data Page.
The Pipeline Growth Trend widget is a stacked bar chart of pipeline history showing snapshots
of the pipeline as of the first day of the current and two previous months. One vertical bar
represents the current pipeline, and three bars show snapshots of the pipeline as of the first day
of the current and two previous months.
The LIST view shows a snapshot of the pipeline history by stage. Clicking on Revenue of a
particular month displays a list of opportunities by stage in a Modal dialogue.
Clicking ‘Total Revenue’ for a month allows managers to see a list of Opportunities by stage in a
modal dialogue, which includes his/her hierarchy.
Further Drilling down on ‘Opportunity Name’ in the LIST shows detailed information of the
Opportunity.
Details
The opportunity stages are referenced and sorted using the Data Transform crmStage. If you
want to modify the opportunity stages, you can update this Data Transform.
The LIST view shows snapshot of the Leads’ percentage by stage. Clicking on Lead shows a
list of Leads by stage in a Modal dialogue.
Clicking ‘Total Leads’ lets managers see a list of Opportunities by stage in a modal window,
which includes his/her hierarchy.
Further Drilling down on ‘Lead Name’ in LIST view shows detailed information of the Lead.
Details
When implementing the Pega Sales Automation application, you need to modify the lead stage,
and then modify the SQL function StageDisplayBubbleSize.
The flow action sfaLeadToOppLifecycle is used for opening the modal dialogue showing data
related to each Lead Stage in List view including TOTAL LEADS.
Win/Loss Analysis
The Win/Loss Analysis Quadrant allows managers to analyze won and lost opportunities by
month and provide most actionable insights, which helps increase sales efficiency and boost
revenue.
The Win/Loss Analysis widget is a stacked bar chart showing won and lost opportunities for the
last six months, with the average win rate overlay.
The LIST view shows snapshot of opportunities won/lost by month. Clicking on Number shows a
list of Opportunities by stage in a Modal dialogue.
Further Drilling down on ‘Opportunity Name’ in LIST view shows detailed information about the
Opportunity.
Details
The Data Page fetches data for the previous six months only; we can change the parameter
or can extend it using the following parameter in Data Source of Data Page.
The Conversion rate overlay calculates what percentage of leads is converted to opportunities
over specific amount of time.
For sales managers, this widget shows the number of Leads converted/Not converted by month,
with GRAPH and LIST view.
The LIST view shows snapshot of Leads converted/Not converted by month. Clicking on a
number shows a list of Leads by stage in a Modal dialogue with conversion rates.
Further Drilling down on ‘Lead Name’ allows the managers to see detailed information on the
Lead.
Details
The Data Page fetches data for the previous six months only; we can change the parameter
or can extend it using the following parameter in Data Source of Data Page.
Clicking ‘Total opportunity’ allows managers to see list of Opportunities by stage in a modal
window, which includes his/her hierarchy.
Details
When implementing the Pega Sales Automation application, you need to modify the lead stage,
and then modify the SQL function StageDisplayBubbleSize.
The flow action sfaOppLifecycle is used for opening the modal dialogue showing data related
to each Lead Stage in List view including TOTAL OPPORTUNITIES.
Opportunities by Product
The Opportunity by product quadrant allows Sales reps to analyze number of products for each
opportunity. The LIST view shows a snapshot of products by number of opportunites.
Clicking on product allows Sales reps to see list of Opportunities in a modal window.
Details
This simple widget is fetching the data using the Report Definition
SFASalesManager_OppsByProducts and using and in chart and List View grid.
Open Tasks
The Open Tasks Quadrant helps sales rep to keep track of everyday tasks. This helps them to
prioritize and complete the Tasks.
The Tasks widget measures the number of Tasks based on ‘Type’ and ‘Priority’ of the task.
The LIST view shows a list of Tasks based on ‘Type’ and ‘priority’. Clicking Number shows a list
of Tasks by Type, priority in a Modal dialogue.
Further Drilling down on ‘Lead Name’ allows the managers to see detailed information on the
Lead.
Details
The data-source of the widget SFATasksByTypePriority aggregates the data, which is used
by the pxchart control. The activity SFATasksWidget manipulates the data fetched through this
RD and adds details for Total.
Reminders
The Reminders section provides the sales rep a summary of all of their open tasks, sorted by
due date. Drilling into the items displays all of the details about the specific task.
Mobile Dashboard
Technical Implementation Details
Records of Interest
Details
The Desktop and iPad use the Harnesses SFAPortalLanding, SFAPortalDashboard where
we have placed pxUserDashboard section for opening a personalizable dashboard, whereas
the Mobile will use the section SFAPortalDashboard_Mobile.
The below screen shots navigation rules having Dashboard options will open the harness of
interest, Desktop or [Link] includes pxUserDashboard section, and the Data-Transform
SFAPrepareDefaultDashboard.
Dashboard Templates
In addition to OOTB templates, we have added the template ‘SFA Two Column’. The
advantages of this template over other OOTB template are:
If the size of one widget is different than the adjacent widget, it will fit both widgets in the
maximum of the size of the widgets.
In mobile, it will show only one widget at a time. You can change the widget, by clicking on
Interactive Menu Drop-Down.
Details
In this template, a user can add a maximum of ten slots and a minimum of two widgets in each
row.
If a row doesn’t have any widgets, then it will not be visible in the Dashboard. We are controlling
this with the condition of following type (say for row-3).
For Mobile, in interactive mobile-menu, we are using Layout’s ‘Defer load contents’ feature, as it
shows only one item at a time.
Details
Select the settings tab in a section you want to turn to a widget.
Widget Title – The title of a widget that will appear in the widget picker.
Widget Description – The description of a widget that will appear in the widget picker.
Category – Required field to associate a category with a widget. With Pega Sales Automation,
we are providing only two categories: ‘Sales Automation – General’ & ‘Sales automation –
salesperson’. To add a new category, directly use it in the widget; it will be added in the list of
categories for dashboard. Or use autocomplete to view pre-existing categories.
Sales Operations users can dynamically create and manage the Sales Territory structure.
A Sales ops user can view / edit their primary territory and children under that territory. A
“global” sales ops user (someone whose primary territory is the root territory node in the
tree) can view / edit the entire territory tree structure.
Details of Fields
Field Description
Name Name of the Business Territory
Status Active/Inactive
Owner Operator/User who owns this Territory and responsible to
manage the Territory and its children
Delegate Operator/User with Delegated Ownership
Parent Territory Parent/Business Territory
The Business Territory Hierarchy Model uses the “Path Enumeration” approach. Each node in
the hierarchy has two fields indicating its position: the path or "signature" and level. The path is
the list of nodes traversed from the root to reach this node; the level is the number of levels
down from the hierarchy. A typical path would look like this: “BT1\BT5\BT7“
Where BT1 is the root, BT5 is the root's immediate child, and BT7 is a child of BT5.
Clicking the “Territories” navigation item takes the sales ops user to a landing page that allows
them to:
View the list of existing Territories in a flat list in repeat grid/hierarchical format in a Tree
grid. Switching between two modes is supported through the toggle icon on top right corner
of the Territories List/Tree.
Modify any Territory details by clicking on any territory as below
Add New Territories using “Add Territory” link on top left corner.
List View
Tree View
Fields Detail
Field Description
Operator ID UserID/OperatorID that is used for login to Sales Automation.
Password Password that is used for login to Sales Automation
Title Title of the operator
Operator Type Type of user, typically mapped to various access groups of Sales
Automation.
From Sales Automation end user portal, one can create only
SalesMgr, Local Sales ops and Sales Reps.
First Name of Operator/user
Name/LastName/Full
Name
Position/Job Title Designation of Operator
Phone Phone Number
TimeZone TimeZone of Operator
Email Email of the Operator
Default Locale Default Locale
Report To Who this user/operator reports to.
Field Description
Image Operator Image can be uploaded from here
Access to Pega Sales Automation objects will be based on traditional Pega 7 Operator ID
privileges as well as a new construct called Business Territory (BT). The privileges give the
Operator blanket access to objects, while the ability to create/read/update/delete specific object
will be governed by the BT that “owns” the object. In order to update a specific account in the
“InsCoGroup” BT, the user must be specifically granted security to update accounts in that BT.
The Operator Access table holds the permissions that an Operator has over the various objects
within a Business Territory (BT). Each user will have one instance in the table. A primary
territory (BT) will be defined and used for defaulting during creation of new objects as well as
defining the BT of Contacts and Leads. For the objects, the ability to grant access is more
robust. Lists of territories are entered and permissions to Read, Update, and Create are set. In
addition, Owner of an Object (like Lead, Opportunity, Account, and Org) will have full access to
those objects irrespective of Territory access.
To access the Operator Access tab, log in with SFASalesOps privileges and click on the
Operators tab. The ‘Add Operator’ button lets you add an Operator and provides access
permissions to work objects for a territory and its children. Clicking the Create checkbox will also
select (check) the Read and Update privileges.
Table: CRM_LINK_OPERATOR_TERRITORY
When rules: When rules that check for access use the Data page D_OperatorTerritoryAccess
by passing the appropriate parameters. For example:
crmHasReadSecurity:
D_OperatorTerritoryAccess[pyUserIdentifier: Declare_crmOperatorAccess.pyUserIdentifier,
TerritoryID: .TerritoryID, WorkType: @ObtainValue(tools, myStepPage,
"DetermineWorkType")].ReadAccess == true]
Report Definitions: Class Joins retrieves the list of territories an operator has read access to.
(Class Join against this table to check if a record exists) (NOTE: Additional care needs to be
taken for work types that inherit their territory IDs. For e.g.: Contacts get TerritoryID from the
Organization work type or the Account work type that they are related to. Similar cases exist for
Tasks.)
For new deployments, you can generate access records in bulk. For this:
Additionally, the above activity can be run to clean and bulk regenerate access records at any
point in time to cleanup and regenerate access records for all operators in the system. The
duration of execution is directly related to the no. of territories and no. of operators in the
system. It would be a good idea to invoke this activity in a BATCH requestor.
Access records are generated through BATCH requestors in the background as part of Agent
processes.
Note: If your deployment involves running Pega 7 / Pega Sales Automation in multiple
nodes, please consult the LSA / System administrator to ensure that this is enabled only
on one node to avoid lock contention issues.
Note: It is not common for implementations to require changes to the activities that
maintain the operator access records for different operators. This section provides an
outline of the algorithms used for reference.
For each operator access instance that has explicit access configuration (Call
GenerateAccessForOperator(Params: pyUserIndentifier))
- New page with access details (store in a page group keyed by territory)
- If any of (ChildRead, ChildCreate, ChildUpdate) is true go to next step else continue
with loop
Track changes to the operator access record (post flow action activity)
Records need to be regenerated for Queue for Agent, Operator Name, Work Type
Agent process
Delete records from the table that belong to this operator for this work type
Call GenerateAccessForWorkType
For Each operator access instance maintain a flag to indicate if its default operator access or
explicit operator access (by storing the defaultOperator ID)
Once the user edits access permissions for an operator (post flow action activity, if there are
changes, change flag from default to explicit by replacing the defaultOperatorID to the current
operatorID.
If the user modifies default territory, capture the change and use the right defaultOperator to set
the access permissions.
Track changes:
Capture the old and new signature for the territory whose parent changed.
Queue for agent, TerritoryID that has changed parent.
Agent1 process:
1. Get access records (from link table) that define implicit access for operators to this territory
and its children territories - baseterritoryID IN (clause) signature list of the old parent.
2. Delete those records.
3. Get a list of opportunities for which forecast records need to be created
a. Compute old and new signatures for current territory and all children and grand children
b. Get those operators, worktype records that had explicit access to the new parent that
grants (any) access to children as well. (from index table)
c. Queue for Agent, Operator Name, Work Type For which records need to be regenerated
d. Get those operators, work type records that had implicit access to new parent (from link
table)
e. Queue for Agent, Operator Name, Work Type For which records need to be
regenerated.
f. Create Work object for ObjSaver.
Agent2 Process:
1. Delete records from the table that belong to this operator for this work type
2. GenerateAccessForWorkType
3. Add territory
4. Queue for agent, TerritoryID, and parentTerritoryID
5. Agent Process
a. Get access records (from link table) which define implicit access for operators to the
parent territory
b. Insert new record into table with the same access configuration as parent
c. Get those operators, worktype records that had explicit access to the parent that grants
(any) access to children as well. (from index table)
d. Insert new record into table with the child access configuration
e. If the territory is a top level agency (in createDefaultOperators activity), for each default
operator
f. Queue for agent (GenerateAccessForOperator), OperatorID
Privileges on UI rules
The following “Rule-Privilege” instances have been added to restrict access to menu items from
the left navigation that lead to gadgets that allow admin operations.
Tools: SFAToolsView
Note: A privilege per menu has been created to allow for maximum flexibility.
For example, to grant access to the ‘Operators’ menu on the navigation, the privilege
‘SFAOperatorsView’ can be added to the role; And to provide access to create Operators the
privilege ‘SFAModifyOperators’ can be added.
While hiding menu options on the UI is important, it does not prevent the functionality underlying
the menu option from being used through other means. To secure the underlying functionality
privilege checks have been added in the underlying harness rules, flows & flow actions.
For example, In the case of Bulk Upload, the privilege ‘SFAToolsView’ has been added to the
New Harness, crmCreate flow & crmMapProperties flow actions.
Privileges on Flows
The privilege ‘crmCanWrite’ has been added to all the flows (e.g. crmCreate, crmEdit…). An
Access When rule is evaluated based on the operator’s access & permissions to conditionally
grant privileges to the operator.
Rule-Access-Role-Object
Access When rules (Rule-Access-When) are provided to check if a user can perform an action
or not. Sales Automation uses the following 2 Access When rules to check if an operator has
read / update access
crmCanRead
crmCanRead will check if the user has read access or not. In this Access When rule the Obj
When rule (RULE-OBJ-WHEN) crmHasReadSecurity is invoked. This when rule will evaluate
the read access based on different conditions (e.g. security permissions defined in the
application and bypassoperatorcheck, etc).
crmCanWrite
This will evaluate if the user has write access or not. As pega platform doesn’t differentiate
between ‘create’ and ‘update’, in the Access When rule there is are expressions to differentiate
whether the user’s intent is to create or update by using a when rule isNewWorkObject
(extension point for implementers to define New Work Object criteria). If its not a new case, it is
assumed that the user is attempting to edit and further rules are checked (crmCanCreate for
create operation and crmCanEdit for edit operation).
Common background
Pega Sales Automation has a custom security model based on configurable operator access
and permissions. The search results need to adhere to the access and permissions defined on
the operator access records. Pega Sales Automation 7.21 applies the permissions-based
filtering on the search results.
Contacts
Organizations
Individual Accounts
Business Accounts
Individual Leads
Business Leads
Security
The current user will only get those results where he has access. The identifier to this limit is the
Business Territory (or multiple Territories if applicable) the user belongs to.
Grouping
Search results are grouped by the work object types mentioned above.
Search narrowing
The default search routine searches within all mentioned work objects with updates anytime, but
the user can customize the search run to this search terms:
Case Type
Includes
Shows
Last Updated
Technical implementation
This chapter describes only the modifications to the standard Pega 7 implementation and shows
what components are used to customize the global search for specific needs.
Organization
Account
Opportunity
Lead
Contact.
Corresponding case types need to be configured in the Cases & data tab of the Rule-
Application rule. This list of cases against which searches are performed is determined by the
search routine by reading the metadata on this rule.
Search base
The global search uses ElasticSearch, which is a search server based on Lucene. Information
about work objects are stored in a file base indexed by Lucene. Any property of a work object
will be populated there. Pega 7 provides a standard implementation with a wide range of
retrievable information, but retrieving additional search content must be configured, as
described in the subsequent chapter.
Although the internal file base is not accessible directly within Pega 7, the Developer Studio
applies a way to get an overview about the files size and its availability.
After a click on the shown menu item the following screen appears (excerpt).
The important entry in this screen is “All Work” which presents the file base to retrieve Lucene
search results for work objects. More details are available by clicking Check.
In this example the file size is about 16.7 MB and contains 22,560 entries.
If the global search does not return results, please check this page. When it shows an error, the
re-indexing of the file base is needed.
For this a specific Data Transform called pySearchModel is used. The following screenshot
shows as an example the Data Transform for Accounts.
Unlike the normal use of Data Transforms in Pega 7, this Data Transform does not require
sources for the properties that need to be set, except one (in this example an arbitrarily value is
set for pxObjClass and will be replaced during runtime with the real value). It acts as a template
only, and Lucene will grab the appropriate data by itself.
For each work object an own Data Transform exists which applies to the work object class.
However additional Data Transforms for inherited classes are not necessary (Individual
Accounts, Opportunities and Leads).
Known as an issue, this Data Transform has to be unique in the system for each search object
(in our case work object) because Rule Resolution doesn’t work in this case. If the Data
Transform for a specific search object exists in multiple Rule Sets, the system picks a random
version. The solution for this issue is described on the next chapters.
When a user put search tokens into the global search field and hits enter, the activity
pySearchWrapper is executed.
Then it appends the data via copy into the page property pyWorkResults of the primary
page.
When searching for a specific work object, it just runs the Report Definition pyWorkSearch
for the selected work object only.
Sorts and groups the search results accordingly to the work object types for further UI
presenting.
This report is different than other Report Definitions in Pega Sales Automation or Pega 7
because the system recognizes that this report does not run against the database but against
the file base of Lucene. Therefore properties used in this report are not required to be exposed
as columns within the database (unless they are used in other reports as well), so the Guard
Rail warning about missing column exposing can be ignored.
The filter criteria excludes all work objects with a status work starting with “Resolved” and the
report returns only objects for Business Territories the user has access to.
In normal cases the properties in the Report Definition pyWorkSearch match the properties in
the Data Transform pySearchModel.
To ensure that the report does run against Lucene, a specific standard parametrized activity
needs to be called within the activity pySearchWrapper, it is called Rule-Obj-Report-
[Link] (see activity step 5.1 as an example). The necessary
parameters are:
When searching all work objects, the parameter pyReportClassName will be set to
[Link](<CURRENT>) in each iteration per work class (see activity step
5.1). If the search runs for a specific work class only, then this property is set with
D_pyWorkSearchPreferences.pySearchCase (see activity step 6).
This approach makes it easy to handle the search customization because all related rules are
stored at the same place. Therefore they can be deployed separately to Pega Sales Automation
7.14 if the customized Lucene gobal search is used.
During deployment this Rule Set must be declared as an Application Rule Set on Top of
PegaCRM-SFA:07-xx.
Partner Management
Pega Sales Automation empowers your partners and agencies to leverage the benefits of Sales
Automation. It helps you collaborate with partners and provides direct visibility into all partner
deals and sales activities.
Partner management leverages the existing territory security model. This ensures that each
partner or agency only has access to their data.
Global sales ops can easily set up and administer partners, and delegate user administration to
the local sales ops users at the partner organization.
Partner List
As sales ops, a menu Partner is available in the left menu. From there the sales ops can
manage partners like:
The Pega Sales Automation Access Required checkbox allows the sales ops to select territory
for the partner to be associated with it. The territory defines the scope that the partner has
access to work objects like opportunities and leads.
Description: This class is for the partner. Because of its similarity to organization, partner
extends from organization.
Flow: [Link]
Description: It reuses the edit flow but extends the edit flow action to make it custom for partner.
CaseType: pyDefault
Property:
Description: Setup a temporary page NewTerritory for creating a territory on the partner.
Description: Setup partner territory from newly created territory and cleanup NewTerritory page.
Description: Determines if the partner is active or inactive based on status of the partner.
Activity: crmValidateTerritoryID
Activity: crmTerritorySearchFiltered
Description: Gets a list of territories to pick from based on the work type.
Description: Joins opportunity and partners to get a list of partners for opportunity.
Section: [Link]
Description: This section displays the partners on the opportunity. A new grid has been added
to display the partners associated with an opportunity that was created in the partners menu.
Administration Tools
A sales admin or a sales operator can access Tools provided in the Sales Ops portal to:
Only Sales Operations users can perform data migration activities for various Work objects. The
Bulk Upload feature can be accessed from the Top Tab “Tools” “BulkUpload” button. It
allows the user to create the work objects in bulk by uploading an xml or csv file with
appropriate data for Work objects.
Sales Ops user can bulkupload Multiple addresses for Organization,Account and Contact Work
[Link] user wants to add Multiple addresses for existing record,user has to copy entire
record and update just the address by passing the record id.
Upload Sequence
Upload Type is a field on the Bulk Upload wizard that gives options to select the type of object
on which upload is to be performed.
If an organization is uploading data for the first time, it is recommended to follow the sequence
in the Upload Type as:
Territory: The Upload should start with the Territory upload. Territories fields are all related
to territory except Owner and Delegate, which are of Operator type and need Operator ID in
the file. To start the upload, the default Operators should be used (SFASalesOps,
SFASalesRep, SFASalesManager or SFASysAdmin). These can be updated at later stages.
Operator: Once territories are loaded into the system, the operators are loaded. All the fields
of Operator are independent of any other object except for the Default Territory field, which
needs to be populated by the TerritoryID created initially.
Organization: Organization data is loaded with the required fields. There are three fields in
Organization that require IDs: Owner (OperatorID), Territory (TerritoryID), and Parent
Organization (OrganizationID).
B2C: As there is no organization in the B2C setting, the drop down in the Bulk Upload doesn’t
give the option to select Organization.
Account: All the fields in Account upload are independent except three fields: Owner
(Operator ID), Territory (TerritoryID), and Organization (OrganizationID).
B2C: As in B2C setting, Account is created automatically when contact is created. The option
to select Account in the Bulk Upload drop down is not available.
Contact: Contact has some fields that require IDs of other work objects. These fields are
Organization (OrganizationID), Reports To (ContactID), Account (AccountID) and Territory
(TerritoryID), AirportCode, Country. The Email ID (Work Email or Home Email) should have
unique values.
B2C: In B2C, fields like company and industry are not there. The template specific for B2C
setting should be used for the upload.
B2B:
B2B_B2C:
Opportunity: The fields on the opportunity are independent fields except Account
(AccountID) and Territory (TerritoryID), Owner, and ContactID.
B2C: The ContactID is internally mapped to Account during the opportunity load.
B2B:
B2B_B2C:
Sales Ops have an option in the Left Navigation pane as Tools. From the Tools,
Once Bulk Upload is selected, Sales Ops get a screen to select Upload Type.
The field Upload Type dropdowns show the relevant work objects based on the DSS
SellingMode.
Once Upload Type, File Type (CSV/XML) and File are selected, click on Create to start the
Bulk Upload.
The file to be uploaded has to follow the defined templates. The templates can be found on
the Pega Sales Automation page on the Pega Developer Network (PDN):
[Link]
The column names in CSV file type and node names in XML file type should never be changed
unless properties in implementation layer have been customized.
Map Properties
The below screen allows the user to map the properties of xml/csv file to the properties of Work
object i.e. account in this case.
Using this screen, the user can create his own template of property mapping that can be reused
when required. Available templates are listed on the right side as shown in the screen.
After mapping the properties and taking default values into account, corresponding work objects
will be created for each row in the .csv file or .xml file. It will also log the status of the processed
work object. If any work object fails (may be mandatory field missed) during creation process,
the log messages will be recorded and shown. On expansion of Failures tab at the bottom,
system shows the list of failure records with its IDs. The user can export the list of Error records
and correct the data to re-import.
Data Format
While uploading data, the format of the data has to be correct. Below are some of the data fields
and the value that they hold:
Territory, Organization, Account, Contact- should have IDs (e.g. BT1 for territory, Org-
1,Acc-1,CON-1)
Salutation: Dr., Mr., Mrs., Ms., Prof.
LifeStage: Adult, Empty Nest, Other, Retiree, Young Adult, Young Family
MaritalStatus: Married, Single, Widowed
LeadSource: Advertisement, Campaign, Employee Referral, External Referral, Partner,
Referral, Seminar, Tradeshow, Webinar, Website
LeadStage: Assigned, Closed, Converted, Marketing Qualified, New, Qualified, Sales
Qualified
OpportunitySource: Advertisement, Analyst Referral, Campaign, Customer Referral, Direct
Mail, Email, Employee Referral, Partner, Seminar, Tradeshow, Web
ForecastCategory: Closed, Commit, NotForecasted, Stretch, Upside
OpportunityStage: Analysis, Assigned, Closed, Decision, Legal, Needs
Analysis,Negotiation,Pre-Development,Proposal,Qualification,Solution Development, Value
Analysis, Value Analysis and Above, Value Proposition, Won
MustWin: True/False
Status(in Territory):Active/Inactive
ReservedForPartner(IsTopLevelAgency in territory):True/False
Owner & Delegate (in Territory): should be Valid OperatorId
Reports To (in Contacts): should be a valid ContactID
Default Locale (In Operator): It is optional, but if given the format should be proper as “en-
US”, “de_DE” etc.
Calendar (In Operator): It should be either “USDefault” or “Default”.
Timezone (In Operator): Should be in correct format as “AGT”, “America/New_York”, and
do on, and should be from the allowed list only.
AddressType:Alternate Address,Billing Address,Business Address,Personal
Address,Shipping Address.
IsPrimary:True/False
The below screen shows the list of field values that are part of the account work object.
Extension point:
If the work types to be uploaded needs customization, then the data transform
crmPopulateBUWorkTypes in the implementation layer has to be overridden.
If any help document needs to be modified then update crmBulkUploadHelp.
If you need to add new properties for bulk upload, then create a field value for
crmMapToProperty in the work type that you are trying to upload and map the value to this
new field in 2nd screen of Bulk upload.
By default we are providing Default templates wherein mapping for the columns in the CSV
file or the elements in the XML file to properties in the work type are made. If we want to
modify existing mapping then give a new template name and save the selection.
The entire bulk upload is done as a batch requestor and for debugging purpose. If you want
to run the bulk upload sequentially with the current operator then modify the activity
crmInitiateFileProcess.
During the process of BulkUpload if there is any customization for a WorkType, there is an
activity crmBulkPostMerge.
You need to modify the MapValue rule in order to add another worktype.
Here the user needs to add the required WorkTypeName and the WorkTypeClass which will
have the implementation of the work type.
RuleType: Activity
Need to implement this activity in the WorkTypeClass that was declared in the map value
WorkTypeMap. Here the entire logic, which will create the corresponding work object from the
data uploaded from the excel sheet is presented.
Need to change this map value to add any validation rule for the work object that has created.
The DSS setting FileListenerSourceLocation is used to specify the path where the listener
will poll for files. Within that folder, a Contact folder must be created.
These folders will be listened by corresponding File Listener through Global Resource Settings.
The above listener should start from Service Management Application (Designer Studio
System Operations System Management Application).
The format of the file must conform to an existing contact bulk upload template, which must be
specified in the DSS BulkUploadTemplateName.
Upon start of the service, the corresponding folder will be polled for a file.
Place the csv file which contains work object data. This csv file should be in the following
format.
The listener will detect the file and begin processing all rows. For every row it will call the
service method mentioned in the File Listener. For the above file listener screen shot we are
calling CreateContact service method as shown below.
When Service File is called the first time, the InitializeBulkUpload activity will be called. In this
activity for Intializing properties InitBulkUploadProperties data transform will be called. This
can be extended in implementation layers to initialize their properties. The bulk upload template
specified in the DSS BulkUploadTemplateName will be placed in TemplateName property
through above datatransform.
In the above service file, parse segments are mentioned. The first parse segment will be helpful
to process the Header record. After picking the header record this will call ProcessHeader
activity.
The above activity will create a Results CSV file to place the work object results. This activity
will also read mapping properties information respective to work object which are packaged with
Sales Automation RAP.
Based on the above parse rule, header information will be mapped to corresponding column.
E.g., If header columns are like FirstName, LastName etc. Column1 will contain FirstName and
Column2 will contain LastName etc.. and this header information will be stored in the header
property.
The second parse segment will perform the work object processing. For each row in the CSV
this parse segment will be called. According to the Parse Delimited rule as shown below, data
will be picked from the row and will place it in corresponding properties in the integration layer.
E.g., First column in the csv file contains Terry and second column contains Mason then
Column1 property in the Integration layer contains Terry and Column2 property in the
integration layer contains Mason as their values.
After properties are filled, the BulkUploadCreateWork activity will be called. This activity will
do the actual work object creation by mapping integration properties to corresponding work
object properties and finally results will be placed in the corresponding results file.
If you want to do any pre activities like data model changes you can extend the
crmBUPreProcess data transform in the corresponding class.
Also If you want to do any post commit activities you need to override the crmBUPostProcess
activity in the corresponding class.
For every record, the above activity will be called and results will be placed under results file
<corresponding work object>/results folder as shown below.
The above file will contain the original work object data with two additional columns: status and
corresponding information . If the create/update is successful, then pyID will be displayed. If
there was an error, the relevant error message will be logged.
The Following Dynamic System Setting will be provided to control the results information.
If All is mentioned, then it will record both success and failure records in the results file.
If ErrorsOnly is mentioned, then it will record failure records in the results file.
If SUCCESS is mentioned, then it will record success records in the results file.
Once all records are processed, the BulkUploadNotification activity will be called. This will
send Bulk Upload results information through Email.
When the upload completes, and email can be sent to a list of email addresses using the DSS
BulkUpload_Notification_Default_Email
We can split those records into several files and can place those files at a time in the work
object folder mentioned above and can start multiple file listeners at a time by configuring in the
file listener. So that entire files will be picked at the same time and will process concurrently.
For this, we need to change Concurrent threads to no. of threads in the File Listener.
14
Manage Products
A product in the Pega Sales Automation system is a data instance of type PegaCRM-Data-
Product. Below is the data model of this class.
Products are associated with the Opportunity work objects in the Sales Automation system.
By using the Manage Products tool, a sales admin or sales operator can create or update a
product within the Sale Automation system. Clicking the + sign at the bottom of the list creates a
new product. Double-clicking on a row lets you edit a product.
Manage Competitors
A competitor in Pega Sales Automation system is a data instance of type PegaCRM-Data-
Competitor. Below is the data model of this class.
Competitors are associated with the Opportunity work objects in the Pega Sales Automation
system.
This Manage Competitors tool facilitates a sales admin or sales operator in creating or updating
a competitor within the Sales Automation system. Clicking the + sign at the bottom of the list
creates new competitor. Double-clicking on a row lets you edit a competitor.
Relationship types can be used to associate a contact with an account or organization. Implicit
relationship types that Pega Sales Automation uses are:
This Manage Relationship Types tool facilitates a sales admin/ sales operator in creating or
updating a relationship type within the Sales Automation system. Clicking the + sign at the
bottom of the list creates a new relationship type. Double clicking a row allows editing of an
existing relationship type.
Time periods are used while setting goals for an operator through the Sales Ops portal.
This Manage Time Periods tool facilitates a sales admin or sales operator in creating or
updating a time period instance within the Sales Automation system. Clicking the + sign at the
bottom of the list creates new time period instance. Double-clicking on a row lets you edit a time
period instance.
Steps:
1. Go to Tools, select the button for the Dashboard to customize the defaults for.
2. Click Switch Template.
3. Select a template. Each template includes a preview of the number, size, and relative
position of slots that it contains.
4. Add widgets to each slot in your template.
a. In the Edit dashboard panel, click Add Widget next to the slot that you are configuring.
b. Select the check box next to a widget to include in the slot.
c. Click Add Selected.
d. Drag and drop the widget to change its position in the slot.
e. To remove a widget from a slot, click the Delete icon.
f. Click Save. To discard your changes, click Cancel.
Sales-Ops can publish the default dashboard for different available access-group in the
application. This will prevent users that log into the application for the first time from seeing a
blank dashboard.
Records of Interest
Details
In Tools option, Open the Dashboard for personalizing for different access-groups. The
dashboard set-up is similar to the one we did for user.
Password: install
You can find a complete list of users installed with the application in the Operators, Access
Group, and Portals topic of this chapter. Use this Administrator ID to access and work with the
application rules and processes.
Ruleset Hierarchy
Pega Sales Automation is built on a number of application rules. Application rules define an
ordered set of rulesets and versions that together identify the parts of the application layer. In
addition, application rules relate an application's objectives, use cases, requirements, and
actors for cases that are created as part of the Pega 7 Direct Capture of Objectives capabilities.
You can view a list of the application rules and their rulesets from the Designer Studio by
selecting Designer Studio > Application > Structure > RuleSet Stack landing page option.
The RuleSet Stack tab displays the high- level ruleset stack for each rule defined in the
application. Expand an application to list its ruleset.
Rulesets are arranged hierarchically with general rules at the bottom and more specific rules at
the top. The rulesets at the bottom are standard in all applications and control the underlying
Pega 7 operations; while the rules towards the top control application functions. Ruleset order is
critical to rule resolution. To find the appropriate rule, Pega 7 begins with the top ruleset in the
list, and if the rule is not found, it moves to the next ruleset.
regular maintenance and as part of the conversion processes that a company may need to
go through while rolling out the application.
PegaCRM-SFA_WebServices: Contains the rules that support the creation or update of
work objects through web services.
PegaCRM-SFA_Pulse: Contains the rules that support Pega Sales Automation’s native
social collaboration tool.
PegaFW-Email: Provides Outlook integration capabilities for email, appointments, and
VCARD integration.
PegaCRM-Social: Supports social integration for the social tools: LinkedIn, Facebook, and
Twitter.
PegaCRM-OAuth: Includes rules related to authorization functions.
PegaFW-JSON: Contains rules to support the JSON object type.
PegaFW-Gadgets: Contains the rules for logging and display of the bulk upload process.
PegaFW-GeoLocationInt: Integration ruleset for GeoLocation integration
PegaFW-GeoLocation: Data layer, Sample invocation of Geolocation.
PegaCRM-NBAMAdapter: Adapter to integrate with NBAM
PegaCRM-NBAAdapter: Adapter to integrate with NBAA
Application Definitions
Pega Sales Automation ships with several pre-defined applications. Applications are arranged
hierarchically and inherit from each other. Applications built on top of Pega Sales Automation
inherit Pega Sales Automation rulesets and therefore inherit Pega Sales Automation features.
The PegaCRM-Entity class contains the Account, Contact, and Organization classes.
Class Structure
Entity Class: Data/Work Class Hybrid
Specific CRM Entities are created as work objects to support additional work object features
such as correspondence on work parties, attachments, audit history, and notes.
Management Classes
Classes deriving from PegaCRM-Mgmt- support data maintenance functionality like
Competitors, Products, and Partners and management utilities.
PegaCRM-Mgmt-Competitor
PegaCRM-Mgmt-Partner
PegaCRM-Mgmt-Product
PegaCRM-Mgmt-RelationshipTypes
PegaCRM-Mgmt-DataLoad
PegaCRM-Mgmt-ObjResaver
Data Classes
Classes which mainly hold the data the functionalities to add, update and delete.
Portal Classes
These three classes contain the basic end user portals and navigation rules for the basic
personas:
PegaCRM-Portal-SFA-SalesManager
PegaCRM-Portal-SFA-SalesOps
PegaCRM-Portal-SFA-SalesRep
Work Parties
Work party rules define which participants (roles) can be associated with a work object. Each
work object can contain multiple roles in addition to the required originator role. Some roles can
participate with multiple occurrences. This rule also controls how and whether you can add
parties using the user forms. The preconfigured processes support the following work party.
Follower
Tabs for work objects such as Organization, Account, Opportunities, Contacts, and Leads
are available for all portals.
Gadgets such as Recent, Following, and Pega Pulse are available for all the portals and all the
screens.
Recent
All recently viewed items (Contacts, Organizations, Leads, Opportunities, and Activities) are
available for quick and easy access within Pega Sales Automation. Additionally, the application
lets you edit or perform work on multiple items simultaneously. You never lose what you are
working on while working on other items in the system
Following
Follow any work objects that you want to monitor or have easy access to.
Create working groups to share information and collaborate on documents. Instantly find and
communicate with the key individual users who need to help close deals.
Controls such as the Quick Create Menu and Search tool are available for all the portals. The
view is based on your access permissions.
crm_entity_account:
crm_entity_org
crm_entity_contact
crm_work_opportunity
crm_work_lead
crm_work_task
crm_work_appointment
Relationship class
These are classes whose instances represent many-to-many relationships between entities of
specific types. Classes also inherit from work- to have features on flow processing available for
creating and maintaining these instances.
crm_link_socialdetails
crm_link_affinity
crm_link_c2a
crm_link_c2o
crm_link_p2p
Data classes
These are classes whose instances represent data instances in the system. Most of the
supporting data is entered and maintained by the sales operations team for use when creating
work objects.
crm_data_competitor
crm_data_partner
crm_data_product
crm_data_recentwork
crm_data_forecast
crm_data_businessterritory
crm_data_operatoraccess
crm_data_airport_codes
crm_data_relationshiptypes
crm_data_airportcode
crm_document_email
crm_management_dataload
Index classes
These are classes that hold data related to embedded pages or page lists of work objects
created and populated by Pega 7 declare index rules in the Pega Sales Automation
RuleSets.fw_index_recipients.
crm_index_affinityvisit
crm_index_linkedobjects
crm_index_operemail
crm_index_opptycompetitors
crm_index_opptycontacts
crm_index_opptypartners
crm_index_opptyproducts
crm_index_orgdomains
This chapter describes set-up and implementation details of features in the Pega Sales
Automation solution that involve integrating with third-party systems or other Pega 7 solutions.
Email Integration
To see the emails for any contact, send a message to the contact object which has the work
email address. Once a user receives an email, a contact user can associate it to other objects.
Components
The following rules are available following a new installation of Pega Sales Automation:
Create a new class for emails and appointments. The email class should have directed
inheritance to PegaCRM-Document-Email; the appointment class should inherit directly from
PegaCRM-Work-Appointment. After doing this, override the PegaCRM-Document-
[Link] decision table to default to your new Appointment class.
Create a new service package using the FWEmailCollector service as a guide. Be sure to
update the Service Email rule to set the page class to your new Email class.
Emails and appointments can be associated with other objects in the system, such as
organizations, accounts, and contacts. Since your implementation uses classes inheriting from
the Pega Sales Automation classes, you need to make sure the email integration associates
with implementation layer objects. Note that for Emails, this association is configured through
activities called from [Link]; for appointments, the
[Link] activity handles this.
Update the UI
Emails and Appointments appear in several places in the UI. You must update the following
rules to change class references to your implementation classes.
Appointments
Emails
Appointment Integration
To see the appointment for any contact, send an appointment to the contact object which has
the work email address and email account.
Calendar Integration
Create an appointment.
Forward it as calendar (.ics file).
To see the appointments in the Calendar option below the Operator menu, send the
appointment from Outlook To: The Sample Mailbox for synchronization with Pega Sales
Automation and the mail ID of the sales ops operator.
After doing this you can see the appointments in the calendar section. The Appointments
table is queried to get a list of all appointments whose owner is the current operator.
VCard Integration
Create an Outlook contact. Forward this as a business card (.vcf)
Contact creation process in Sales Automation from Vcard – (for
example:[Link]@[Link])
The system first checks whether there is any contact with this work email address. It then
checks the domain of the email address ( e.g., [Link]) and compares it to the
organizations in the Pega Sales Automation application (which has the above mentioned
domain). If a match is found, it returns that org –pzInsKey, which is used in the contact
creation process.
If an instance of Data-Admin-Operator-ID (Pega 7 operator) exists in the system with the
same email address as the from email address, an affinity is created between the sending
operator and the contact that was just created with the vcard.
The crmEvaluateEmail rule is the main service email activity where execution starts for all the
Outlook integration.
The following images and scenarios provide a view of the Vcard functionality and processing.
This image shows a user sending a vCard to the Synchronization email account for this
Pega Sales Automation instance
The Pega Sales Automation listener runs in the background and creates a contact record
with the vCard details in the .vcf file. The new contact is attached to the organization
specified in the vCard’s eMail address.
The domain in the person’s email address ([Link]) matches a domain name in
the organization record in Pega Sales Automation.
At this point, there is a new contact record and a C2O primary link that attaches the contact
to the organization. This image shows that the contact is attached to Megasystems
organization, because the “[Link]” in the eMail address for Ethan Allen matches
a domain name ([Link]).
Once the contact is created, the .vcf file is attached to the contact (Related Files).
The following image shows adding a Home Phone number to Ethan Allen’s vCard.
After sending the vCard again, the existing contact properties keep the same value, but the
Home Phone number is now stored on the Contact.
After the Operator ‘sfasysadmin’ sends a vCard to a Pega Sales Automation mailbox that
matches the contact John Smith’s email ID, a new Affinity link is created (Operator to
Contact).
Creating a vCard in Microsoft Outlook
If you do not have any contacts in your MS-Outlook mailbox, you need to create them in order to
test the Pega Sales Automation application. To do this:
Complete the information (General view shown below) and Save the vCard.
Enter the desired Pega Sales Automation mailbox address in the To field and click Send.
All operators and contacts, that an operator has read access to, can be added to a Pega Sales
Automation Appointment as an attendee. Once an attendee is added to the appointment, Pega
Sales Automation displays their availability, retrieved in real-time from the Microsoft Exchange
server. There is also an Expert search that allows finding resources by any combination of
Name, Territory or Skills. For example, an insurance agent can easily find all experts in Auto or
Life products within a specific territory and book an appointment based on their availability.
Once created, the appointment is associated with the Contacts on the appointment, as well as
any Organizations that have a domain matching the domain of the email address of an
attendee. The sales representative can also associate the Appointment with any Account,
Opportunity, Lead, or Contact.
Appointments List
Existing appointments can be reviewed through the Appointments menu item on the left
navigation, which displays a list of all appointments where the logged in user is an attendee.
Appointment Creation
To create an appointment, click Create Appointment, or select Create > Appointment from
the menu at the top of the screen. The logged in user is defaulted as an Attendee and the
availability is displayed.
Details of Fields
Field Description
Subject Subject of the appointment
Location Location for the meeting
Start time Start time for appointment
End time End time for appointment
Meeting Duration Duration of the meeting (30 mins to 23.5 hours)
Add Attendees
You can view the availability of attendees as seen below. Availability is retrieved in real-time
from Microsoft Exchange.
Add Staff
− Adds a row to the availability grid, with an auto-complete field that allows you to select
one operator.
− The auto-complete drop-down list shows the Operator’s name.
− Once selected, availability is displayed using EWS integration
Add Contacts
− Adds a row to the availability grid, with an auto-complete list that allows you to select
one contact.
− The auto-complete drop-down list shows the name and organization for any Contact that
the operator has access to, and that also has an email address.
− Availability is generally not provided for contacts since they do not have an account on
the Exchange server.
Add Experts
− Clicking this button launches the Add Experts modal below. Experts are simply operators
with specific skills.
− Allows searching Operators by name, skills or territory
− Territory should default to the Territory of the logged in user, but can be changed to any
Territory that the user has visibility to.
− The Skills search field allows the selection of multiple skills.
− Once selected, availability is displayed using EWS integration for all experts added.
Scheduling
The Send button creates the appointment on the Exchange Server. The status of the
appointment becomes Scheduled once the appointment is successfully created.
To save an appointment for the future, use the Save button. The status of this appointment
becomes Draft until you are ready to send it.
Scheduled appointments are also visible in the My Calendar view.
Description: Preparing the time slots in the header of the scheduling UI grid.
Activity: FillOrganizerDetails
The source for the data page is a SOAP connector with service name “GetUserAvailability”
Activity: createAppointmentInExchange
Activity: LoadCalendarSlots
Description: Post processing activity of D_AttendeeSchedule data page –populates the free or
busy information of all the time slots for each attendee in the schedule UI grid.
Impersonation
To create an appointment in Pega Sales Automation and synchronize it with Exchange, the
logged in user’s Exchange account must be impersonated by an impersonation account. The
impersonation account is used by Pega Sales Automation to create appointments on behalf of
all of the Pega Sales Automation users. Only one impersonation account needs to be created,
and can be used to impersonate as many exchange accounts as necessary.
Impersonation enables the caller to perform operations by using the permissions that are
associated with the impersonated account, instead of the permissions that are associated with
the caller's account. With Exchange Impersonation, one account acts as another account. When
an account is impersonated, the system logs the access as if the account that is specified in the
header were acting on the system. The calling account must have the appropriate permissions
to perform impersonation. After impersonation permissions have been established, the user who
has impersonation permissions can make calls against the other user's account. The
impersonated account is maintained in the Authentication Profile
(“EWS_Integration_AuthProfile”).
Work with your Exchange administrator to set up impersonation for your version of Microsoft
Exchange.
Sales team members spend a significant amount of time switching between sales applications
and Outlook, searching for or creating content. This time could more efficiently be used in
selling activities.
Pega for Outlook changes the way users work – it helps to manage contacts, Leads and
opportunities and to improve overall productivity by accessing Sales Automation related
information from within Microsoft Outlook.
Overview
The integration of Pega Sales Automation with Microsoft Outlook allows access to Contact,
Lead, Opportunity, Account and Organization related data from within Microsoft Outlook, which
greatly improves the productivity of sales and marketing teams.
Render Sales Automation work objects in Outlook add-in based on the contextual
information from an email’s From, To, CC fields.
Based on the Email selection of the user, Pega for Outlook loads the following work objects
with relevant records.
− Contacts
− Leads
− Opportunities
− Accounts
− Organizations
Create New Sales Automation work objects from the Outlook Add-In
Users can create the following work objects from the Outlook add-in.
− Activity
− Contact
− Lead
− Opportunity
Rendering Data
When a user selects an email or appointment from the Inbox in Outlook or composes a new e-
mail/Appointment, Pega for Outlook displays related Sales Automation Contact, Lead,
Opportunity, Account, and Organization details.
The application matches Outlook Email addresses with Email address associated with work
objects in Sales Automation and, based on the user Email selection, loads relevant content from
Sales Automation. The add-in displays up to 10 records in each work object list.
A user can expand each work object to see detailed information, as shown above.
Based on the User’s Email selection in Microsoft Outlook, the add-in displays
Selecting the sync icon next to a work object will load the email/appointment into Sales
Automation and associates with respective work object.
Sync E-mail
A blue email sync icon indicates that the email is not associate to the work object in
sales automation.
A checked sync icon indicates that the selected email is associated with Sales
Automation work objects.
Any files attached to the Email will also sync to Sales Automation.
When composing an email, the email will not actually synchronize to Sales Automation until
the email is completed and sent.
Sync Appointment
A blue appointment sync icon indicates that the email is not associate to the work object
in sales automation.
A checked sync icon indicates that the selected appointment is associated with Sales
Automation work objects.
Any files attached to the appointment will also sync to Sales Automation.
When composing new appointment it will not actually synchronize to Sales Automation until
it is completed and sent.
Once a user clicks the sync icon next to the work object, Sales Automation stores the
Email/Appointment interactions. Users need to navigate to relevant work object Activities
Emails/Appointments, to find the associated interactions.
After appointments are synced, subsequent updates to appointment details such as date and
time are not updated in Sales Automation.
User can create the below work objects by clicking on ‘Create’ icon from the Pega for Outlook
add-in.
Activity
Contact
Lead
Opportunity
The Create option in the header bar is a global create, the work objects created from this menu
will not be associated to work objects by default, but can we associated during creation.
There is also a context sensitive create menu within the menus of the Contact work object as
shown below. For Leads, Opportunities, Accounts and Organizations, only an Activity can be
created from the right menu.
Search
Users can also perform a search across all of their Sales Automation data using the search box
at the top of the panel. Work objects in the search results can be synced with the E-
mail/Appointment that is currently in context.
Procedure:
Type the additional information required in the Search box at the top of the add-in.
View in Browser
When the user navigates through Outlook E-mails, the add-in is loaded with relevant
information. Users can view detailed information for the work object using View in Browser
next to each work object. User needs to click 3 dots next to the work object to select ‘View in
Browser’ option.
As the above screen shots shows, users can access detailed information for a work object by
using the View in Browser menu item.
Design
High Level Design of Pega for Outlook Interaction with Pega 7 Application
The whole work flow starts from opening a portal from the browser control inside the Outlook.
The default portal for the user is circumstanced for outlook to display the [Link] the
user accesses the application from outlook the same will be delivered by PRPC server.
Once the add-in loads with the Pega 7 portal, a JavaScript method gets fired OnDOMReady
event of the web page. This java method calls the JavaScript call back object provided in the
Outlook plugin C Sharp code which in turn calls the Microsoft interop libraries to get the
selected/ opened email data and convert it to XML format and send it back as response to the
JavaScript call. In JavaScript, we convert the XML into data page via out of the box activities.
Login Screen
Once the user has installed the add-in, a login portal will be enabled in the Add-in Section of the
explorer of the Outlook.
Once the user clicks on the Login button, he gets a login form
Once the User gives his server login link and login credentials and hits login, the credentials will
be validated and the configuration will be extracted from the Pega 7 server using the same
service.
Credential Management
The following approach is being used to solve the above issues. This approach consists of a
local credential cache creation and updating the same. This ensures, every outlook session
uses a single set of credentials and no matter how many selection changes happen, we will do
only one network round trip to get the credentials.
As shown in the above picture, the following are the steps involved.
Any class in the plugin which needs information from outlook storage items, look at
[Link]
[Link] looks for a Add in level cache maintained in [Link]
If the cache is not available, (first time per session) will get the information from Exchange
server.
The cache is populated in This [Link]
The same credential information is passed on to the other classes.
In case the user logs in with separate credentials in the same outlook session, we refresh the
cache with the new credentials and then the data is posted to Exchange server.
We are using a Microsoft provided object (Storage Item) to store the login related information.
This item is not visible to the users through Outlook application / web mail but will be available
to the add-ins to store contextual information. We are storing the Login URL, Username,
password provided by the user in the above login screen. Before it is stored, the information will
be encrypted using Triple DES algorithm.
[Link]
The above link gives detailed information about the Storage Item control.
The content of the email will be sent to the JavaScript caller in the form of an XML. The xml
content would be in the below example format.
<Email>
<UniqueString><![CDATA[[Link]@pega.com_FW: Emailing:
Sales Dashboards Implementation
<From>[Link]@[Link]</From>
<To>[Link]@[Link]</To>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
Hi Charles,<BR>
<BR>
</BODY>
</HTML>]]></Body>
<TimeZone>UTC</TimeZone>
</Email>
Service Response
The web service spools out JSON response. The format of JSON response would be as
follows.
[
{
"SettingValue":"Inspector",
"SettingName":"SidePanelLocation"
},
{
"SettingValue":"SFAOutlookPortal",
"SettingName":"OutlookPortalName"
},
{
"SettingValue":"320",
"SettingName":"MaximizedSidePanelWidth"
}
]
This Web Service is used to validate the credentials and to get the Outlook Configuration from
the DSS Settings in the Pega Sales Automation Server. This web service queries all the system
settings available for the Outlook plugin and massages the data into the above data format.
The Outlook plugin code(C Sharp) consumes this web service to build the Configuration Object
which will be used to control the way the plugin behaves.
Class Structure
Methods Exposed
Activity – GetOutlookConfiguration
This activity will do an Obj-Browse to get all the configuration information and will massage the
data into the above shown JSON Response.
Windows External
The API to get Outlook email data is exposed as a COM Object which can be used by the web
applications under the object windows. External. All the methods exposed
String getCurrentEmailId()
2 getOutlookItemType This method returns the type of the current outlook item
the user is on.
String getOutlookItemType()
The values can be :
- Email
- Appointment
in case of an appointment.
6 openWorkObject This method opens the Work object with the given
activity, insHandle and action in the default browser of
void openWorkObject(String the user.
pyActivity, String insHandle,
String action )
7 setPropertyInEmail This method sets a string value with a Property name
key in the email object. This can be used to store any
setPropertyInEmail(String functional data and can be retrieved into the javascript
propertyName, String using getPropertyFromEmail method
propertyValue)
8 getPropertyFromEmail This method fetches the value stored on the email
against the property name. In case it is not stored, this
getPropertyFromEmail(String method will return NO_VALUE as a response.
propertyName)
9 Focus This method directs the focus on to the add-in from
anywhere in the outlook. This should be triggered from
void focus() java script on click on any HTML input text in case the
back button doesn’t work
10 getCurrentEmailUniqueString This method returns a unique string for an email.
String
getCurrentEmailUniqueString()
The following code fragment illustrates a sample conversion of XML to a Data Page.
var callback = {
success: function(oResponse) {
if (entryFlag == 0) {
[Link]("RetrieveContacts",
"", "");
entryFlag = 1;
},
failure: function(oResponse) {
//[Link]("RetrieveContacts","","");
};
[Link]("pyActivity", "Data-
[Link]");
[Link]("TargetPage", "EmailDataXMLPage");
[Link]("XMLStream", emailIds);
[Link]("EmailUniqueID",
[Link]());
The Pega Sales Automation Outlook Portal is designed specifically for the Pega for Outlook
add-in. The portal was modified to display the data in a smaller fixed width display. It uses the
Pega Sales Automation Outlook Harness.
Harness
The Pega Sales Automation Outlook Harness is the harness used to display the add-in. This
includes a separate JavaScript file [Link] to facilitate the Pega 7 to Outlook
communication.
SFAOutlookPortalHeader
The Outlook Portal Header is redefined to have a Lucene Search bar and a Create navigation
pane which will be used to create new work object sections.
The portal header also contains a minimize button that can be used to replace the add-in with
the minimized form. This makes use of the JavaScript method exposed by the Outlook C Sharp
API.
This data page sources the Outlook add-in. It is populated by one of three sources, depending
upon whether the data originates from a Search, Email, or Appointment. These data sources
are explained below.
SFASearchWrapper
This activity is a wrapper on top of the Pega 7 Lucene search to convert the Lucene output to
the format required by Pega for Outlook.
GetAccountsByContact
This Report definition spools out the results for a selected email
GetAccountsByContactForAppointment
This Report definition spools out the results for a selected appointment
As shown in the above diagram, in the compose view the email is created with the use of an
web service, the email XML Payload will remain the same in case of web service call the
javascript used for creating email in the Read view.
Service Endpoint -
http(s)://<server>/<contextroot>/PRRestService/Outlook/services/SendComposedMail
Sample Payload -
<Email><UniqueString><![CDATA[63007F3E639F46F1A905FD0CC9782490_01D1491A1F9E63
007F3E639F46F1A905FD0CC9782490]]></UniqueString><Subject><![CDATA[test]]></Su
bject><From>[Link]@[Link]</From><To>[Link]
ll@[Link];</To><Body><![CDATA[<html
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-
com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="[Link]
xmlns="[Link] name=Generator
content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, [Link]
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, [Link]
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
div.WordSection1
{page:WordSection1;}
<o:shapelayout v:ext="edit">
Once the email work object is successfully created in the Sales Automation and is associated
with the work objects, the attachments of the email will be synchronized to the email work object
in asynchronous request. The details of the same are explained in the coming section on Email/
Appointment Attachment synchronization.
Find all the attachments in the email and save them to a temporary location in the client’s
machine.
Create a HTTP Web Request with multipart/form-data as its content type.
Read all the files adding them one by one as separate content parts to the web service
request.
Fire the web service to the PRPC provided service and wait for the response.
This process is executed in a thread which is other than the UI thread of outlook, so this won’t
create any UX issues to the user.
PRPC Web Service to Accept File Uploads & Attach the same as attachment to any Work
Object
To upload mail attachment files along with configuration information, we need a web service
which accepts multiple files and a text input for the work object to which it needs to be attached.
In our case it is email work object.
Let’s start see the web service working from the starting point where we get a request from any
of the clients which follow the steps explained above section.
These are the steps that happen at the PRPC Layer before it comes to the destined web service
in our case OutlookAttachments from PegaFW-Outlook Rule set.
PRPC looks at the multipart form-data and converts the parts with content-type attachment or
file as BLOBs and will expose them to the Service-Rest rule via the data page
pyRequestAttachments
Our web service will be called after the above step is performed.
AttachFilesToWO Activity
From the web request get the work object Ins Handle as a part of the header, that gets
converted to [Link] and open the work object.
To open the work object use Obj-Open-By-Handle naming the page WOPage. The key to
open any work object is that you cannot associate any specific class to this page. So assign
$Any. This assignment works because you use the basic properties of any class to add the
attachments.
Build Data-WorkAttach-File and Link-Attachment pages to convert the file from the request
to an Attachment to a work object.
Set the [Link] property to true and save the work object.
Once you save the work object, the web service responds with a HTTP Success message to
confirm the client that the files have been uploaded successfully as attachments to the work
objects.
Note: This web service is generic and can be used with any client to attach files to any work object in
PRPC.
Create contact
Update contact
Activity: SFACreateContact
Data Transform
Name: SFAContactInput
Applies To: PegaCRM-Entity-Contact
Description: Maps the properties on the clipboard that the data transform useds.
Twitter
LinkedIn
Facebook
Twitter Integration
Pega Sales Automation has been integrated with a Twitter API to retrieve the information
related to an entity (Organization, Account, Contact) using a Twitter authorization profile.
As part of this integration, you can call the REST APIs provided by Twitter and use the response
format as “XML”.
All APIs used in this application integration support Authentication, but use only the
Authenticated mode of requests. You have to be authorized to use this feature of Accessing
Twitter from the Pega Sales Automation application.
Authorize Twitter
Maintain business relationships to track key information as they happen by associating a
linkage of individual profile to Lead, Contact, Organization and Account objects.
Re-associate linkage to different Twitter user profiles
De-authorize Twitter
Design
Twitter is supported by the following class structure:
Twitter Authorization
NOTE: Pega Sales Automation uses the three-legged Authorization model. More details are available
at [Link]
Authorization steps:
Another OAuth call is made to get the Access token for the user.
LIN returns token which consists of oauth_token and oauth_token_secret.
Authorization complete –The oauth_token and oauth_token_secret tokes that are returned can
be used in future API calls.
Twitter APIs
NOTE: REST API is used for Twitter integration. Details of all Rest API provided by Twitter are
available at [Link]
Also, there is an API console provided by Twitter which can be accessed at
[Link]
Almost all requests that use the HTTP GET method are rate-limited. To know more about the
Rate limiting details of Twitter, refer to: [Link]
POST oauth/request_token
Allows a Consumer application to obtain an OAuth Request Token to request user
authorization. This method fulfills Section 6.1 of the OAuth 1.0 authentication flow. It is
strongly recommended that you use HTTPS for all OAuth authorization steps.
GET oauth/authorize
Allows a Consumer application to use an OAuth Request Token to request user
authorization. This method fulfills Section 6.2 of the OAuth 1.0 authentication flow. Desktop
applications must use this method (and cannot use GET oauth/authenticate). Use HTTPS
for this method, and all other OAuth token negotiation steps.
POST oauth/access_token
Allows a Consumer application to exchange the OAuth Request Token for an OAuth Access
Token. This method fulfills Section 6.3 of the OAuth 1.0 authentication flow. The OAuth
access token may also be used for xAuth operations.
GET users/search
Purpose: This API is used in User keyword search. By Default, is passes the Name
(Firstname and LastName) as the search keyword.
Runs a search for users that is similar to the Find People button on [Link]. The results
returned by People search on [Link] are the same as those returned by this API
request. It is basically a keyword search.
Rate Limits: This method has a feature-specific rate limit of 60 calls per hour that is applied in
conjunction with the main REST API rate limit. Calls to this method count against the feature-
specific rate limit and the main REST API rate limit. If either limit is exhausted, the request fails.
You can monitor the status of the feature-specific rate limit by inspecting the HTTP response
headers X-FeatureRateLimit-Limit, X-FeatureRateLimit-Remaining, and X-FeatureRateLimit-
Reset. These headers correspond to the X-RateLimit headers provided by the main REST API
limit.
Some features, such as the GET search method, have additional feature rate limits, which are
applied in conjunction with the main REST API rate limit. Calls to users/search count against
both the feature and default request rate limit. If either limit is exhausted, the method fails. You
can monitor the status of the feature rate limit by inspecting the HTTP response headers that
are returned.
In addition to the default rate limit headers, you may also see:
X-FeatureRateLimit-Limit
X-FeatureRateLimit-Remaining
X-FeatureRateLimit-Reset
The meaning of these headers corresponds to the X-RateLimit headers provided by the main
REST API limit.
The response header details received from the Search Users API request from the API console
are illustrated below.
The first image contains the normal rate limits and the second image shows the feature-specific
rate limit.
GET statuses/user_timeline
Purpose: This API call is used to retrieve the tweets for the specified user.
It returns the 20 most recent tweets posted by the authenticating user. It is also possible to
request another user's timeline by using the screen_name or user_id parameter. The other
user’s timeline is only visible if they are not protected, or if the authenticating user's follow
request was accepted by the protected user. The timeline returned is equivalent to the one
seen when a user views a user's profile on [Link].
Rate Limits: It uses the default rate limit of the Twitter. Details of the Rate limit can be
monitored by inspecting the response headers X-RateLimit-Limit, X-RateLimit-Remaining,
X-RateLimit-Reset.
Below is one of the response header details received for the Tweets API request from the
API console.
GET friends/ids
Purpose: This API is used to retrieve the Friends of the specified twitter user. It returns an
array of numeric IDs for every user the specified user is following. This method is powerful
when used in conjunction with users/lookup.
When the process passes the Cursor parameter, it causes the list of connections to be
broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not
guaranteed to be 5000, as suspended users are filtered out after connections are queried.
Rate Limits: It uses the default rate limit of the Twitter. Details of the Rate limit can be
monitored by inspecting the response headers X-RateLimit-Limit, X-RateLimit-Remaining,
X-RateLimit-Reset.
Below is one of the response header details received for the Friends API request from API
console.
GET users/lookup
Purpose: This API is used to retrieve full details of Friends (in Bulk) by sending the Comma
separated list of friend IDs received by the GET friends/IDs API
Up to 100 users’ worth of extended information will be returned, specified by either ID,
screen name, or a combination of the two. The author's most recent Twitter status (if the
authenticating user has permission) is returned inline. It is also well suited for use in tandem
with friends/IDs and followers/IDs.
− You must be following a protected user to be able to see their most recent status update.
If a user does not follow a protected user, their status is removed.
− The order of user IDs or screen names may not match the order of users in the returned
array.
− If a requested user is unknown, suspended, or deleted, then that user is not returned in
the results list.
− You are strongly encouraged to use a POST for larger requests.
Rate Limits: Uses the default rate limit of the Twitter. Details of the Rate limit can be
monitored by inspecting the response headers X-RateLimit-Limit, X-RateLimit-Remaining, X-
RateLimit-Reset.
Below is one of the response header details received for the LookUp API request from API
console.
GET users/show
Purpose: This API is used to retrieve full details of the specified user. It Returns extended
information of a given user, specified by ID or screen name as per the required ID
parameter. The author's most recent status will be returned inline.
Rate Limits: It uses the default rate limit of the Twitter. Details of the Rate limit can be
monitored by inspecting the response headers X-RateLimit-Limit, X-RateLimit-Remaining, X-
RateLimit-Reset.
Above is one of the response header details received for the UserShow API request from
API console
Extension Points
The Pega Sales Automation application comes with a default Twitter application called Pega
Social. If a customer is interested in creating their own application the following need to be
updated before they can start using the system.
LinkedIn Integration
Pega Sales Automation provides a way to search a profile and company from the LinkedIn
application using its API.
Authorize LinkedIn
Maintain business relationships to track key information as they happen by associating an
individual LinkedIn profile to a Lead or Contact object.
Maintain a company’s profile data by linking it to the Sales Automation Organization and
Account objects.
Re-associate linkage to different profiles.
De-authorize LinkedIn
This link will direct the user to the following screen where details related to the application
should be entered.
Consumer key and consumer key secret is generated for the application which is used for the
API calls.
Class Structure:
PegaSocial- Base class for all social media integration
PegaSocial-Embed- Base class for all data classes used in integration
PegaSocial-Embed-LinkedIn- Abstract class for Linkedin
PegaSocial-Embed-LinkedIn-Profile (Concrete data class for user profile)
PegaSocial-Embed-LinkedIn-Company (Concrete data class for company profile)
PegaSocial-FW- Abstract class for Social
PegaSocial-FW- LinkedIn (Concrete class that contains all the integration and
functionalities)
PegaSocial-FW-SocialDetails (Data class that holds the linking between social media
profiles and work object)
PegaSocial-Preferences (Concrete class that contains the authorization required)
PegaSocial-Preferences- LinkedIn Concrete class for Linkedin
LinkedIn Authorization:
The steps used to perform a LinkedIn Authorization are:
Implementation
This is achieved with the Connect-HTTP rule. It requires a header which must be sent along
with the call.
Request Token
URL: [Link]
oauth_callback (optional)
oauth_consumer_key
oauth_nonce
oauth_signature_method
oauth_timestamp
oauth_version
URL: [Link]
oauth_consumer_key
oauth_nonce
oauth_signature_method
oauth_timestamp
oauth_token
oauth_verifier
oauth_version
URL: [Link]
Profile API
Request Type: GET
URL: [Link]
[Link]
Company Search
Request Type: GET
URL: [Link]
URL,industries,status,logo-URL,blog-rss-URL,twitter-id,employee-count-
range,specialties,locations,description,stock-exchange,founded-year,end-year,num-
followers))?keywords=
Company Profile
Request Type: GET
URL: [Link]
[Link]
Throttle Limit
LinkedIn API keys are throttled by default. The throttles are designed to ensure maximum
performance and to protect the user experience of all users on LinkedIn.
Current User's Public Profile Returns full public profile details Application: 100k
Note: Applications will not be able to call the People Search and Jobs API without having Vetted API
access. To obtain Vetted API access, a customer must enroll in the LinkedIn partner program.
Contact and Lead Work Objects: People search is the entry point. The customer must have
Vetted API access.
Organization and Account Work Objects: Customer needs Vetted API access for Company
updates.
Note: Need Vetted API access for accessing Per User: 100
peoples. If we don’t have this access, the Contact
People Search and Lead’s LinkedIn will not work. Per Developer: 400
Application: 100k
Per User: 50
Other's standard Returns the mini-profile for any profile visible to the
profiles requesting user Per Developer: 200
Application: 100k
Per User: 50
Other's public Returns the public mini-profile for any profile visible
profiles to the requesting user Per Developer: 200
Application: 100k
Get Companies Returns company profiles from LinkedIn Per User: 500
Application: 100k
Reference: [Link]
Facebook Integration
A Sales Representative can perform the tasks below in Pega Sales Automation:
Authorize Facebook
Maintain business relationships to track key information as they happen by linking an
individual profile to a Pega Sales Automation Lead or Contact object.
Maintain the company’s profile data by linking the company to Pega Sales Automation
Organization and Account objects.
Re-associate linkage to different profiles
De-authorize Facebook
The implementation of the social media integration (Facebook, Twitter and LinkedIn) is available
in a single RuleSet PegaSocial-FW.
Integration Classes
PegaSocial-FW- Abstract class for Social
PegaSocial-FW-Facebook (Concrete class that contains all the integration and
functionalities)
PegaSocial-FW-SocialDetails (Data class that holds the linking between social media
profiles and work object)
Embed Classes
PegaSocial-Embed- (Base class for all data classes used in integration)
PegaSocial-Embed-Facebook Concrete class for Facebook
PegaSocial-Embed-Facebook-Profile (Concrete data class for user profile)
PegaSocial-Embed-Facebook-Company (Concrete data class for company profile)
PegaSocial-Embed-Facebook-Education (Concrete data class for education details)
PegaSocial-Embed-Facebook-Employer (Concrete data class for employer details)
PegaSocial-Embed-Facebook-Feed (Concrete data class for feed details)
PegaSocial-Embed-Facebook-Location (Concrete data class for location details)
PegaSocial-Embed-Facebook-School (Concrete data class for school details)
PegaSocial-Embed-Facebook-Work (Concrete data class for work information)
Preferences Class
PegaSocial-Preferences (Concrete class that contains the authorization required)
PegaSocial-Preferences-Facebook Concrete class for Facebook
The application ID and application secret values are available under PegaSocial-FW-Facebook.
The CPMFacebookApplicationSettings map value rule should be changed to have the correct
values.
Enter the App Name as required and click Create New Facebook App ID.”
Enter Namespace, App Domains and Contact Email, click +Add Platform and select
Facebook Canvas.
Fill in the Secure Canvas URL and Canvas URL and click Save Changes.
Select Status & Review and then select Yes to make your application available to the
public.
When these steps are complete, access to basic information such as email, public_profile
and user_friends is available.
To get access to more information click on Start a Submission and then enter data as
required.
Update the appropriate Dynamic System Settings (DSS) with the generated App ID and
App Secret keys. For more information, see the Dynamic System Settings for LinkedIn,
Twitter & Facebook section of this document.
Modules
Pega Sales Automation uses a graph API to integrate with Facebook. A Graph API presents a
simple and consistent view of the Facebook Social Graph, uniformly representing objects in the
graph (people, photos, pages, and so on) and connections between them.
Pega Sales Automation integration with Facebook can be split into the following modules:
Authorization
The authorization process starts when the sales representative clicks on the Facebook icon
available on a Lead, Contact, Account or Organization object.
Graph API uses OAuth 2.0 for authorization. When authorizing the application, the user
grants your application access to the basic information. Since Pega Sales Automation needs
additional information such as work history, education history, location and so on, you need
to request additional permissions using the scope parameter.
API Used:
[Link]
ns _requried&redirect_uri=your_callback_URL
The following permissions must be granted to the user for Pega Social application use.
− offline_access
− read_stream
− user_work_history
− user_education_history
− user_location,
− friends_work_history
− friends_education_history
− friends_location
− user_about_me
− friends_about_me
The above URL returns an access token with the required permissions. The generated
access token is now used to get the authenticated user ID. The generated access token and
user ID values are stored in a database, so that when a user logs in he can perform other
operations without going through the authorization process again.
Link Profile
Once the authorization process completes, Pega Sales Automation allows a user to link a
Facebook user profile to a Contact or Lead object and a Company profile to an Organization
or Account object.
The sales representative can search through different lists of users by setting search criteria,
and then link the object to see the detailed information. A linked object can be re-linked to a
different profile.
API used:
[Link] Type –
GET)
The mutual friends between the logged in authenticated user ID and the linked profile for a
contact or lead object are obtained using –
[Link]
red. (Request Type – GET)
De-Authorization
The sales representation is provided with an option to de-authorize the account from Facebook.
Upon clicking the de-authorize button, the session through which the Pega Sales Automation
logs into Facebook is logged out and the access token details stored in the database are
removed.
After the de-Authorize process, you need to repeat the authorize process if you click on the
Facebook link available on the Contact, Lead, Account or Organization object.
API Used:
[Link]
en_to_expire (Request Type – GET)
For more information related to the Facebook Graph API, please refer to:
[Link]
For more information related to the privacy and platform policy, please refer to:
[Link]
Note: - To update value of each attribute, the developer needs to update corresponding Dynamic
System Settings with the appropriate value.
The following table contains the list of Dynamic System Settings that need to be updated for
social media integration in Pega Sales Automation and a sample value for each that was used
in one of the development environments.
Dynamic System
Dynamic System Settings sample Value
Settings Name
For LinkedIn
LinkedinConsumerKey y5n687wd7a2r
LinkedinConsumerSecret ABUqF5luPwJYnzjk
LinkedinRequestTokenURL [Link]
LinkedinAccessTokenURL [Link]
LinkedinAuthorizeUserURL [Link]
LinkedinRevokeTokenURL [Link]
LinkedinAPIURL [Link]
TwitterConsumerKey zLSxeSps7yT2InrSRdkEDw
Dynamic System
Dynamic System Settings sample Value
Settings Name
For Twitter
TwitterConsumerSecret P95m6E9wmiQJFVKDAg5nWlg5FsJxPAUXdOhAxRwNUZE
TwitterRequestokenURL [Link]
TwitterAccesstokenURL [Link]
TwitterAuthorizeUserURL [Link]
TwitterAPIURL [Link]
For Facebook
FBApplicationID 213682632091885
FBApplicationSecret 4ed6d6cbd90c24df1c790c2f5b854de2
FacebookAPIURL [Link]
Note: The PublicLinkURL will vary per environment and should refer to the web-application in the URL,
such as [Link]
The getDynamic utility is used to return a value from the Dynamic system settings. A sample
format is illustrated below. In this example, a value is fetched from the above mentioned
Dynamic System Settings.
Using Dynamic System Settings, you can enhance the maintainability of the properties that are
configurable for each deployment or for each environment without unlocking any RuleSet in that
particular environment.
Please review the Pega Sales Automation Tech Note Integration with NBAM / NBAA on the
Pega Sales Automation page of the PDN ([Link] for steps to setup this
integration and a sample implementation of the same.
Customer implementations of Pega Sales Automation can choose to leverage either the “Local
Campaigns” functionality or the “Next Best Sales Activities” functionality or both. Many steps
involved in setting up the integration with NBAM or NBAA are common:
Defining SR class
Every application built on top of DSM should define a top level SR class so that the application
can have its own issues and groups (Refer to the document
[Link] for more information on DSM and its
artifacts.)
For the sample implementation PegaSFA_NBAM, the following artifacts are defined.
Once you define your own SR class, make sure this class is specified in the field value rule with
SFABusinessIssue/ SFAGroup: Used as a sample issue to store treatments and offer flows
needed for local campaign functionality.
This class is mapped to use a database view (so an external mapping is needed) called
CRM_VW_CAMPAIGN_CONTACT. The external mapping tab of the class’s definition is
illustrated below:
These views should be created in the NBAM’s external marketing database which is taken care
of by the adapter’s data base scripts during installation. For more details on installation, refer to
the Pega Sales Automation NBAM Adapter installation document at
[Link]
This data class needs to be specified as the customer data class for NBAM through Pega
Marketing portal. Configuration -> Settings -> Application Settings landing page.
From the Application Settings landing page select the Manage Data Relationships tab. This
landing page has to be edited by the implementer to set the above created data class as the
customer class name.
Bulk upload functionality has been updated to upload contacts with CLV Values. This additional
feature is available only if PegaCRM-NBAMAdapter and PegaCRM-NBAAdapter rulesets are
included in the application that is built on top of PegaCRM-SFA application.
with NBAM. This is achieved using the Pega FCM (Federated Case Management) feature that
allows seamlessly displaying harnesses from one Pega 7 instance on another. Adapter rulesets
are shipped with the Pega Sales Automation product to achieve this integration. The contacts of
the sales representative in Pega Sales Automation are profiled / segmented and included in the
‘Local Campaign runs’.
Solution Overview
The solution involves the following:
Harness rule in the Pega Sales Automation application to invoke, integrate, and retrieve the
‘CampaignsDashboard’ on NBAM application through FCM
Sample rules and artifacts to execute a campaign
− Campaign Templates (Sample Email Offers and SMS Offers)
− Sample Post-processing rules
− Sample Email-Treatment / SMS-Treatment
Pre-requisites
Pega Sales Automation 7.21
NBAM 7.21
Host configuration setup for NBAM is done in prgateway
Adapter architecture
In the Pega Sales Automation application:
The ruleset PegaCRM-NBAMAdapter holds all the rules that correspond to integration
between Pega Sales Automation & NBAM and rules required for local campaign
functionality.
On the NBAM application:
− PegaSFA-NBAM-Rules that groups all the rules that were overridden from NBAM for the
sample implementation.
− PegaSFA-NBAM-Artifacts that contains the artifacts created for the sample
implementation.
Implementation
Local Campaign functionality can be enabled by setting the dynamic system setting instance
“EnableLocalCampaigns” to true.
This enables the Campaigns menu item on the left navigation menu.
Clicking on the menu item displays the harness CampaignsDashboard that (through FCM)
displays the dashboard from the NBAM application.
Sample implementation of an Email and SMS Offer are included in the PegaSFA-NBAM-
Artifacts ruleset. These offers include sending out the treatment and processing based on
responses received from the contact. Handoff shapes are used to hand-off specific processing
to smaller flow rules like processing user response. For the sample implementation, a marketing
activity is created against each contact included in the campaign. Statuses are updated based
upon whether the user accepted or rejected the offer.
Sample Connector activity invoking the web service to create entities in Pega Sales Automation.
A batch-program to subject all the contacts in the Pega Sales Automation system through a
strategy and to identify the top offer and propensity for each contact. At a high level, the
following setup is required for achieving this:
− A Program in NBAM to run a specified Segment against a pre-defined Strategy rule.
This should be setup to run at a scheduled time every day to get the latest results.
− An Adaptive model for the strategy rule to leverage, to evaluate contacts against past
trends.
− An output template to capture the results of the runs.
A real-time re-evaluation of the rules (upon log-in) for the top N contacts in the book-of-
business for that sales representative and a display of the top M results on the dashboard.
At a high-level, the following setup is required for achieving this:
− A SOAP-Service rule in the NBAM application and service activity to do the related
processing and streaming of XML results.
− A Connect-SOAP rule in the Pega Sales Automation application and connector activity /
data page to invoke the SOAP call and retrieve the results
Pre-requisites
Pega Sales Automation 7.21
NBAA 7.21
Host configuration setup for NBAA is done in prgateway.
Adapter Architecture
On the Pega Sales Automation application, two adapter rulesets are included:
PegaCRM-NBAMAdapter – holds all the rules that correspond to integration between Pega
Sales Automation & NBAM and rules required for the Local Campaign functionality.
PegaCRM-NBAAdapter – Needs PegaCRM-NBAMAdapter as a pre-requisite ruleset and
holds all the rules that correspond to integration between Pega Sales Automation & NBAA
and rules required for ‘Next Best Sales Activities’ functionality.
On the NBAA Application:
NBAM-SFA-Adapter ruleset which contains the integration rules, the Pega Sales
Automation’s own Customer data class for NBAM and other rules customized for the ‘Local
Campaign’ functionality.
NBA-SFA-Adapter ruleset which contains the rules created or overridden for connecting with
NBAA and quadrant functionality.
On top of PegaSFA_NBAM_FW, a sample implementation called PegaSFA_NBAM is built.
It contains the three rulesets
− PegaSFA-NBAM-Rules that groups all the rules that were overridden from NBAM for the
sample implementation.
− PegaSFA-NBAA-Rules that groups all the rules that were overridden from NBAA for the
sample implementation.
− PegaSFA-NBAM-Artifacts that holds the artifacts created for the sample implementation.
A sample access group “PegaSFA:MarketingAdmins” is created to use the sample
implementation PegaSFA_NBAM.
The sales representative who wants to use quadrant functionality should have access to the
two access groups:
− SFASample:SalesRep (access group for your application built on PegaCRM-SFA with
the 2 adapter rulesets PegaCRM-NBAAdatper and PegaCRM-NBAMAdapter.)
− PegaSFA:MarketReps
Implementation
Enabling the quadrant in SalesRep Portal
The quadrant is built using the results of the data page D_crmNextBestSalesContacts. The Data
page is populated using a Connect-SOAP call to a service in the NBAM application.
Creating Propositions
The following are the three sample propositions created for quadrant functionality.
For these 3 propositions, important properties that are needed by NBAA to provide NBO are
StartingPropensity and StartingEvidence and these are set to 0.45 and 30 respectively.
SalesPlans strategy
This strategy is re-saved to the PegaSFA-NBAA-Rules ruleset. Changes done to this are:
For the “Plans” shape, SFAInsurance and Policy are specified as issue and group
respectively.
For the “Set Channel Details” shape, “CallCenter” is hardcoded for pyChannel and
“Inbound” is hardcoded for pyDirection.
As we are going to trigger this strategy through some batch process, the PlansQuestionnaire,
Sales Plans Q&A for WhatIf and Switch for these two shapes may not be useful for us and thus
we can remove them.
Adaptive model
Our use case is very simple and from the Pega Sales Automation application’s Contact class,
so we are using only the CLV_Value. This adaptive model rule is copied into PegaSFA-NBAA-
Rules ruleset and under the PegaSFA-Data-Customer class to make CLV_Value property as
the only Predictor.
Three sample CSV files are created to train this model with some behavior for the demo(Refer
to the tech note “Integrating SFA with NBAM and NBAA Tech Note” at
[Link] to know how to train Adaptive rule with
sample data).
The three sample files and the behavior these files provide to the model can be found at
<Release Folder>\Install\Optional\NBA-Adapter\SampleResponses
[Link](As the CLV value goes from 1 to 950, propensity for offer
FiveYearTermLifeInsurance increases.)
[Link] – As the CLV value goes from1 to 950, propensity for offer
MortgageTermLifeInsurance decreases.
[Link] –As the CLV value goes from1 to 500, propensity for
offer ReturnOfPremiumTermLifeInsurance increases and as it goes from 500 to 950, the
propensity for same offer decreases.
AllOffers strategy
This rule is re-saved to PegaSFA-NBAA-Rules and since we are using only one category of
propositions (insurance policy plans), use need only one sub-strategy: SalesPlans.
NextBestAction strategy
This rule is re-saved to PegaSFA-NBAA-Rules and since the use case is to get only the
NextBestOffer for a given customer, all sub-strategies related to other functionality (like
Retention, Survey, Service etc.) and the switch shape are removed.
The new rules created for the quadrant should support two kinds of functionality.
Some rules are used for a batch process that is run at a specified time every day so that it
gets the Next Best Offer for every contact within Pega Sales Automation Contact’s table and
stores the top offer name along with other properties such as propensity and so forth in a
table called SFAPRIORITIZEDCONTACTS.
Some other rules are used when a sales representative logs into the Pega Sales
Automation SalesRep portal. When a sales representative logs in, a service on the NBAA
system is triggered so that an activity joins the Customer table with
SFAPRIORITIZEDCONTACTS to get the top x contacts. It then fetch the Next Best Offer for
each contact and returns back to the SalesRep portal only the top y contacts with highest
propensity among x.
AllSFACustomers segment
This is created under PegaSFA-NBAM-Artifacts ruleset and on class PegaSFA-Data-Customer.
This segment rule lists out all of the Pega Sales Automation’s contacts with the condition that
CustomerID!=null.
This is used by the Program Work object that users will create to run at a specified time every
day.
SalesNBAOffer strategy
Created under NBA-SFA-Adapter.
SFAOfferToOutputToDBTemplate strategy
This is an extension strategy created under NBA-SFA-Adapter ruleset. This strategy is meant to
be overridden by customers so that they can specify the proposition (offer) whose offer-flow rule
defines how and what properties of those top offers from SFAInsurance issue are stored into the
SFAPRIORITIZEDCONTACTS table through the NBAM’s database template rule.
This is overridden in the PegaSFA-NBAA-Rules demo ruleset and the SalesNBAOffer from
SalesNBAIssue is specified as the proposition.
SalesNBAOfferWrapper strategy
This strategy rule is created under NBA-SFA-Adapter ruleset.
Its purpose is to set the following properties from the resulting offer from the SalesNBAOffer
strategy onto the SalesNBAOffer proposition.
The result of this strategy is always the Offer SalesNBAOffer with the best offer details for the
corresponding customer stored onto this offer.
This is the strategy that will be used by a program work object. Users can make this work object
run at a specified time every day. The Program Work object uses this strategy in combination
with the AllSFACustomers segment so that each contact from the segment is subjected to this
strategy.
SalesNBAOffer offer-flow
In NBAM, an offer-flow defines the behavior for a proposition that is the resulting outcome of a
program’s strategy.
In the Adapter’s sample implementation, the SalesNBAOffer flow defines how details for a
Contact’s best offer are stored in the database. It uses another NBAM’s artifact called Database
Output Template rule through Send Generic shape to store best offer’s details in database
template.
A new database template rule can be created by navigating below the NextBestAction Studio
portal and clicking New on the opened landing page.
Once the rule is created, columns under the Details tab must be defined. For
SFAPrioritizedContacts, the column details are shown in the image below.
For the Outbound database template rule, we should also configure when the data has to be
written into the actual table. This configuration is done on the Finalize tab.
For SFAPrioritizedContacts, the Finalize settings are shown in the image below.
The new rules mentioned above support the batch functionality that is used to obtain and store
information in the database table SFAPRIORITIZEDCONTACTS, the Next Best Offer for all
contacts within Pega Sales Automation.
The rules described below support the functionality to obtain the Next Best Offer for the top X
customers from the SFAPRIORITIZEDCONTACTS table and return the top Y customers along
with the Next Best Offer for each, and its propensity exposed as a SOAP Service.
Since an Outbound Template does not by default create a class corresponding to the table, a
new class PegaMKT-Data-SFAPrioritizedContacts is introduced by mapping it to the
SFAPRIORITIZEDCONTACTS table through external mapping.
The requestor mapping parses the request and places the OperatorID and NumberOfContacts
from the request parameters to the pyUserIdentifier and pyLabel respectively on the Primary
page MyServicePage
NBOsForSFAContact activity
This activity takes NumberOfContactsTobeReturned and NumberOfContactsToEvaluate as
parameters. These parameters are expected from the client of the service.
On a dummy SFAContact page, this activity calls an interaction NBSalesContacts which places
NumberOfContactsToEvaluate with best offers on a clipboard page called
[Link], gets the NumberOfContactsTobeReturned and returns them back to the
Pega Sales Automation sales representative portal that requested it.
NBSalesContacts strategy
This strategy rule is created under the NB-SFA-Adapter ruleset and it calls the
SalesNBAOfferWrapper sub-strategy on the NumberOfContactsToEvaluate number of
customers.
A web-designer or developer can configure and embed composite web applications or business
mashups in their company web pages. Pega gadgets provide user interface components to
build these mashups so you can deliver a rich application experience for all users.
The terminology IAC (Internet Application Composer) & Pega Web Mashup will be used
interchangeably. Pega Web Mashup was earlier known as the IAC in Pega7.1.8 and earlier
versions. For details, please refer [Link] in PDN.
In this document, Source application will denote the company web-pages or web-application,
whereas the Target application will denote the Pega-PRPC application, where ultimately the
work-object will be created.
This Pega Sales Automation v7.2 release, we have added a Demo for Lead IAC Gadget, so that
the customer can easily demo this without the need of creating new infrastructure for Source
application.
Under the section “IAC Customization”, the implementation Pega Developer can define the
defaults for the LEAD WO created from this IAC Gadget and user-interface too.
Be sure the ruleset Pega-IAC latest ruleset is a part of your Application rulesets stack.
Configure the [Link] file in PRPC system hosting applications which will be accessed
through IAC by adding the following environment setting:
<env name="Authentication/RedirectGuests" value="false"/>
In PRPC application, this can also be accomplished by adding a DSS in the following
manner, instead of directly updating [Link] file.
IAC Implementation
The main steps in implementing the IAC are as follows, which have to be performed on Source
Application.
b. Configure a Host.
If this is the first time you are using IAC, please start by adding a Host, otherwise
configure the HOST as shown below.
PRPC Host URL, will be the URL for your Target application where the Lead work-object
will be created.
c. Click “Test Connection” after providing the host details. It will test the following valid
configurations:
If the configuration-2 fails, it means the RS Pega-IAC:07-10 is not included in the PRPC
application you are referring, which is mandatory for IAC gadget configuration in Target PRPC
application.
Click on Gadget Setup in the left menu and configure the following details.
PRPC User Name & Password: Existing user in Target PRPC application.
Click on Submit to proceed with gadget configuration. In Gadget Generation section, update
the details as mentioned below.
Click Preview button for the configured gadget, in case of failure please troubleshoot may be
required. Successful preview will similar to the below screen.
After successful preview download the generated java scripts and HTML code using “Download
Web Files”.
These files will be used to integrate this gadget with Source web application
Open Gadget HTML file it will have script tags and div tag containing the gadget information.
Copy all the script tags under the head tag in your web application page where we want to
embed this gadget.
Copy the whole div element to the place where we want to place the gadget in web page.
This chapter details the design, rule structure and implementation details for the UI components
in Pega Sales Automation 7.21.
Design
Prior versions of Pega Sales Automation (7.11, 7.12, 7.13 & 7.14) exploited the responsive
capabilities of the Pega 7 platform. This allowed for a single code base that adjusted layouts
dynamically (Dynamic layouts, Repeating Dynamic Layouts, Layout Groups) based on the
break-points configured in the application's skin rule.
In the 7.21 release the mobile user experience has been radically redesigned taking a 'mobile-
first' approach with the idea to progressively enhance to other view ports. The goals for this
release were:
To provide landing pages that allow the user to take quick-actions (create / edit / call /
search),
To simplify key processes frequently performed by the mobile sales personnel and
To review key metrics on a personalized 'dashboard'.
Portal Rules
Sales Automation 7.21 ships with portals for the three personas: Sales Representative User,
Sales Manager User, Sales Operations User.
The portal rules refer to the skin rule defined at the application level.
The top level harness for all the portals is ‘SFAPortalWorkSpace’. As different UI rules need to
be grouped by the different personas, the ‘applies-to’ class (highlighted in the screen shot) on
the portal rules determine what functionality would be allowed for a specific portal.
Rule-Portal
SFASalesOps_Web
SFASalesRep_Web
SFASalesManager_Web
Classes
PegaCRM-Portal-SFA-SalesOps
PegaCRM-Portal-SFA-SalesRep
PegaCRM-Portal-SFA-SalesManager
Skin
pySFASkin
Harness
[Link]
− Base version (For Desktop and Tablet)
− Mobile version (For Mobile Phone)
SFAPortalHead
SFAPortalLeftPan SFAPortalConte
Top Panel
Section: [Link]
Description: Contains the UI for the header part of all the three portals.
Header Components
Search Box
− Pega Sales Automation allows a search across work pools
− Section: @[Link]
MenuBar: [Link]
Overridden Rules
− [Link]
− [Link]
− [Link]
Center Panel
Section: [Link]
This section refers to the SFAPortalLanding section from SalesRep, SalesOps and
SalesManager classes as per the respective user login.
Harness: [Link]
Section: [Link]
Section: Data-Portal.SFASalesOpsPortal_Dashboard_Content
Harness: [Link]
Section: [Link]
Section: Data-Portal.SFASalesOpsPortal_Dashboard_Content
Overridden: [Link] – Contains the pulse
section (pxActivityStream)
Harness: [Link]
Section: [Link]
Section: Data-Portal.SFASalesOpsPortal_Dashboard_Content
Overridden: [Link] – Contains the pulse
section (pxActivityStream)
Header (HIDDEN)
SFAPortalLeftPanel_Mobile SFAPortalContent_Mobile
Header consisting of hamburger icon to navigate to other landing pages, search bar related
to the list, and provision to create the work object based on selling mode and access and
permissions and headers are sticky.
List displaying tabs: Recent, Individual and Business / All.
Each record in the list displays work object name as primary text, important details
respective to the item as secondary text, and primary actions.
Actions such as edit, call, send an email, launch the address related to work object are
accessible in blue.
Color code on the left of a work object represents stage.
Description: Uses the standard Pega 7 provided Recent gadget beginning with Pega Version
7.12. However, the rule has been customized to enable the following:
Description: In the left side of the column, the .pyClassName property for work objects is
referenced for work object such as Opportunity, Lead, Account, Organization, Contact etc. The
GetCaseIcon control is used to display the respective work object icon.
Control: GetCaseIcon
useOnState – true
DefaultIcon - null
The icons in this display reflect the following states of a recent item:
New: Red
Perform: Red
Open: Grey
Viewed Recently: Grey
Description: Uses the custom Recent gadget, to display the work objects or entities that are
recently opened such as Opportunity, Lead, Account, Activity, Organization, Contact, and
Household.
Activity: CrmRecentWorkItems_Mobile– responsible for populating the recents list from the
report defination crmRecentWorkItems_Mobile.
Section: RecentItem_Mobile. This displays work object name, corresponding icon, secondary
text and primary actions can be performed relative to this.
Description: Unlike desktop, Recent gadget in mobile is a landing page, can be populated from
left navigation or Launchpad. To populate the list apart from above mentioned entities, the
following steps have to be performed:
Join the respective work item class with the recents in report definition
crmRecentWorkItems_Mobile, fetch the related properties and apply appropriate filters.
Create a section RecentItem_Mobile in its respective class.
Description: Uses the standard Pega 7 provided Following gadget. Customized rules are used
to achieve the following:
Refresh the Following gadget once user follows the work item
Open the work object from the gadget itself
Section: pyFavDisplay. This is a customization of the pyFavorites section that has been
configured to refresh the Following gadget when any user follows the work object.
Description: In the left side column, the .pxInsIndexedClass property is referenced for work
objects such as Opportunity, Lead, Account, Organization, Contact etc. It uses the GetCaseIcon
control to display the respective work object icon.
Control: GetCaseIcon
useOnState – null
DefaultIcon - null
Description: Uses the custom Following gadget to display the followed items and provides the
ability to open the work object from the gadget itself.
Section: Following gadget uses the same section as Recents as the display structures remain
the same. This displays work object name, corresponding icon, secondary text and primary
actions that can be performed relative to this.
Join the respective work item class in report definition crmRecentWorkItems_Mobile, fetch
the related properties.
Create a section RecentItem_Mobile in its respective class.
pyWorkHeader_Mobile
pyWorkPrimaryDetails_Mobile
pyWorkAdditionalDetails_Mobile
pyWorkSummary_Mobile
pyWorkAdditionalDetails_Mobile
Layout Group: DisplayType: MobileMenu
Details tab: pyWorkSummary_Mobile
− Dynamic Layout Format: Default, Custom CSS class: mobileNoPaddingWhiteBg
- All fields : label format – MobileFieldLabel (control format – empty)
- Advanced presentation options: cell read-only classes: mobileFieldValueExtn
NOTE: All the fields in pyWorkSummary_Mobile are only for read-only display of the values. Please
include the properties directly. The objective is to have a simple section and to avoid included sections.
MOBILE
New (Circumstanced: Mobile)
pyNewWorkContainer_Mobile
pyNewWorkHeader_Mobile
pyWorkBanner_Mobile
pyNewWorkSummary_Mobile
pyWorkSummary_Mobile_Write
crmNewHarnessButtons_Mobile
NOTE: Default TerritoryID and Owner attributes on all work object create screens to the current
operator ID and primary / default territory ID in the respective case type’s ‘pyDefault’ Data Transform
rule.
pyWorkBanner_Mobile
pyWorkSummary_Mobile_Writ
e
crmNewHarnessButtons_Mobi
le
Specialize: pyWorkSummary_Mobile_Write
− Dynamic Layout Format: Default, Container Format: MobileDefault
- All fields : label format – MobileFieldLabel (control format – empty)
- For Select Elements (Dropdown) Advanced presentation options: cell read-write
classes: mobileSelect
NOTE: All the fields in pyWorkSummary_Mobile_Write are editable. Please include the properties
directly. The objective is to have a simple section but for special cases that require included sections.
MOBILE
Perform (circumstanced for mobile)
pyWorkPerform_Mobile
pyActionArea_Mobile
pyActionLabelDisplaySection_Mobile
FlowAction (circumstanced for mobile)
pyActionAreaButtons_Mobile
pyActionLabelDisplaySection
_Mobile
pyWorkSummary_Mobile_Writ
e
pyActionAreaButtons_Mobile
Ensure that the flow action name is descriptive (this becomes the top label on UI)
Section: pyWorkSummary_Mobile_Write
Data Transforms: crmBeforeEditTransform / crmAfterEditTransform
Activities: crmBeforeEditActivity / crmAfterEditActivity
Check if a new circumstanced version of the rule is required for the work type being worked
upon.
Circumstance Flow Action: crmEdit for the applicable class
For mobile devices, the Launchpad has a search text box that allows the user to search for a
specific term against all cases in the application. If users are on other landing pages in the
application, they can also click Search from the left navigation menu.
A new harness SFAPortalSearch_Mobile has been added to the group to display the results and
also to display additional information about the cases in the results. Customization of Lucene for
Sales Automation 7.14 is documented in an earlier chapter of this manual. As of Pega 7.21,
Lucene functionality doesn’t support joining results with other “tables”. Hence for retrieving
secondary information on search results (for e.g Organization name for a contact) additional
lookups are done.
RuleSet: PegaCRM-SFA-Unauthenticated
AccessGroup: PegaCRM-SFA:Unauthenticated
Instances of class ‘Data-Admin-Requestor’
− Browser pega
− Browser prpc
This chapter describes the high level steps to create an implementation application layer on top
of the Sales Automation application and modify or create the required rules and structures to
support the layer.
Note: This document uses application name MyCoSA and organization MyCo for demo
purposes. You can replace these with local name choices.
5. Populate the business objectives to meet your business requirements following the example
below. Note that the first three entries are pre-populated.
6. Click Next> to display the Case types screen.
7. In the Case types screen, pick and choose the cases, to be extended in the implementation
layer.
8. In the Data types screen, click Create to build the new application.
9. Creation of the new application may take several minutes. If the application was
successfully created, the following screen will appear.