Skip to main content

Hi everyone, 

 

My company recently migrated from HubSpot to Salesforce Marketing Cloud Growth and I am trying to rebuild a simple contact form flow.

The goal is to create the following process:

When someone submits the contact form:

  1. The Flow should first check whether the person already exists in our Salesforce database.

If the person does not exist:

  • Create a new Lead record in Salesforce.
  • Send a confirmation email to the person who submitted the form.
  • Send an internal email notification to our sales team containing the lead information:
    • Name
    • Email address
    • Question/message submitted through the form

If the person already exists as a Lead or Contact:

  • Do not create a duplicate record.
  • Still send a confirmation email to the person who submitted the form.
  • Send an internal notification to our sales team containing:
    • Name
    • Email address
    • Question/message submitted through the form

The main goal is to avoid duplicate records while ensuring both the customer and sales team receive the correct notifications for every form submission. 

 

I tried using the Send Email action directly in the Form-Triggered Flow, but I received this error:

I then tried creating a Subflow. However, the information from the form submission was not passed correctly to the Subflow. The Subflow either:

  • Did not send an email at all, or
  • Sent an email with incorrect Lead data, or
  • Sent an email without any form information.

Any advice or examples of the correct Flow architecture would be greatly appreciated.

Thank you! 

 

#Trailhead

1 Antwort
  1. 27. Sept., 15:45

    Hi Hau,

    I’d keep the form-triggered Flow responsible for the submission and record lookup, and move the email logic into a reusable Subflow. 

     

    The important part is to explicitly pass the form values into the Subflow rather than expecting the Subflow to access the parent Flow’s variables. For example, create Subflow input variables for Name, Email, Message, and the Salesforce record Id, and mark them as Available for input. Then map the Form-Triggered Flow variables to those inputs when calling the Subflow.

    A simple structure would be:

    Form Submission → Find existing Lead/Contact → Create Lead if needed → Call Email Subflow

    Then the Email Subflow can:

    • Send the confirmation email to the submitted email address.
    • Send the internal notification to the sales team.
    • Use the passed form values for the message and the Lead/Contact data for the record information.

    For duplicate prevention, make sure the lookup uses the appropriate matching criteria (for example, normalized email) and handles both Lead and Contact before creating a new Lead. 

     

    If the Subflow is receiving blank or incorrect values, I’d first debug the parent Flow and verify the values immediately before the Subflow element. Then check the Subflow input variable mappings. That usually makes it clear whether the problem is with the form variables or the Subflow configuration.

0/9000