Capturing Pre-Chat Inputs in Messaging for In-App and Web: Auto-Updating the Messaging End User Record via Flow.

Published on: 7/8/2025

Capturing Pre-Chat Inputs in Messaging for In-App and Web: Auto-Updating the Messaging End User Record via Flow.

Step 1: Create Custom Parameters in Messaging Settings

  • Go to Messaging Settings in Salesforce.
  • Select your messaging channel (In-App or Web).
  • Under Custom Parameters, add parameters such as Language, we can use the standard parameters as well like FirstName, LastName, Email.
  • Save your changes. These parameters will capture the pre-chat values entered by the user.

          

 


 

Step 2: Add the custom prechat value to the prechat

  • Navigate to Embedded Service Deployement
  • Activate the Prechat and align the needful Prechat values

         

  • Publish the deployment so that the updates will be reflected

 

Step 3: Map Parameters to Flow Variables

  1. Create a Omni channel Messaging Flow (via Flow Builder).

  2. Add input variables in the flow to match the custom parameter API names:

  • firstName → Text → Available for input
  • lastName → Text → Available for input
  • Language → Text → Available for input
  1. Use a Get Records element to fetch the MEU record (e.g., based on MessagingEndUserId).

  2. Add an Update Records element to update the MEU:

    • Set the Name field by using a formula by adding Name as {!firstName} & " " &{!lastName} 

    • Set the Language field to Language

                 


Step 4: Connect It All

  1. Save and activate your flow.

  2. In the Messaging Deployment, ensure that the pre-chat form sends values for firstName, lastName and Language.

  3. These values are passed to the flow via the mapped variables and used to update the MEU record.

 


Result

        Once the chat is initiated:

  • The Messaging End User (MEU) record will automatically reflect the name and language provided in the pre-chat form.

  • This enables a more personalized and localized experience for your customers.

       

 


 

Tip:
You can use additional custom parameters (like email, case number, etc.) following the same method to build rich pre-chat experiences that feed directly into automation.