Bigsolve Logo
Company
AboutCareers
Services
AIAnalyticsCustom DevelopmentImplementationIntegration
Insights
BlogCase Studies
Contact Us

Transforming Data with Flow

Utilize Flow's Transform element to map data from source to target and provide formulaic transformations.

Transforming data between records with the Salesforce Flow Transform element

Here's the scenario: we have various forms on our website (e.g. Contact Us, Subscribe, etc.). When forms are submitted, unauthenticated webhooks are sent as POST requests to a receiving Apex REST Resource Class. Once received, a resulting Form Submission (Form_Submission__c) is created. Our end goal is to figure out how we can relate Form Submissions to Leads.

While we can tackle this in many ways, we're planning to use Flow's Transform element to instill simplicity, flexibility, and maintainability within the finished product.

‍

Developing The Flow

Let's design a Record-Triggered Flow that uses the Transform element to fulfill our requirement. We'll need to be conscious of the fact that some of the website forms omit key information that would result in errors when creating Leads. For example, the Subscribe form only asks for an email address.

  • Navigate to Setup > Flows and click "New Flow"
  • Choose Record-Triggered Flow and click "Create"

‍

Here are the Flow Elements in scope:

  • Start Criteria
  • Get Existing Lead (Get Records)
  • Received Existing Lead? (Decision)
  • Transform Form Submission to Lead (Transform)
  • Assign "Web" Lead Source (Assignment)
  • Create Lead (Create Records)
  • Relate Form Submission to Lead (Update Records)
The Form Submission After Create record-triggered Flow canvas, showing Get Records, Decision, Transform, Assignment, Create Records and Update Records elements in sequence
Record-Triggered Flow

‍

To start, let's ensure that the incoming Form Submission's Email is populated (this value is used downstream in the Flow):

Flow start criteria requiring the Form Submission Email field to be populated before the flow runs
Start Criteria

‍

Next, we'll query any existing Lead with a matching Email:

Get Records element querying Lead where the Email field matches the Form Submission Email
Get Existing Lead (Get Records)

‍

Check to see if a Lead was received:

Decision element branching on whether the Get Existing Lead query returned a record
Received Existing Lead? (Decision)

‍

If an existing Lead was not found, we'll transform the Form Submission (Form_Submission__c) into a Lead:

The Transform element mapping Form Submission source fields onto the fields of a new Lead record
Transform Form Submission to Lead (Transform)

‍

Within the Transform element, we need to handle the aforementioned scenario where required fields on a Lead may be excluded from the Webhook's payload.

For the Company and Last Name fields, we'll leverage formulas to handle null values. To add a formula, click on an existing mapping and choose the formula button:

A formula on the Company mapping inside the Transform element that supplies a fallback value when the Form Submission Company is null
Company (Formula)
IF(
    ISBLANK({!$Record.Company__c}),
    '(Not Provided)',
    {!$Record.Company__c}
)

‍

A formula on the Last Name mapping inside the Transform element that supplies a fallback value when the Form Submission Last Name is null
Last Name (Formula)
IF(
    ISBLANK({!$Record.Last_Name__c}),
    '(Not Provided)',
    {!$Record.Last_Name__c}
)

‍

We also need to supplement the Lead data with the appropriate Lead Source value. This is one shortcoming with the current Transform element: it doesn't allow us to populate unmapped fields with formulas.

Assignment element setting Lead Source to Web, because the Transform element cannot populate unmapped fields
Assign "Web" Lead Source (Assignment)

‍

Create the Lead:

Create Records element inserting the Lead assembled by the Transform element
Create Lead (Create Records)

‍

Lastly, we will relate the Form Submission to the appropriate Lead. To do this, we're going to use a formula resource:

Update Records element writing the Lead Id back onto the Form Submission record
Relate Form Submission to Lead (Update Records)

‍

Here's the formula used within formulaLeadId. Its Data Type is Text, and it resolves to the existing Lead when the Decision found one, and to the Lead the Transform element built when it did not:

The formulaLeadId formula resource, which resolves to the existing Lead Id when one was found and the newly created Lead Id otherwise
formulaLeadId (Formula)
IF(
    {!Yes_Received_Existing_Lead},
    {!Get_Existing_Lead.Id},
    {!Transform_Form_Submission_to_Lead.Id}
)

‍

We're able to rapidly transform data in an aesthetically pleasing manner between flow resources with the Transform element. Anyone that's used ETL software in the past will feel at home with the user interface!

Recent Blogs

Explore fresh ideas, strategies, and solutions from our Salesforce experts.

How AI improves sales teams by taking on research, qualification, follow-up, and CRM updates
Sep 24, 2026

How AI Improves Sales Teams: From Automation to Better Sales Execution

Salesforce and HubSpot integration connecting marketing engagement to sales execution
Sep 4, 2026

Salesforce vs. HubSpot: How a Salesforce-HubSpot Integration Connects Marketing and Sales

Five signs a Salesforce org needs an audit
Aug 18, 2026

Signs Your Salesforce Org Needs an Audit

Get Started with an Expert-Led Discovery

Let's Chat
CTA Charts
Bigsolve LogoSalesforce Partner badge with text 'Partner Since 2022' on blue gradient background.
Keep Up With The Latest
Join our subscriber list to get the latest news and special offers.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Company
AboutCareers
Services
AIAnalyticsCustom DevelopmentImplementationIntegration
Insights
BlogCase Studies
Legal
PrivacyTerms
© 2026 BigSolve LLC. All Rights Reserved.