Find a Contact by ID (Salesforce) Data Flow Template

findacontactSF.png

Overview

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

In Connections 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 Settings > Integrations to connect the corresponding account.

Find a Contact 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: Contact (Contact)
  • Fields: fields to return
    • Last Name (LastName)
    • First Name (FirstName)
    • Mailing Street (MailingStreet)
    • MailingCity (MailingCity)
    • Mailing State/Province (MailingState)
    • Mailing Zip/PostalCode (MailingPostalCode)
    • Email (Email)
    • Mobile (MobilePhone)
  • Sort by: No sample values
  • Conditions: to fetch Salesforce records
    • Contact ID (Id) equals contact_id
  • Condition Behaviour: No sample value selected
  • Run Results: sf_contact output Variable of type Any that is automatically created to hold the results of this Operation.

  • Transform Expression: user_id.results[0].MailingStreet - 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: contact 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.

  • contact Variable of type Any

Use Cases

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