True to form, Dreamforce 2021 presented several technical highlights for ISVs. Here are a few that caught our attention. Please note, not everything is available from day one. Timing may vary and proceed with caution.

Foyer

Slack integrations to Salesforce have been challenging for ISVs due to the fact that access tokens need to be stored securely for any org that the Slack application needs to access on the user’s behalf. 

Foyer is a native Slack integration for the Salesforce Platform that provides an SDK for the tooling and framework for developers to extend the reach of Salesforce into Slack. This SDK alleviates the need for the ISV or the Subscriber to build and host a middleware solution on their own.

With Foyer, Salesforce provides all of the security infrastructure as well as message routing the developer requires to authorize access between Slack and a given Salesforce org, Apex types and the metadata that represents the application’s UI within Slack.

The UI rendered in Slack can be built automatically by the metadata from the Salesforce org’s field attributes and layouts using Block Kit.

Foyer is currently in ISV pilot, with the developer pilot coming soon to allow anyone in the developer community to quickly build secure Slack apps as extensions to Salesforce 360.

Resources:
https://developer.salesforce.com/blogs/2021/09/introducing-foyer-native-slack-integration-for-the-salesforce-platform

DataWeave in Apex

Data transformations in Apex are about to get a whole lot easier.

The platform already contains JSON and XML serialization utilities as well as the ability to write Apex to perform nearly any type of transformation you can dream up but these are not the most efficient mechanisms to perform this task. Transforming data structures in apex can be accomplished and frequently require a significant amount of code to be written and tested and then maintained for a very long term. More often than not, the developer also needs to be very concerned about heap usage and file sizes while parsing the incoming stream and transforming it for output.

The power and simplicity of DataWeave from Mulesoft is being brought into Apex, making data transformation requirements a breeze. DataWeave allows data to be read in one format, parsed and transformed into another format for output.

It can, among other things, convert sObject structures to RFC compliant CSV, JSON, XML and back again – all without writing transformation logic in Apex. There is no need to worry about reserved words, special characters or escape sequences — DataWeave can handle it all.

DataWeave has the ability to:

  1. Serialize sObject records into JSON with custom time formats
  2. Handling Apex reserved words
  3. Removing or adding namespaces or suffixes like __c 
  4. Reading and writing RFC compliant CSVs

DataWeave is shaping up to make the common headaches of transforming data structures in applications a thing of the past.

Documentation: (Mulesoft)
https://docs.mulesoft.com/mule-runtime/4.3/dataweave
Playground:
https://developer.mulesoft.com/learn/dataweave/ 

Delete components from 2GP package

When it comes to feature parity between first generation and second generation packages, one large gap that has plagued developers is the inability to delete components from second generation packages.

The ability to delete components from 2GP packages is now in beta release and will be in developers’ hands soon. 2GP developers rejoice!

User Mode Database Operations in Apex

In Salesforce applications, especially of concern in ISV applications, the burden of respecting the sharing and CRUD & FLS configuration of the org where the code is executing is entirely in the hands of the developers. This burden is not insignificant. Even when leveraging a library that checks security & sharing and does ‘safe’ operations, that library must be used everywhere in Apex at all times to enforce access control rules.

The Salesforce platform is moving to a model in Apex that is secure by default, which is the opposite of the current state in which all code runs in system mode unless the developer takes steps to enforce user access rules.

During the pilot and early in the GA release, User Mode is explicitly specified for the DML or query operation being performed. In future platform releases, Apex will be secure by default, not requiring explicit specification to enforce User Mode security. When that time comes, the developer will be required to explicitly specify that they want their code to operate in system mode instead. Again, more secure applications without the developer needing to remember to be diligent about enforcing the rules. It just happens automatically — this is fantastic.

To sign up for the pilot today:
https://sfdc.co/user-mode-db-operations

Trailhead learning resources for DataWeave & User Mode Data Operations:
https://sforce.co/df21-dev-apex

New Unified CLI

In order to create a better developer experience across all clouds and features, Salesforce is creating a new unified SF CLI that is designed out of the gate to be cross cloud compatible. The new CLI is built on the oclif CLI framework, just as the previous SFDX CLI is allowing plugins for SFDX to be leveraged in the new CLI as well.

A few of the notable highlights include standardization of taxonomy with things such as:

  1. Spaces not colons
  2. Global table flags
  3. Improved help
  4. Interactive prompts on all commands and missing mandatory attributes
  5. Output consistency standards

Compatibility with Salesforce Functions will be provided on day 1 with Heroku coming soon thereafter. In order to ease the transition from SFDX to the SF CLI, both can be used simultaneously with day 1 interoperability and the new CLI will be included with the SFDX download. The new CLI is available as an NPM download today: https://sforce.co/cli-repo

If you’d like to learn which of the above technologies are ISV ready today, give us a shout.


Want to hear more about Dreamforce 2021? We’ve got you covered! Check out CodeScience Unfiltered: A Recap of This Year’s Dreamforce Event, where Brian Walsh, Sean Hogan, Mike Wolff and Doug Chaney cover the juiciest ISV takeaways from this year’s event, stories from past events, and even welcome a few surprise guests: Dan Darcy, Melanie Fellay, and Krishna Tatta!