In this blog, we will show you how to use Flow to automate task creation in Salesforce. With Flow, you can efficiently create tasks and increase productivity. Let’s get started!
Business Scenario: Create a task when a new Account record with revenue exceeding 1,00,000 is created.
Prerequisite:
Create a lookup field with Contact on Account object named ‘Primary Contact’.
Configure Record-Triggered flow:
To ensure that Salesforce automatically generates tasks whenever we add a new Account, select ‘Account’ as the object and configure the flow to trigger upon Account creation.
Set the condition as ‘AnnualRevenue’ Greater than 100000 and Primary contact shouldn’t be null i.e. Primary Contact is null is False.
Select Action and related records as Task record related to the Account will be created.
Add Create Record element:
Generate ‘Create Follow-Up task’ and select the number of records as ‘One’.
To set the records fields select ‘Use separated resources and literal values’.
In Create a record of This object section, select the object as ‘Task’.
The Account and Task have the same Owner so set the field ‘OwnerId’ to {!$Record.OwnerId} in the Set field values for the Task.
Add ‘ActivityDate’ and create a new resource of Formula type named ‘var_DueDate’. Select Data Type as Date and enter the ‘TODAY()+1 formula’. Save it.
Set the Priority field to High.
Select WhoId as {!$Record.Primary_Contact__c} and WhatId as {!$Record.Id}.
We can enter the Subject as ‘High-Value Client’.
For the Description field create a new resource as Text Template ‘var_Task_Description’. In Body, select View as Plain Text and enter ‘This is a High-Value Client please follow up with the Primary Contact of this Account’. Click on Done.
Save the Flow as ‘Create Automatic Task on Account Creation’. Activate the flow to see the results.
What is WhoId?
In Salesforce, the WhoId is a standard field that associates activities and interactions with individuals or contacts.
Use Cases:
Contact: When communicating with existing customers or known individuals, use the Contact object as the WhoId. This links activities to individual contact records, providing a clear history of engagements.
Lead: On the other hand, in Cases where interactions involve potential customers or leads, the Lead object can be used as the WhoId. This helps capture information about new leads and track their journey through the sales process.
What is WhatId?
WhatId is another standard field in Salesforce that references objects or things other than individuals. It associates activities with specific records or objects within the system.
Use Cases:
Account: The Account object is often used as the WhatId when interactions involve entire companies or accounts. This ensures that all activities related to a particular company are linked to its record, allowing for a holistic view of customer engagement.
Custom Object: In scenarios where Salesforce is customized to cater to specific industries or business processes, custom objects can be used as the WhatId. This allows Salesforce to handle unique data structures and relationships tailored to an organization’s needs.
Now, Create a new Account Record, say ‘Rework Publication’ and create a new Contact with the required details for the primary contact. Provide revenue greater than 100000. Hence, the Task is created with account creation.
To create a Task using the Action element, proceed with the following steps.
Add Action Element:
Select action as ‘New Task’ with the label ‘Create Task From Action ‘ and provide Assigned To ID as {!$Record.OwnerId}.
In Due Date Only select Resource ‘var_DueDate’.
For Name ID is the same as WhoID which is {!$Record.Primary_Contact__c}.
Related Record ID is {!$Record.Id} which is WhatID.
Enter Subject as ‘High Potential Client From Action’.
Save and Activate the flow.
We can see that two tasks are generated upon creating a new Account record using the Create Record and Action elements.
Want to Learn Salesforce Flows? Checkout our Salesforce Flow Course
FAQs
1. What are the Tasks in Salesforce?
2. How can we ensure that Tasks in the Salesforce account are correctly synchronized with the calendar?
Salesforce offers integration with popular calendar applications such as Google Calendar, Outlook, and Office 365.
By syncing your Salesforce Tasks with your calendar, you can ensure that all scheduled activities are visible and accessible across platforms, improving productivity and time management.
Also, read- Einstein activity Capture in Salesforce
3. Is it possible to relate Tasks to other Salesforce records?
Yes, Tasks in Salesforce can be related to various records, such as leads, contacts, accounts, opportunities, or custom objects. This allows tracking of activities related to specific entities within your Salesforce environment.
4. What is the difference between Tasks and Events in Salesforce?
Tasks represent individual to-do items or actions, while Events in Salesforce represent scheduled appointments, meetings, or other calendar-related activities. Tasks are actionable items that require completion, while Events are time-bound activities that may involve multiple participants.
Conclusion:
With a user-friendly interface and simple configuration steps, Flow offers a powerful tool for enhancing efficiency within the Salesforce platform by automating the task creation process.