Spring ’15 Chatter Features

In advance of taking the Spring ’15 certification maintenance exams I’ve been reading the release notes one more time, with a focus on the broader picture, not just the platform elements and headline features that catch the eye during the pre-release phase. I tend to follow this regimen for every release and inevitably the detail of a number of smaller features/announcements are picked up that were simply skimmed on the first review, or indeed added to a later version of the release notes – this happens (so always check you have the latest version). In regard to Spring ’15 the low-key features of interest relate to Chatter and are covered briefly below.

1. Add Records to Chatter Groups
With this feature it’s possible to relate arbitrary records to a Chatter Group via the “Add Record” publisher action on the Group Layout (this needs to be configured). The utility of this feature appears to be twofold; convenience and communication. For example, if we have a collaboration group for a sales campaign, we can now list the targeted account records on the group page and access via a convenient link. It would seem that the relationship is one-way, it doesn’t appear possible to view the groups to which a record is related from the record detail page. Note, feed posts at the record level are not shared with the group.

Group Records 1

Group Records 2

2. Question-to-Case (GA)
Chatter Questions is a great collaboration feature in its own right, enabling expertise across the internal or external community to be brought to bear on posts structured as questions, with specific functions for answers, mark-as-best etc. As the name implies Question-to-Case allows a question to be escalated to a case from within the feed, with the feed post marked visibly as such.

Q2C1

Q2C2

Q2C3

A further extension to this feature, Knowledge Deflection for Chatter Questions is currently in beta. The functionality of this should be evident.

3. Action Links (GA)
Buttons can be added to feed posts that download a file, access a web page or call a 3rd party API. Action links can be grouped within an Action Link Template and packaged for ISV distribution. Action links are functionally very interesting, given the use cases they open-up, however the implementation is non-trivial and warrants a follow-up post.

It’s interesting to see how the Chatter product continues to evolve release-on-release. The direction the product is taking appears sensible, i.e. finer grained control via increased Trigger coverage (custom moderation etc.), richer content previews and extended external integration capability. Top of my wish list incidentally would be an enhancement to Topics to allow post activity from associated records (Topics for Objects) to be automatically shared and pushed out to topic followers via digests. This could be an optional flag that marks the topic as aggregating. With this model, users can simply follow a topic and have content pushed to them proactively that is either directly related (feed post association) or indirectly (feed post against an associated record). Such a feature would really help transition many notification use cases from email/task to Chatter.

Salesforce Manager Groups

A fit-for-purpose sharing architecture is one of the fundamental elements that underpin a secure and performant Salesforce implementation. The sharing architecture defines the record-level visibility model and should be subject to periodic review and refinement to reflect shifting organisational factors. The most efficient sharing models make full use of implicit sharing via the Role Hierarchy, with minimal use of explicit techniques such as Sharing Rules. An implicit model is reliant on a well conceived Role Hierarchy that reflects data access across the organisation, and is therefore not necessarily aligned directly to the organisational structure. This is hard to achieve and requires an approach of continual adjustment throughout an implementation project and beyond. The benefits of this approach are manyfold; control, reporting, maintainability and performance being just examples. In regard to control, implicit access provides the record-owner level of access, which can’t be achieved via explicit means. With reporting, the dynamic filters “My Team’s Accounts” etc. are based on the Role Hierarchy, i.e. users in roles below the current users’ role etc. in addition with some reports the Role Hierarchy can be used to filter the output at runtime. In regard to maintainability, the proliferation of sharing rules often introduced to compensate for a substandard Role Hierarchy design is avoided. Finally, in the performance case, although sharing data (AccountShare etc.) is persisted at the time of configuration, and not calculated fully at the time of record access, there is still a performance consideration with complex sharing models. So in short, a sharing model that is predominantly implicit is better than an explicit model. Irrespective of whichever model is implemented, a comprehensive understanding of the explicit techniques and their primary use cases is important to ensure the sharing model is appropriately secure and maintainable.

For the first time in a number of releases, the Spring ’15 release introduces a new sharing model feature “Manager Groups”. This feature extends the capability of explicit sharing techniques (Manual Share, Sharing Rule and Apex Managed Sharing) enabling direct use of the management hierarchy, as defined by the Manager field on the user record. Manager Groups are system defined, per-user, and can be utilised in the same way Public Groups are used in the same contexts. For each user 2 Manager Groups are provided; “Managers Group” – immediate managers and their manager and so on (up the management hierarchy) and “Manager Subordinates Group” – the user’s direct reports and their reports and so on (down the management hierarchy). Unlike Role Hierarchy based sharing, Manager Groups share directly to each user in the hierarchy chain, not all users with the parent role.

Note, the Manager Groups feature was initially introduced in the Winter ’14 release and made available upon request. Spring ’15 makes the feature automatically available in all orgs.

Prior to the introduction of Manager Groups, sharing based on the management hierarchy relied upon the Role Hierarchy reflecting the management hierarchy, or elaborate explicit means. The Manager Groups feature now provides an efficient means to share data up and down the management hierarchy, leaving the Role Hierarchy to strongly model the data access requirements for the organisation.

Enable via Sharing Settings page

Manager Group Sharing - Settings

Manual Share

Manager Group Sharing - Manual Share

Sharing Rule Definition

Manager Group Sharing - Sharing Rule

References:
Sharing Records with Manager Groups
A Guide to Sharing Architecture
Designing Record Access for Enterprise Scale
Record-Level Access: Under the Hood

Salesforce Spring 15 Platform Highlights

With Christmas a distant memory (well almost) it’s time to turn our attention to the next big event on the calendar, and no not New Year, I mean the Spring ’15 release of course.

The key dates for the Spring ’15 release are outlined here, the detailed rollout schedule can be found in the usual place.

The preview Spring ’15 Release Notes are here. Note, to keep up-to-date with updates to the release notes follow @salesforcedocs

This post outlines selected highlights related to the Force.com platform (in no order of significance).

– features are GA if not indicated otherwise

Salesforce1 Reporting Notifications
On the “Report Run” page a Subscribe button now appears that enables end users to subscribe to notifications relating to the metrics provided by the report, i.e. KPI1 greater than 100, send an email etc. Notifications can be scheduled in a flexible, recurring manner with the resultant action set to a Salesforce1 Notification (via the mobile app), Chatter post, email notification or Custom Action. In the latter case an Apex Class can be introduced which implements the Reports.NotificationAction interface.

public class myReportAction implements Reports.NotificationAction {
    public void execute(Reports.NotificationActionContext ctx){
        // perform action.
    }
}

The class above appears as an option for the “Execute a Custom Action” selection on the “Subscribe to..” page.

Report Subscribe

@testSetup Method Annotation
Test setup methods create test data for the test class as a whole. Annotated methods are executed first during test execution to create the test records – each constituent test method gets access to the same original set of records regardless of the DML operations of preceding test methods. This approach removes the test data creation and rollback operations from individual test methods, thereby reducing test execution time and removing the consumption of governor limits within test methods due to test data creation.

Mapping
Standard address fields now support inline map presentation. This is configurable and limited to Google as a map service provider.

Mapping - Standard Address Field

New Visualforce mapping components (apex:) make use of this capability to enable the simple addition of interactive JavaScript maps to Visualforce pages.

Lightning Process Builder
The Lightning Process Builder is unavailable during the pre-release programme, however the product will be GA on release. My general interpretation of the positioning of the 3 platform workflow capabilities is provided below for information only.

– Workflow: single-object centric collection of ungrouped rules and actions, auto-invoked via data modifications.
– Visual Workflow (Force.com Flow): multiple-object business process orchestration involving user interface elements for data capture and manual-invocation of logic*.
– Lightning Process Builder: single-object centric, visual composition of multi-step processes, auto-invoked via data modifications. Records can be created and cross-object updates applied to any related records not just the parent in a master-detail relationship.

(* I’m ignoring Flow Trigger Workflow Actions here; the pilot for which has been superseded by Lightning Process Builder.)

Note, there are differences between the beta version of Process Builder and the GA release. For example, Apex code can now be called directly from a Process, and Processes can be versioned for change tracking purposes (up to 50 versions, but only 1 can be active).

Login Forensics (Pilot)
Two new standard objects LoginEvent and PlatformEventMetrics enable identification of suspicious login patterns, such as unusual login times, IP ranges, above-average login behaviour etc. To avoid fraudulent activity a Salesforce security plan should be proactive in auditing login patterns over time.

Named Credentials
Named credentials bundle together the configuration details for an authenticated Apex callout; endpoint, authentication type and credentials are stored together as a single configuration record that is maintainable via the setup menu. This replaces a common use of Custom Settings and usefully decouples the authentication coding, which is handled by the platform.

Queueable Job Chaining
Asynchronous tasks submitted via Queueable Apex can now be chained an unlimited number of times; previously the limit on the chain size was 2. This sounds useful in terms of incremental processing of large data sets, but if your technical solution design requires a significant chain size this may indicate a flawed approach. Note, the release notes suggest that DE and trial orgs are limited to a chain size of 5.

New Lightning Components
New components and events have been added to the Lightning Component Framework, the restrictions in regard to authoring of components in a Developer Edition org with a namespace have also now been removed. With Spring ’15 components can be configured to run within the Lightning App Builder and Lightning Pages, although the former remains in a closed pilot.

Case Feed Macros
Case Feed users can now reduce time performing repetitive tasks by executing, via a single-key click, pre-defined macros. Macros are comprised of instructions such as selecting an email template and sending an email to a customer. In practice a library of useful macros will greatly increase Support Agent productivity whilst ensuring standardised support processes are adhered to. The macro functionality seemed to be missing from my pre-release trial org – I suspect the functionality is related to the Lightning Process Builder which is also omitted.

Indexed Column Added to Lists of Fields in Setup
A very useful additional column on the Fields page for Standard and Custom objects – covers standard and custom fields. An understanding of the indexes applied to an object can be key to troubleshooting reporting performance issues or to ensuring SOQL queries, list view filters etc. are defined with data retrieval performance in mind.

Indexed Column