Loading...

Salesforce introduced the transform element in their winter ‘24 release. This feature simplifies data processing in flows by eliminating the need for loops and assignment elements.

With the Transform Element, you can seamlessly map source data to target data, making your flows more efficient and easier to maintain. Transform element is available for screen flows, auto-launched flows with no triggers, and record-triggered flows.

In this blog, we will walk you through the steps to use the Transform Element in salesforce flow.

Key features

  • Enables seamless mapping between source data and target data which simplifies the data transformation process.
  • Handle data collections and transform each item individually. 
  • Enables dynamic field mapping using formulas.
  • Supports aggregate calculations like sum and count.

Transform Element Component

  • Source Data: Data to transform which are available to the flow.
  • Target Data: Data after transformation. Target data could either be a single record or a collection of records. You define the target structure using an Apex class, a data type (Apex-defined or Record), or an object.
  • Formulas: Set a fixed value for the target data field or Reference up to two source collections that are nested within one another.

Business scenarios 

Case 1: Clone records, such as Accounts, Opportunities, etc

Create a Screen Flow to clone Account records selected by the user on the screen.

Step 1: Go to setup and create a Screen Flow.

Screen 1 1

Step 2: Add a Get Records element to the flow to retrieve all Account records.

Screen 1 2 1
Screen 1 2 2

Step 3: After retrieving all Account records, add a Screen element to allow the user to select the Accounts for cloning.

To display the Accounts on the screen, drag and drop a Data Table component onto the screen. And configure data sources, rows, and columns.

Set the Get Account Records collection as the source collection to populate the Data Table.

Screen 1 3 1

Set the Rows option to ‘Multiple’. 

Configure Columns by adding Name and Industry fields.

Screen 1 3 2

Step 4:  After selecting the Accounts for cloning, use the Transform element to map and prepare the Account data for cloning

 Add a resource to the source data.

Screen 1 4 1

After selecting the source data, choose selected rows to map the collection for cloning multiple records. If you want to clone only a single record, select firstSelectedRow to map the data to the target.

Screen 1 4 2

To map selected rows to the target data, add a Resource and set the data type to Record. Ensure to check the ‘Allow multiple values’ checkbox. Then, select the target object as Account.

Screen 1 4 3

After creating the target collection variable time to map the source data with the target data

Screen 1 4 4

To indicate that a record has been cloned by this flow, you can append ‘Cloned’ to the name of the record (e.g., ‘Edge Communications Cloned’). This can be achieved by using a formula in the Name field of the target data while mapping.

Screen 1 4 5

Add formula as per the business requirement

Screen 1 4 6

Step 5:  After completing the mapping between the source data and the target data, add the Create Records element.

Enable Multiple toggle to specify the creation of multiple records. Then, select the Map Accounts collection to create the cloned records.

Screen 1 5 1
Screen 1 5 2
Screen 1 6 1

Step 7: Save and activate the flow. 

Step 8: Add flow to the Home Page

  1. Go to the gear icon and select the edit page 
  2. Search for the Flow component
  3. Drag and drop the flow onto the desired section 
  4. Select the Flow 
  5. Save the page
Screen 1 8 1

Test the screen flow :

Select the records you want to clone from the displayed list.

After selecting the records click on the next button for cloning the records.

Screen 1 9 1
Screen 1 9 2

To check the selected accounts are cloned successfully.

Go to the account page and select All Accounts list view. You see the records with ‘Cloned’ appended to their name.

Screen 1 9 3

Result:  All selected accounts have been cloned.
Here is the Demo.

Case 2: Used for Aggregate Calculations

Display the total sum of the ‘Amount’ field and the count of all related Opportunities where the Stage is ‘Closed Won’ on the account record.

Prerequisite: 

Create two custom fields on the Account object.

  1. Total Closed Won Amount field to store the sum of total opportunities amount where the stage name is ‘Closed Won’. The data type will be currency.
  2. Count of Closed Won Deals field to store the total count of opportunities related to the account where the stage name is ‘Closed Won’. The data type will be a number.

Step 1: Go to the flow and select Record-Triggered Flow 

  1. Select opportunity object 
  2. Select A record is created or updated when to trigger the flow 
  3. Set the entry conditions mentioned in the image 
Screen 2 1 1

Step 2: Add a Get Records element to retrieve all related Closed Won Opportunities.

 Set the following conditions:

  1. Account ID equals the Record Account ID.
  2. StageName equals ‘Closed Won‘.
Screen 2 2 1

Step 3: Add a Transform element to map the source data with the target data 

A. Add record collection to the source data.

Screen 2 3 1

B. Configure target data 

Screen 2 3 2

C. Map source data with target data 

To calculate the total opportunities amount, Map the source collection to the Total Closed Won Amount field of the target data source.

Screen 2 3 3

To calculate the count of the closed won opportunities related to the account, Map the source data to the Count of Closed Won Deals field of the target data. 

Screen 2 3 4
Screen 2 3 5

Step 4: After mapping the data, add an Update Records element to update the Account records.

Set Total Closed Won Amount and Count of Closed Won Deals fields 

Screen 2 4 1
Screen 2 4 2

Step 5: Save and Activate the flow 

Test the record-triggered flow. 

Select an Account that has related Opportunities.s

Screen 2 6 1
Screen 2 6 2

Go to the opportunity record and change the stage to closed won.

Screen 2 6 3
Screen 2 6 4

After updating the opportunity, go to the related account and check whether the fields are populated with the correct values.

Screen 2 6 5

Result: Both the Total Closed Won Amount and Count of Closed Won Deals fields are populated with the correct value.

Now add one more opportunity with closed won and associated with the same account. 

After saving a new opportunity go back to the related account and check the fields are updated correctly.

Screen 2 6 6
Screen 2 6 7

Result: Both The total Closed Won Amount and Count of Closed Won Deals fields populated with the correct value.

Here is the Demo.

Conclusion

The Transform Element in Salesforce Flow simplifies data mapping and modification by allowing the conversion of multiple variables into a single or collection variable. It supports features like formula-based adjustments, Apex class integration, and aggregate calculations. 

While tasks like cloning accounts or data handling can be achieved using Loop and Assignment elements, the Transform element streamlines the configuration process, making it faster and more efficient.

 Stay tuned for more informative blogs! Click here!

No Data Found.

Related Articles
Orchestrator vs. Traditional Flows

Businesses use Salesforce automation to reduce manual work, improve efficiency, and automate repetitive business processes. Two commonly used automation approaches inside Salesforce are Traditional Flows and Flow Orchestrator. Traditional Flows are mainly used for simple automation tasks such as updating records, sending notifications, creating tasks, and automating business logic. Flow Orchestrator is designed for more […]

Read More
The Rise of Agentic Government_ What Salesforce’s 2026 Insights Mean for the Future of Public Sector AI

Government technology has often been seen as slower to evolve than the private sector. But Salesforce’s latest research challenges that idea in a big way. In fact, the new findings suggest that public sector organizations may now be moving faster than many businesses when it comes to adopting AI agents and preparing for a more […]

Read More
How To Use Email Service in APEX

Managing approvals, updates, and record changes directly from email can significantly improve efficiency within Salesforce workflows. Instead of logging in, navigating records, and manually updating fields, users can simply respond to emails and trigger automated updates using Email Service in APEX. This approach is especially useful for businesses leveraging Salesforce automation and looking to enhance […]

Read More
Design and Implementation of Salesforce Jira Task Integration 1 1

Businesses have been using Salesforce for CRM operations and Jira for Agile project tracking. However, without integration, teams manually update both systems, leading to data inconsistency and inefficiency.This mechanism establishes a real-time integration between Salesforce and Jira, allowing seamless synchronization of tasks and agile board statuses.  A custom Salesforce dashboard was developed that replicates Jira-style […]

Read More
Dark Mode in Salesforce Enabling It and Creating Theme Ready Lightning Web Components with SLDS 2.0 1 1

With the Winter ’26 release, Salesforce introduced Dark Mode in Lightning Experience. Dark Mode has been introduced as a beta feature in Winter ’26, and at first it was available only for Starter Edition orgs. It is now rolling out further with Spring ’26 to Professional, Enterprise, and Developer editions. To use Dark Mode, Salesforce […]

Read More
How to Merge and Brand PDF Files in Salesforce Using LWC Visualforce PDF LIB 1

Salesforce developers frequently encounter document automation requirements that go beyond standard Apex-based PDF generation. From merging multiple ContentVersion files to dynamically applying branding like watermarks and headers, traditional server-side approaches often hit Salesforce heap size limits (6MB/12MB), creating performance and scalability challenges. This guide presents a heap-limit-safe PDF merging architecture in Salesforce using Lightning Web […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203239658
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818