developing enterprise - unofficialsf · this presentation may contain forward-looking statements...
TRANSCRIPT
Developing Enterprise Apps with Flow and Next Best ActionDreamforce 2019
November 22, 2019
Alex Edelstein – Sr. Dir. Product Manager, Automation & Decisioning
Forward-Looking Statement
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions prove incorrect, the results of salesforce.com, Inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, Inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our website.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. salesforce.com, Inc. assumes no obligation and does not intend to update these forward-looking statements.
Statement under the Private Securities Litigation Reform Act of 1995
Alex EdelsteinSr. Director of Product Management. Automation & DecisioningSalesforce
Unleash Productivity with Lightning Flow
Design with point-and-click buildersBuild complex workflows with visual elements and reusable building blocks
Automate across connected systemsBring disparate systems and data sources together in a seamless workflow
Embed visual workflows everywhereEnhance user experience and business agility with guided interactions
Build seamless interactions with automated workflows
+ Pre-built solutions in the AppExchange
Einstein Next Best ActionDeliver Optimal Recommendations at the Point of Maximum Impact
Unify Your Sources of InsightCombine business rules with powerful predictive models, using Salesforce and non-Salesforce data
Surface Actionable Intelligence Assist coworkers and customers with insights at the mosteffective time
Connect Recommendations to AutomationUse Lightning Flow’s powerful tools and productivity
Developing on Flow and Next Best Action allows for higher-level solutions with less work
Development on Flow
Salesforce Core Platform
Decisioning (NBA)
Flow
Traditional Salesforce Features
Flow-based Appdev
Embedded Decisioning Strategies
• Salesforce Clouds actively developing on Flow• Commerce• Marketing• Industries - Financial Services• Industries - Health Services• Industries - Consumer Products• Surveys
Development on Flow
Build once and customize everywhereEmpower Everyone to Automate Complex Processes
NO-CODE BUILDERS
PRO-CODE ACTIONS
Business IT
No Code
Admins IT Dev
Build Together
LOW-CODE INTEGRATIONS
Declarative Program
matic
• Turn code into reusable, portable building blocks• Push configuration deep into the organization• Growing libraries of prebuilt components and actions
How Flow and NBA Help You Build Enterprise Apps
• Turn code into reusable, portable building blocks• Push configuration deep into the organization• Growing libraries of prebuilt components and actions
How Flow and NBA Help You Build Enterprise Apps
Invocable Actions –The Building Block of The Building Blocks
An invocable action is a building block that you create from an Apex class or Javascript component
Invocable actions show up in an admin-friendly way in several parts of Salesforce:
Invocable Actions –Use in Four Different Salesforce Services
Invocable actions show up in an admin-friendly way in several parts of Salesforce:
Flows Next Best Action Strategies
Bots Process Builder
Case Study – Rich HTML Email
Problem: The business units want to send modern emails as part of automations triggered by record changes.IT reports that there’s good news and bad news.
Invocable Actions
The good news: Flow lets you send emails easily.
The bad news: Flow’s built-in email action is weak on features:• Plain Text only• No Attachments,• Templates• No access to Organization-Wide Addresses• Etc…
Case Study – Rich HTML Email When you look at the Apex functions available to you, you see that there’s a pretty powerful set of built-in email sending services you can tap into
Invocable Actions
Attachments!
Rich Text!
Templates!
OrgWideEmailAddressIds!
Case Study – Rich HTML Email
It won’t take you long to write an Apex class that sends some truly fine-looking emails.
But in order to get that to your Admins in a sustainable way, you have issues:
● If they want any degree of customization at all, you’ll need to provide a UI.
● Now you have a full Email App to support
Invocable Actions
You have given them a fish. You have not taught them to fish.
Demo: Send Rich HTML Email
Case Study – Rich HTML EmailSuppose you distributed your Send HTML Email apex code as an invocable action.
Invocable Actions
It would show up in builder tools like this:
This is all the work being done by Someone Who Is Not Youto assemble the inputs
Case Study – Rich HTML EmailInvocable Actions provide a granular way to package your work for others to use
Invocable Actions
You can revise and version your code without breaking existing flow
You can deploy the entire flow as a template
You can add telemetry to your code and track utilization
Case Study – Rich HTML EmailIt takes very little effort to ‘blockify’ your code
Invocable Actions
Add the @invocableMethod annotation to one method in your class
Define the inputs that you want to expose to consumers with the @invocableVariable annotation and this Request inner class pattern:
Likewise with the outputs:
Case Study – Rich HTML EmailThe Invocable Action interface expects data to be packed in a List structure
Invocable Actions
In this case, I know I only will have one item in the List, so I just extract it directly without iterating:
Case Study – Rich HTML Email
Next comes the core of your code:
Invocable Actions
Case Study – Rich HTML Email - 9
Your core activity usually culminates in an Apex method call or callout
Invocable Actions
Case Study – Rich HTML Email
Finally, populate your return values and pack them into a List
Invocable Actions
Benefits of Building Code Blocks
Encourage portability and reusability by enforcing a strict input and output schema that you define
Plays nice in the open-source world, with an increasing number of installable invocable actions
Encourages good habits, including modularity, process-centric application design, pipelining, and more
Invocable Actions
Public directory of installable actions at http://unofficialsf.com
Learn More
Learn more about invocable actions at:
https://unofficialsf.com/developing-flow-actions/
Invocable Actions
Push Control Deep Into The OrganizationForce-Multiply Your Code
Code Building Blocks in
No-Code Apps
Record-based Configuration
• Turn code into reusable, portable building blocks• Push configuration deep into the organization• Growing libraries of prebuilt components and actions
How Flow and NBA Help You Build Enterprise Apps
How do you focus salespeople on the right priorities?
Case Study –Good Morning, Salesperson
Problem: Salespeople have an infinite number of things they can spend their time on.
1) How can you serve them the highest-value, highest-priority tasks?
2) How can you give sales team leaders the ability to easily change priorities?
Invocable Actions
Demo – Good Morning, Salesperson
Case Study –Good Morning, Salesperson - 3Available Sales Tactics
Invocable Actions
Name Description
Opportunity Value: Prioritize opportunities with greater value
Opportunity Sector Prioritize opportunities based on a specified value for the custom field Opportunity.Sector. For example you might prioritize "Enterprise" opportunities or "Foreign" opportunities.
Opportunity Einstein Score Prioritize opportunities based on an Einstein score value.
Opportunity Time Before Close Date
Prioritize the opportunities based on the amount of time remaining until close date.
Case Study –Good Morning, SalespersonEnable Sales Managers to specify tactical priorities with a Flow
Invocable Actions
Good Morning, SalespersonInvocable
Actions
TeamSalesTacticalPlan Record
Maintained by Sales Team Leader
“Display Recommendations” Flow on User Page
Invocable Action “Execute NBA Strategy”
NBAEngine
Display Recommendations LWC
Good Morning, SalespersonInvocable
Actions
TeamSalesTacticalPlan Record
Maintained by Sales Team Leader
“Display Recommendations” Flow on User Page
Invocable Action “Execute NBA Strategy”
NBAEngine
Display Recommendations LWC
Case Study –Good Morning, SalespersonNext Best Action handles the recommendation generation
Invocable Actions
Looser Coupling via Apex-Defined Data Types
Case Study –Good Morning, Salesperson The Display and Query functionality is split up into reusable parts
Invocable Actions
Hard-Coupled Decoupled
Case Study –Good Morning, Salesperson The Display and Query functionality is split up into reusable parts
Invocable Actions
Hard-Coupled
Decoupled
How does the data pass from the Recommendation call to the custom lightning web component?
Good Morning, SalespersonInvocable
Actions
TeamSalesTacticalPlan Record
Maintained by Sales Team Leader “Display Recommendations” Flow on User Page
Invocable Action “Execute NBA Strategy”
NBAEngine
Display Recommendations LWC
Case Study –Good Morning, Salesperson - 2
Problem:
Sales Leadership wants the following customizations to the Out-of-the-box Next Best Action Experience
1) Show More recommendations in less space
2) Slide up new recommendations to replace consumed recommendations
…
Invocable Actions
The Data Coming Back Via API Is Complex...Invocable
Actions
Invocable Action “Execute NBA Strategy”
Apex-Defined Type Support provides crucial connectability
The API call to the NBA Engine returns a rich, nested object
….But the LWC Interface is Simple
LWC’s In Flow Screens Can Intake and Output Rich Objects
Invocable Actions
Flow provides the platform substrate that allows complex objects to be passed between LWC components and Apex Actions
Rich Apex Data is carried from the output of an invocable action to the input of an LWC
Classes with @auraEnabled attributes show up in Flow BuilderAccessing Apex Data in Flow
Invocable Actions
The template classes let you choose which properties to expose to Flow, via @auraEnabled annotations
Rich Apex Data is carried from the output of an invocable action to the input of an LWC
To expose ‘standard’ Apex data structures directly in Flow, create matching ‘template classes’
Accessing Apex Data in FlowInvocable
Actions
The template classes let you choose which properties to expose to Flow, via @auraEnabled annotations
Rich Data Isn’t Just AvailableAt Salesforce, Though…
A Rich Object from the Docusign Cloud
The Web is Full of Rich Web Objects
A Rich Object from the Quickbooks Cloud
This One-time Process Creates a Pattern That Flow Can Use To Automatically Convert Web Objects to Flow Resources
One-Time Setup:Create a template in Apex that matches the incoming JSON
1) Start with the JSON
2) Run it through a converter like JSON2Apex
3) Take the resulting Apex
code...
4) ...and add the classes to your org.
Add @auraEnabled to publish the properties to Flow and Lightning
Components.
Use Case: I want to get rich web product data from my enterprise back end and turn it into products in Salesforce
Output: 3 Salesforce records, each with a unique SKU and picture URL
Input: A rich web object sourced through Mulesoft from an enterprise database
Demonstration
1. GET Rich Web Data
2. Extract Nested Lists
3. Loop over Lists to Process Them
4. Combine with Salesforce data or create new records
Learn More About Apex Data in Flow and NBAInvocable
Actions
https://unofficialsf.com/the-salesforce-automation-and-decisioning-wiki/apex-data/
Actions Roadmap
New features to enable the building of a new generation of actions:
● Spring ‘20○ Custom Property Editors for Actions (Pilot)○ Support for Generic Sobject Variables ○ Custom Categories
● Summer ‘20○ Custom Icons○ Custom Property Editors for Actions (GA)
● 2020○ Full support for Open API spec ingestion
Invocable Actions Roadmap
Example: Send HTML Email
Custom Property Editors forFlow Actions
1) Make an LWC that shows your configuration UI
2) Link the LWC to your Invocable Action with an annotation
3) Receive Flow Context as design time so you can provide merge field picklists
4) Fire events to inform Flow Builder so it can save your config values into the Flow metadata
PILOT Spring ‘20
Enable processing actions that work with all SObject CollectionsSubstantially reduce Looping, reducing impact on limits
Examples that are being built:● FilterCollection● SortCollection● MapCollection● GetFirst● CountCollection● CopyCollection
Generic SObject Support with Flow Actions
● JoinCollections● DedupeCollection● FindRecordsInCollection● RemoveRecordsFromCollection● AddOrInsertRecord
Generic SObject Support with Flow Actions
As a first step, the flow creator chooses the SObject Type for each available SObject attribute.
That ‘locks it in’, and Flow Builder can take it from there.
Roadmap for 2020
Custom Property Editors for LWC Screen Components
Support for Generic Sobject Variables (“Dynamic Type Mapping”) for LWC Screen Components
Sections and Columns
2020 Roadmap - ScreensComing
2020
Enable rich, multi-column positioningAdvanced Flow Screen Layout
Sections and ColumnsMix images, fields, and components to deliver granular UI layout options that don’t require coding
Component Preview ModeSee component output while in the Screen Builder
Screen Builder – Full Screen Mode
Coming 2020
Bringing Process Builder features to Flow BuilderTriggers and Streamlined UI in Flow Builder
Trigger on Record Changes and Platform EventsEliminates the need for Process Builder or Apex Triggers to start a Flow
Easier Canvas with Auto LayoutNo more need to connect elements
Coming 2020
Build richer, more powerful, easy-to-configure Invocable ActionsPowerful Action Developer Tools
Add a custom configuration UIPair an action with a custom Lightning Web Component that serves up configuration UI
Custom CategoriesOrganize with categories
Generic Objects SupportCreate Actions that work declaratively with any input collection of records
Detect issues and opportunities quicklyFlow Engine Analytics and Dev Tools
Flow MetricsAutomated logging of selected Flow activity
Improved DebuggingNew tools for profile simulation, input data selection and display
Coming 2020
Flow Hero Shout Outs
Eric Smith
Relentless improvement to public components, including the highly regarded ‘Community’ Lookup FSC and a wide range of Lightning Page Experience Components
UnofficialSF Volunteers
Helping to curate and improve content:
● Tamar Erlich● Lisa Malmanager● Allison Letts● Makario Aruliah● Gabriel McGinn● Jack Van Dijk● Jim House
Automation Hour
● David Litton,
● Jennifer Lee
● Rakesh Gupta
New Flow Community Resource - The Flow Wiki
● Goal: Topic pages that serve as a single point of entry for information about that topic, curated by the Flow community
● Part of UnofficialSF● Anyone can submit an edit● Please Contribute!
○ Links to Existing Blog Posts and Documentation
○ Extending the Wiki with new Articles○ Organizing and improving the
presentation of existing pages○ You can’t do any harm: proposed
changes get reviewed
Check out these resources and earn badges on Trailhead Learn more about Flow
Build a Simple Flow
Lightning Flow
Flow Basics
Flow Builder
Screen Flow Distribution
Get Hands-On at Flow Workshops
Platform Meadow MW Floor 2
Chat with Flow Experts
Platform Park Demos
MW Floor 1
Thank You!