Find a User by ID (Salesforce) Data Flow Template

finduserSF.png

Overview

This Data Flow template is made up of three Data Operations that allow app builders to search for a user record in Salesforce by its ID. This is achieved by connecting with the Salesforce integration and then passing data to this Data Flow.

In Connection Builder, Data Flow templates can be found with pre-populated sample data. However, to meet the requirements of their Journey, app builders should perform the necessary adjustments, such as adding other Data Ops.

Bear in mind that in order to use Salesforce as a datasource, credentials must be set in Configuration Builder > Integrations to connect the corresponding account.

Find a User by ID Operations

This Data Flow contains three parts:

Inputs

The Start pane keeps track of the inputs required by the Data Flow. 

  • Sample Inputs:

  • Datasource: Salesforce
  • Operation: Find records (Find records in Salesforce of a type with conditions)
  • Object Type: User (User)
  • Fields: fields to return
    • Username (Username)
    • Last Name (LastName)
    • First Name (FirstName)
    • Company Name (CompanyName)
    • Email (Email)
    • Mobile (MobilePhone)
    • Street (Street)
    • City (City)
    • State/Province (State)
    • Zip/Postal Code (PostalCode)
  • Sort by: No sample values
  • Conditions: to fetch Salesforce records
    • User ID (Id) equals user_id
  • Condition Behaviour: No sample value selected
  • Run Results: sf_user output Variable of type Any that is automatically created to hold the results of this Operation.

  • Transform Expression: user_id.results[0].Street - Airscrit expression to retrieve the address of the user
  • Output Format: Variable
  • Type: List of Text
  • Run Results: address_components output Variable of type List of Text that is automatically created to hold the results of this Operation.

Transform Data Operation

  • Transform Expression: Airscript expression to retrieve all user data and check for email and phone format
  • Output Format: Variable
  • Type: Any
  • Run Results: user output Variable of type Any that is automatically created to hold the results of this Operation.

Output

The End step is where variables from the Data Flow can be used as an output.

  • user Variable of type Any

Use Cases

  • Allow app builders to find a user in Salesforce by ID.