Flow

Scheduled Flows: Sometimes Later Is Better

You go through life, and it sometimes feels like drinking from a firehose. This is also through for systems. The current work can overwhelm the available resources. Salesforce Scheduled (a.k.a. Schedule-Triggered) flows are an excellent way to defer some of the work and give your system resources a breather. I discussed this solution this past weekend in Minneapolis at Midwest Dreamin’ but needed more time to go into a step-by-step tutorial. Let me describe the use case and the solution in detail here.

Use case:

You need to track key performance indicators for your operation daily and build a history. Out-of-the-box reporting functionality and report snapshots are not powerful enough for you. In addition, you want to perform sophisticated mathematical calculations and expand your solution in the future to include details from related object records as well. You want to leverage something other than rollups as the value of a rollup field changes dynamically. In conclusion, you decided to track these KPIs for cases daily:

  • Count of Created: Created in the previous 24 hours.
  • Count of Modified: Modified in the previous 24 hours.
  • Count of Open: Count of open cases at midnight.
  • Count of Closed on Date: Closed in the previous 24 hours
  • Max Wait Open in Hrs: Max Wait on the oldest open case at midnight.
  • Average Wait Open in Hrs: Average Wait of all open cases at midnight.

The solution has two essential components:

1) A custom object record that tracks the results

2) A schedule-triggered flow that creates a single record every night

Let me show you:
1) See the screenshot below to review all the Daily Summary Record custom object fields.

You will create this custom object to house the resulting values.

2) Flow solution: The flow solution is a very efficient one. Many don’t know that selecting an object is optional in schedule-triggered flow. For this use case, you will use a flow without an object that gets all the case records in the org. If you don’t have more than 50K cases, you won’t have a problem with governor limits. If you know you will get more than 50K cases, we will have to split this flow into several flows and/or perform multiple targeted gets. You will leverage collection filters and need only one single get.


See the screenshot below to review all the elements in this flow (click to see a larger image).


You will create the elements as follows:

  • Start element: Scheduled daily at midnight: No object and no criteria.
  • Get the previous daily summary record: This is only necessary to get the created date to filter cases processed since the last run.
  • Get all cases in the Org by ascending Created Date order.
  • Collection filter 1: Filter for created cases since the last run.
  • Collection filter 2: Filter for modified cases since the last run.
  • Collection filter 3: Filter for closed cases since the last run.
  • Assignment 1: Assign the counts of the collections to variables.
  • Filter Open Cases
  • Loop Open Cases
  • Assignment 2: Add 1 to the counter, calculate case wait, and add to the total wait variable
  • If this is the first iteration, capture the current wait as the max wait. This works because our get is sorted (see above).
  • Create one single Daily Summary Record.

Now you can accumulate this information in your Org as long as you want for reporting and audit purposes. This is a very elan record that won’t consume significant storage.


Enjoy

Standard
Newsletter

B2B Solution Architect: Commerce and Integrations

Salesforce B2B Solution Architect

I took and passed the Salesforce B2B Solution Architect exam last week. 🎉

What is the topic of this certification exam and curriculum, you might ask.

Salesforce B2B Commerce is a cloud-based platform that enables businesses to streamline their sales and operations processes while providing a seamless buying experience for their customers. The platform offers a range of features and functionality designed to help businesses of all sizes manage their sales operations effectively and efficiently.

One of the key features of Salesforce B2B Commerce is its ability to provide a personalized buying experience for customers. The platform allows businesses to create custom catalogs, pricing, and promotions for their customers, based on their unique needs and preferences. This personalized approach helps build stronger customer relationships and increase customer loyalty.

A Salesforce B2B Commerce solution also integrates a range of Salesforce products (a multi-cloud setup): The products that often come to play are:

  • Sales Cloud
  • Service Cloud
  • Revenue Cloud (CPQ and Billing)
  • Digital Experience
  • B2B Commerce Cloud
  • Marketing Cloud
  • Tableau
  • Einstein Capabilities
  • CPQ and B2B Commerce Connector
  • External System Integrations

These integrations enable businesses to create a seamless customer journey across multiple touchpoints, from initial lead generation to final purchase.

The exam was a fun exam that mainly consisted of scenario-based questions. The passing score is 58%, but don’t let that number fool you. Most of the questions are looking for a selection of 2 correct answers out of 4 choices. This makes passing more difficult compared to the classic one-choice out of possible alternatives method.

This post was originally made to LinkedIn August 1st, 2023.

Read the previous post: Datatable Component – Salesforce Screen Flow

Read the popular post: One Big Record-Triggered Flow or Multiple?

Standard
Newsletter

Datatable Component – Salesforce Screen Flow

The Salesforce Flow Datatable component allows users to easily display and select data in a table format, making it ideal for various flow builds. The Salesforce Flow Datatable component enables users to sort, filter, and search through data.

There are mainly two screen flow areas I use the Datatable component for:

1) Related record operations: I need the user to select single or multiple records related to a record the flow is working on—for example, contacts on the account or cases on the contact.

2) Menu choice options: When I branch my screen flow logic, I need to give the user a choice that involves showing data in multiple columns. For example, add a product to the Opportunity.

In the latest release, the Datatable component received a few nice updates. Now we can add a search box on top of the Datatable. And a few limits have been updated: The component can show up to 1,500 records and supports a selection of up to 200 rows.

There are excellent functionalities I like to point out:

  • You can set up your data table to accept single-choice or multiple choices. You can also use this component to display data when you set it up as View Only. The single choice is in the output variable First Selected Row, and you don’t have to loop to get to the individual column/field values. One UI limitation is that the user cannot deselect after selecting a row in the Datatable.
  • You can rename the column header labels. Many fields have field names that don’t make great headers. Change them. You can use emojis in header labels as well.
  • You can set columns to Wrap the overflowing Text or Clip it.
  • You cannot allow the user to edit the values in the Datatable. For that, you still need the UnofficialSF Datatable component. If you are okay with having the user edit each record separately on a different screen, you can cycle through detail screens after the selection.

This component is an excellent addition to the Flow Builder.

If you want to learn more about the Salesforce Flow Datatable component, check out this Salesforce page.

This post was originally made to LinkedIn on July 3rd, 2023.

Read the previous post: HTTP Callout and Screen Flows

Read the popular post: One Big Record-Triggered Flow or Multiple?

Standard
Newsletter

What Can Flow-Builders Do With Pen and Paper?

I attended Southeast Dreamin’ last week. This was my fourth event in Atlanta. I cannot be sure; the dates are blurry at this point.

I presented last year and delivered a hands-on training session this year. I was scheduled to give a hands-on training long ago, but Southeast Dreamin’ got canceled that year due to the COVID-19 pandemic.

I have been a fan of the event for a long time. The hands-on training sessions make this event very unique. There are things you cannot do in a 20 min or a 40 min session. Sometimes you need 1.5 – 2 hours to teach a topic in a certain way.

I have been trying to get a session approved that does not involve the participants looking at their notebook screens the whole time. I submitted a session proposal on Diagraming/Mapping last year, but it was not approved. I delivered a different version of that session at Florida Dreamin’: It could not be very interactive due to its limited duration (40 minutes).

Before this year, Southeast Dreamin’ was held at another hotel. This year it was moved to the Georgia Tech Conference Center and Hotel. I liked the location a lot. The hotel was good, and the area was pleasant for walking in. The expo room was suboptimal, but I will leave that to the sponsors to evaluate.

Architect Flow Solutions Session

I delivered a session titled Architect Flow Solutions. I had about 25 participants. I divided them into four subgroups. I brought large Post-its, flip-chart paper, and markers. I gave them scenarios and 20 minutes to talk with their team to design their solutions. They had approx. 3 minutes to present to the other groups. I prepared four scenarios but did not expect us to go through all of them. We completed two scenarios. It was a very interactive session. We debated the advantages and disadvantages of each solution without passing judgment.

Group 2 Solutioning

I truly enjoyed delivering this session. The response was overwhelmingly positive. Participants said they wanted more; they wanted longer.

Group 3 Diagramming

I am torn on whether I should attempt this on Zoom with breakout rooms because we need to be in one room to do this best. What do you think?

Group 4 Presenting

Result

I prepared a one-minute-long YouTube Short with the little clips I recorded in the session. I showed it to my daughter, and she said, “Where is the punchline?” Anyway, here it is if you want to see it:

https://youtube.com/shorts/w9FFiKwEJt8

Next, I have Midwest Dreamin’ coming in August: I will deliver a session titled Sometimes Later is Better; Async and Scheduled Flows.

I thank all Dreamin’ organizers, sponsors, speakers, volunteers, and participants.

This post was originally made to LinkedIn on July 6th, 2023.

Read the previous post: How to Build a Screen Flow to Complete Virtual Standup on Slack

Standard
Newsletter

How to Build a Screen Flow to Complete Virtual Standup on Slack

The other day I wondered whether I could use screen flow in Slack functionality to record virtual standup updates.

Many of us are organizing our agile development work using our Salesforce Orgs.

I built a demo to do just that.

Demo Idea

The idea is to send a Salesforce screen flow to all relevant users every day at the same time. Upon launch, the screen flow will ask the user a few simple questions and record the update for the day in a custom object record called standup. Then when a standup record is created, another flow picks up the process and sends that update to a dedicated standup channel in Slack. You can see a roll of updates for the standup records in that channel.

Here is how it is done:

  1. Prepare your Org for the Slack connection. Give the necessary approval both on the Salesforce side and Slack side. Create your custom object(s).
Standup Custom Object Record
  • Build a screen flow in Salesforce and mark it under advanced settings available for Slack. This will create a custom Slack action for the screen flow.
Salesforce Screen Flow
  • Create a schedule-triggered flow to run every day at the same time and call the custom Slack action.
Schedule-Triggered Flow Calling the Custom Slack Action
The Notification the Slack User Receives Every Day
Screen Flow Displayed in Slack
  • Build a record-triggered flow to trigger on create and post the update to the dedicated Slack channel.

See my additional screenshots below.

Additional Screenshots

Create Records Element for the Standup Custom Record
Slack Message Action Posting the Standup to the Dedicated Slack Channel
Custom Slack Action Calling the Screen Flow

This post was originally made to LinkedIn on June 28th, 2023.

Read the previous post: One Big Record-Triggered Flow or Multiple?

Read the popular post: Slack and Flows – Salesforce Flow Tips Newsletter

Standard
Flow

One Big Record-Triggered Flow or Multiple?

I will revisit one of the most popular debates on flow: Do we create one giant record-triggered flow or multiple flows? And should we use subflows?

Here is a little disclaimer: It depends. I’m not too fond of rigid rules, and I am not here claiming you are doing something wrong if you do things differently.

Now that I got that off my chest, I do have an opinion on the topic:

Asking the right question is very important. Is “How many flows should we build per object?” a good question? Generally, I don’t think so. We should ask ourselves: How can I build automation that does not waste system resources, is easily readable, and is easy to maintain?

My priority when I build my flows is that my build should not run unnecessary automation. My most important objective is not to trigger automation when it does not need to run.

In a complex Org, you quickly realize that yields multiple flows per object. When you look at the three tasks that can be performed in one big record-triggered flow, they rarely need to run all in the same scenario.

Now that I told you I heavily use my start element criteria, do I use the formula entry criteria or the line editor with AND/OR operators?

Here is my experience: I often see record-type usage in fairly complex Orgs. I’m not particularly eager to hardcode RecordType Ids in my start element criteria. I prefer to use DeveloperName or Name over Id. And these are only available in the formula editor. So I often end up using the formula entry criteria.

Some of these formulas get very big. But I will give you a simple example:

AND

({!$Record.RecordType.DeveloperName}=”Sales”,

NOT(ISBLANK({!$Record.ContactId})),

   OR(

ISPICKVAL({!$Record.Status},”Scheduled”),

ISPICKVAL({!$Record.Status},”Confirmed”)

      )

    )

 Now let’s get to the other popular topic: Subflows. I recently inherited work that another Salesforce partner did. They did a good job but used subflows in many of their flows. I found the outcome very hard to read and understand. The back-and-forth review left me confused and tired.

I only use subflows if I know I will reuse the logic in another flow.

This post was originally made to LinkedIn on June 19th, 2023.

Read the previous post: Emojis ❤️ and Dreamin’ Events 👌

Standard
Flow, Newsletter

Emojis ❤️ and Dreamin’ Events 👌

Last week I posted about the exciting HTTP Callout flow feature here. This functionality is super cool, but not everybody will need it.

I will discuss something simpler that everybody can use this week: Emojis in Salesforce. 👍

I learned about all the places I can use emojis when I attended the Florida Dreamin’ presentation in 2021 by Jonathan Linn. He delivered a presentation on Lightning configuration and showed that you could paste emojis virtually everywhere that accept text input (string) in Salesforce: Tab labels, quick action button labels, and formulas. I don’t think he talked about using emojis in flows, but a lightbulb went off with me when I saw his presentation. 💡

Here is a slide from his presentation. It still lives rent-free on Slack. 🤳

About a week ago, I received a request from Joy Fuller in the Salesforce Break Flow Support Slack Workspace:

“I would like to display a red arrow when a field value is decreased and a green arrow if it is increased. I tried using images in formula fields, but I’m trying to avoid creating two new separate fields. Is there a more efficient way to do this❔”

Leveraging the video screen-share capabilities of Slack, I recorded a video response. 🎥

I share a lot of content. It is impossible to tell what will go viral. It almost feels like spontaneous, simple content wins over polished and planned content. 📜

Here is the YouTube video of the short demo (under 2 min.).And here is the LinkedIn post that went viral. 🎉

The moral of the story is: Go to Dreamin’ events, folks. You will learn practical tips that you can easily implement to make your users’ lives easier. 🥳

This post was originally made to LinkedIn on June 13th, 2023.

Read the previous post: Shorten URLs Using the HTTP Callout POST Method

Standard
Newsletter

Shorten URLs Using the HTTP Callout POST Method

HTTP Callout in Spring 23 got many people excited. The blog post and the video by Josh Dayment and I drew quite some attention. We heard one criticism for this functionality: the solution was incomplete without the POST method.

With Summer 23, the Salesforce Flow Product Team not only moves the GET method to GA, but also gives us the POST method in Beta.

The use case we picked for this demo is based on a real-life client requirement. The client wants to shorten the long URL links before they send them to customers via email or text. Read on for a link to the three-part blog on this topic.

First, let’s dive into the background information: Until recently, API access was reserved for developers. Flow automation did not deal with APIs much. 👨 💻

But what does this functionality do? 🚨

This feature creates an invocable action powered by External Services to connect your flow to an HTTP-based API without using code.

What is an API? 🔁 

API (Application Programming Interface) is a program mediator that allows two applications to exchange data and complies with HTTP and REST standards. API refers to standards and documentation that describe how to create or use such a connection or interface.

What is the GET method? ⬅️

The GET request method is used to fetch data from the server. Example: Send Postal/ZIP-code to receive City in the response. Another example: Send phone number, receive the telecom carrier.

What is the POST method? ➡️

The HTTP POST request method sends data to the server. The HTTP POST method creates or updates a resource on the server. POST is one of the most widely used methods of the HTTP protocol. The HTTP POST method is used to submit web forms, upload files and images to the server.

Read the three-part blog on this topic here. Also, check out the GET blog post while you are on the site.

This post was originally made to LinkedIn on June 5th, 2023.

Read the previous post: What I Learned From The Jobs I Held Growing Up

Read the popular post: HTTP Callout in Salesforce Spring 23 – GET

Standard
Newsletter

Getting Things Done: Productivity Recommendations

I recently asked my Twitter followers what they want to learn from me. What are they interested in finding out about how I operate? They told me they wanted to know how I get things done. How do I do all the things I do? ☑️

In other words, they want a walkthrough of how EnginOS operates. 🖥️

I thought about that. 🤔

I decided to give you recommendations based on my productivity techniques. Here we go ➡️

  1. You cannot let others fill your calendar 🗓️: In today’s world, everybody sends multiple meeting invites weekly. And the recipients are expected to accept the invites with little questioning. Worse, people see each other’s calendars and take the free spots they see. This results in a situation where your calendar is dictated and determined by everybody else than you. If you set goals for yourself, how do you expect to achieve your goals on somebody else’s schedule? You will never achieve your goals. Determine your schedule yourself.
  2. You cannot let others determine your tasks ☑: This weird phenomenon exists in the business world and productivity applications. Others can create a task for you to finish. They can even assign a deadline and priority sometimes. However, if you want to reach the objectives of your business, your tasks will have to support the grander purpose. Only you can determine what tasks must be performed to achieve that objective.
  3. Your inbox influences your thinking. You cannot let others determine your thinking 📩: You should keep the communication channels open. Listening to all kinds of communication, including constructive criticism, would be best. However, you must keep useless or destructive communication from filling your incoming channels. You’ll need to actively encourage/discourage, like/block, and prune incoming communication. If you don’t, you will not dedicate enough time to think about the agendas that matter.

This post was originally made to LinkedIn on March 29th, 2023.

Read the previous post: TrailblazerDX 2023 Highlights

Standard
Newsletter

TrailblazerDX 2023 Highlights

TrailblazerDX 2023 is over, but the announcements still draw some debate. The highlight of the announcements was EinSteinGPT.

The keynote included a comprehensive demo of the use of EinsteinGPT when researching a lead, preparing communications for an opportunity, and writing code and test classes. The demo also showed the use of EinsteinGPT in Slack. In addition, Salesforce announced a partnership with OpenAI to achieve this functionality.

Exciting aspects of the demo:

  • The demo included recent news and information about the prospect/client, but we know ChatGPT does not yet process and deliver recent information.
  • The demo included generative AI data as well as Salesforce CRM data. We have yet to learn how this is achieved.

If you are excited about this premise, you must be patient because a pilot is scheduled for Winter 24, not earlier.

A ChatGPT application for Slack was also announced, but there is a waitlist for customers to start using this application.

You can watch the keynote recording on Salesforce+.

Finally, a new mascot was added to Astro and friends: Flo. Flo will be the character for flow and automation in Salesforce. I love what the branding and community teams have done with this character. See Flo shown in the image above.

This post was originally made to LinkedIn on March 15th, 2023.

Read the previous post: What is Flow, Really? A Feature?

Standard