practical headless flow examples

30
Practical Headless Flow Examples Keith Yelnick IT Manager at Interfaith Youth Core [email protected] @KeithYelnick

Upload: salesforcecom

Post on 17-Jul-2015

186 views

Category:

Technology


1 download

TRANSCRIPT

Practical Headless Flow Examples

Keith YelnickIT Manager at Interfaith Youth [email protected]@KeithYelnick

Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties

materialize or if any of the assumptions proves 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 Web site.

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.

Safe Harbor

Grand Valley State University Elizabethtown College Crazy Staff

Interfaith Youth Core

• Started with Flows launched from Workflows

• Moved to Trigger Ready / Autolaunched Flows & Process Builder

Headless Flows?A rose by any other name…

• Get in there! It’s really not that hard!

• Yes, there are other ways….

• Apex / VisualForce

• LOTS of Workflows

• Need more explanation?

[email protected]

• @KeithYelnick

• Come talk to me!

• Other Great Resources

• Everything from Brian Kwong (Salesforce Wizard)

• Brent Downey (AdminHero.com)

• Salesforce Documentation!

Practical Examples?

Auto Follow New Users in Chatter… or how I learned to stop worrying and love Process Builder and Flows

Process builder will initiate our flow

• Set Object As User

• Watching only for new user records, not modifications

• Check that User is a Standard User

• Run our Trigger Ready (Headless) Flow

Flow will handle following new user

• Get all SysAdmin UserIDs

• Create EntitySubscription records to subscribe SysAdmins to New User

Auto Follow New Users in Chatter

Create Variable for UserIDStarting with the flow

• Variable will hold UserID Received from Process Builder

• Good variable naming conventions save lives!

• Make sure it’s Input Only our Input/Output

• Looking Up “User” Object

• Making sure they’re Active

• ProfileID is for System Administrators

• UsersID is a SObject Collection Variable of type “User”

• I prefer UsersID over UserIDs since its actually the users that we have multiple of, and each has only one ID, but YMMV

Fast LookupMuch better than Slow Lookup

• Loop through our SObject Collection

• Save value to UserID (SObject Variable)

Loop Through UsersID

• EntitySubscription Object stores “Follows”

• Storing values for ParentID (Object being followed) and SubscriberID (User doing the following)

• FollowerDetail is SObject Variable

Set Variables for EntitySubscription

• Add each of our SObject Variables (FollowerDetail) into an SObject Collection (FollowCollection)

Assign Into EntitySubscrition SObject Collection

• Use our FollowCollection to Fast Create our EntitySubscription

Fast Create our EntitySubscription

• Fast Lookup to get all SystemAdmins

• Loop Through our System Admins

• Set “Follower IDs” from the System Admins

• Assign these IDs into a single collection

• Take our collection to Fast Create EntitySubscriptions

• Looping through a SObject Collection with Fast Create helps to “Bulkify” our Flow

• SAVE YOUR FLOW AS AN AUTOLAUNCHED FLOW!

Final Product

• Select our Object Type (user)!

• We only care about object creation

• I’ll be honest, the process builder is always the easy part….

Process Time!

• We define our criteria (Standard Users Only)

• This is a good time to create more complex Flows for different types of users that different profiles will want to subscribe to

• A lot of logic that you can do in Process Builder can be done in Flow (and vice-versa). NO RIGHT ANSWER (sometimes).

Define CriteriaSubtitle placeholder

• Immediate vs Scheduled Actions

Schedule

• Only flows that are saved as the “Autolaunched” type will be visible in the Flow selection dropdown

• Only variables that can accept Input will be visible in the Flow Variable section

• This is where we will specify our new user’s ID

Actions

Process is ready for Activation and Testing

Entire Process

Flow could be expanded

• Chatter Based Onboarding Tasks

• Add user to groups based on location, title, etc….

• Set new user to follow their manager

• Send chatter notification to staff at same location informing them about the new user

• Non-Chatter Based Tasks

• Create onboarding tasks and assign to the new user

Process could be expanded

• Launch additional Flows based on user’s location, title, etc…

Additional Options

Handling 3rd Party Forms/Data

Business Use Case: Data will be collected from a website using a FormAssembly based form, which will integrate with Salesforce via its “Connector” feature. FormAssembly’s Contact matching capabilities will not succeed frequently enough. Form submissions must be matched with existing contacts in real time when possible to allow reporting on demographic makeup. Contacts affiliated with a school must be placed within their school’s account (which is asked for in our form)

• FormAssembly data will populate custom object (Signups)

• Process Builder will trigger an Autolaunched Flow when Signup records are created or modified

• Visual Flow will attempt to match based on our defined criteria and populate data within contact records. Alternatively the Flow will create new contacts where there is sufficient data, but no match. All other records will be manually corrected and the flow will be run again

3rd Party Data

• Similar forms may ask about company size, geography, or job title to help qualify or route leads

Our Form

• Data from FormAssembly will populate object without any modification or logic

• Flow will be triggered by Process Builder whenever the “Needs Correction” field is unchecked

Custom Object

Complete Flow

Record Retrieval and Initial Segmenting

Email Match

• Save returned ContactID from Lookup to a

variable and check if it’s null

More Matching Logic

2-Column LayoutSubtitle placeholder

Thank you