You are here:
Get Started Automating a Business Task with a Flow
Plan your automation carefully to ensure a successful solution. Whether building traditional flows or using AI agents, define clear goals and specific instructions before you start. Identify business challenges and their root causes to determine which automation approach best solves your process issues.
Required Editions
| View supported editions. |
To help organize your thoughts and learn specific instructions that you can use to identify whether an automation can solve your challenge, and then translate it into a flow, follow these steps.
Identify Your Business Challenge
Determine the problem that you’re trying to solve with automation. Start by considering these questions.
- Do employees:
- Get frustrated or blocked in your business processes?
- Forget or lack time to complete important tasks?
- Spend too much time on data entry and not enough time with your customers?
- Do you have incorrect data in your Salesforce org that’s causing problems?
- Have you lost track of what stage your customers are in?
- Do you have data in legacy systems or desktop applications that don't have APIs?
- Do your employees manually transfer data between external applications and Salesforce?
- Are there web-based processes that require manual data entry or form completion?
- Do you have important data trapped in documents (PDFs, images, forms) that requires manual extraction?
Find Your Solution with Flow Builder
After you determine that you can solve your challenge with automation, it’s time to see if you can find a solution with Flow Builder. Review these tasks that a flow can perform to see if one can help solve your business challenge.
Flows can automate these tasks.
| Task | For example, you want to: |
|---|---|
| Work with records. |
|
| Communicate with, collect input from, or notify. |
|
| Submit a record for approval. | Require that managers approve discounts. |
| Run another flow in the context of the current flow. | Run another flow that creates a contact within your account-creation flow. |
| Access external systems and data with or without an API. | Connect to external systems with no-code connectivity and then take action based on external system data changes. For example, trigger an automation in Salesforce when a Jira record changes. Or, update an external system like NetSuite directly from Salesforce. |
| Call a custom invocable action. | Execute a custom Apex method that uses the InvocableMethod annotation. You decide what the action does. |
| Send outbound messages. | Initiate the reimbursement process for an approved expense report by sending a message to an external HR system. |
| Connect to legacy systems without APIs. | Extract customer data from a desktop application and create Salesforce records. |
| Extract data from documents. | Automatically extract information from PDFs, images, and forms to create or update records. |
Design the Solution
If your business challenge can be solved with a flow, it’s time to pinpoint a solution. Identify the tasks in your Salesforce org that correspond to your business challenge.
- If people forget to complete a task, would a reminder help?
- If your employees are too busy to keep up with updating and creating records, are there other records that contain that information? Can you find a way to make it easier to quickly update or create a record? For example, add a screen flow to a record page to collect the minimum information needed to create a record?
- If you have too much data entry and too many errors, can you use an online form to collect information? If people enter in their own information, it’s more likely to be correct. Also, you can design your form to add guardrails on how people enter information.
- If you’re losing track of what stage your customers are in, would it help to send reminders or update fields on the customer record when something happens?
- Do you need to connect to external systems?
Decide Which Automation Features to Use
To connect to external systems, consider these options in this order:
- Use an available third-party connector.
- To communicate with systems that don’t have a prebuilt connector but do have an API, build your connection in Setup and create an HTTP callout. Or for a simple connection using an HTTP protocol, use the HTTP Callout action.
- For systems without an API, use MuleSoft RPA to interact with desktop or web applications via the graphical user interface.
Decide When the Flow Runs
Now that you know your challenges and their solutions, it’s time to think like a robot. Automations must be told when to start running. This is called a trigger. Each type of automation is triggered in a different way. For example, a record-triggered flow can start when a record is created, updated, or deleted. Think of what step in your business process has the challenge that you identified. Frequently, that’s when to start an automation.
- If people forget to complete a task or don’t have time, what happens right before they’re supposed to complete the task? For example, if you want them to update a record after a meeting, the trigger is the end of the meeting.
- If you’re using an online form, the trigger is when the form is submitted.
- If you're creating a record by using fields from an existing record, the trigger can be when the existing record is updated.
| If you want something to happen: | Use The Trigger: | Using this flow type: |
|---|---|---|
| When a new case is created. | When a record is created. | Record-Triggered |
| When a lead’s status field is changed. | When a record is updated. | Record-Triggered |
| When a record is created or updated. | When an account is created or the account priority field is changed. | Record-Triggered |
| When a record is deleted. | When a contact is deleted. | Record-Triggered |
| A week after a quote is created. | After a certain amount of time. | Record-Triggered. Note: Add a scheduled path |
| Every Saturday at midnight. | At a specified time and frequency. | Schedule-Triggered |
| When a customer enters contact information into a flow screen and clicks the Next button. | When a user clicks a button on a form. | Screen |
| When an employee clicks the Request PTO button on their employee record, which opens a form to complete. | When a user clicks a quick action button. | Screen |
| When a user clicks the Complete Sale button after closing an opportunity, and you want to start background automations, such as updating records and emailing stakeholders. | When a user clicks a custom button or link. | Autolaunched |
| When a flow executes another flow within the same running instance to reduce repetition within the main flow. | When called by another flow. | Autolaunched or Screen |
| When an Apex class is triggered by a change to an opportunity’s stage, which triggers an autolaunched flow. | When called by Apex code. | Autolaunched |
| When an integrated printer is out of ink, and it publishes a platform event message. | When a platform event message is received. | Platform Event–Triggered |
| When a contact record is updated in NetSuite, and then the associated contact record in the connected Salesforce org is updated. | When a change in the external system is found by a scheduled poll of the flow. | External System Change-Triggered |
| When a file is attached to an Account record. | When an automation event such as a form submission is received. | Automation Event-Triggered Flow |
Identify the Actions for the Flow to Complete
After determining when you want your flow to start, the next step is to tell the flow what to do after it’s triggered. To determine what specific actions you need your flow to take, use the solution that you identified.
- If people forget to do something, create a task record to remind them.
- If people don’t have time to complete tasks, update or create the records automatically by using field values from another record.
- If you have too much data entry or mistakes, have your customers fill out an online form with their own information.
- If you’re losing track of customers, create a task record for the record owner to follow up. Alternatively, create a high-priority case record after a certain amount of time.
Flow Example: Send an Email
- Challenge: Our sales reps forget to email new customers to welcome them.
- Solution: Send emails to new contacts automatically.
- Trigger: After a contact is created.
- Action: Send a welcome email to the new contact.
For instructions on how to build this flow, see Flow Example: Send an Email from a Flow.
Watch a Salesforce engineer show you how to build this flow in this video.
Flow Example: Create a Record from Collected Information
- Challenge: On customer calls, agents scramble to capture customer interest in new products. They often use sticky notes, which are hard to read or get lost.
- Solution: Use an online form embedded on the case record page to quickly capture basic information and create a new opportunity. The agent can confirm the information with the customer before ending the call.
- Trigger: When the agent submits the online form.
- Action: Use an online form to gather information, and then create an opportunity record when the agent submits the form.
For instructions on how to build this flow, see Flow Example: Use an Online Form to Create a Record.
Watch a Salesforce engineer show you how to build this flow in this video.
Flow Example: Schedule Emails and Record Updates
- Challenge: We can’t keep track of our customers’ memberships. Customers aren’t notified before their memberships expire, and we lose out on renewals.
- Solution: Remind customers to renew their membership starting a month before it expires.
- Trigger: Check membership records each day to see if any are about to expire.
- Action: Email the customer when their membership is about to expire. Update the membership stage to pending so that you know which memberships are pending renewal.
For instructions on how to build this flow, see Flow Example: Update Records and Send a Reminder on a Schedule.
Watch a Salesforce engineer show you how to build this flow in this video.
Flow Example: Automate Salesforce Record Creation from External Systems
- Challenge: Our sales reps currently create records in NetSuite, an external system, leading to a manual and often delayed process for integrating this new data into Salesforce.
- Solution: Implement an External System-Change Triggered Flow that automatically creates a corresponding record in Salesforce whenever a new record is created in the external system.
- Trigger: A new Contact record is created in NetSuite.
- Action: A new Lead record is automatically created in Salesforce, populated with relevant information from the NetSuite Contact.
For instructions on how to build this flow, see Create Salesforce Records After an External System Change Example.
For an overview of how to set up MuleSoft for Flow: Integration and to create automated connections between systems, refer to Get Started with MuleSoft for Flow: Integration.
Flow Example: Automate External System Record Creation from Salesforce
- Challenge: Our fulfillment center uses NetSuite, an external system, to process sales orders, while our sales team tracks them in Salesforce. The manual entry of sales orders into NetSuite from Salesforce leads to discrepancies, missing orders, and incomplete data.
- Solution: Implement a Salesforce Flow with an external action that automatically creates a new Sales Order in NetSuite whenever a new customer order is created in Salesforce.
- Trigger: A new customer order is created in Salesforce.
- Action: A new Sales Order record is automatically created in NetSuite, populated with relevant information from the Salesforce Order, ensuring the fulfillment center receives accurate and timely data to complete the order.
For instructions on how to build this flow, see Use Records to Trigger Actions in External Systems Example
Flow Example: Extract Data from Legacy Systems
- Challenge: Customer data exists in a legacy desktop application without API access. Employees manually copy and paste information into Salesforce, which is time-consuming and error-prone.
- Solution: Use MuleSoft RPA to extract data from the legacy application, and then create Salesforce records from your flow.
- Trigger: When a user initiates the data extraction process by clicking a button on a record page.
- Action: Call a MuleSoft RPA process that opens the legacy application, navigates to the customer data, extracts the information, and then creates the corresponding Salesforce records from within your flow.
Flow Example: Extract Data from Documents
- Challenge: Employees manually enter data from hundreds of invoices and forms into Salesforce, which is time-consuming and error-prone.
- Solution: Use MuleSoft for Flow: IDP to automatically extract data from documents and create records.
- Trigger: When a document is uploaded to a specific location or when a record is created.
- Action: Create a document processing configuration and use the Extract Data from Documents action to extract relevant information and create or update records.
Complementary Automation Tools
Do you have a more complex business challenge? Consider these additional automation tools.
| If you want to: | For example: | Using this tool: |
|---|---|---|
| Approve records through multiple levels in your organization. | Two levels of management to review and approve employee PTO request records. | Flow Approval Processes |
| Suggest offers and actions to users that are tailored to meet your unique business criteria. | To prompt agents to offer service contracts to customers who don’t have them. | Einstein Next Best Action |
| Coordinate multiple flows, and assign them to multiple teams or individuals. | An automated hiring process that involves HR, Finance, and the hiring team. | Flow Orchestration |
| Perform an operation for more records than scheduled-triggered flows allow. | To update all your 600,000 contacts at once. | Batch Apex |
| Perform CPU-intensive operations. | To calculate a highly complex discount rate. | Apex |

