SOQL Action

Estimated reading: 2 minutes 6 views

The SOQL action allows you to execute a Salesforce Object Query Language (SOQL) query and use the results dynamically in your process. This is particularly useful for retrieving data based on specific conditions during the execution of a process.

SOQL action detail

Key Features

  • Executes a SOQL query and retrieves results.
  • Outputs query results for use in subsequent steps.

Configuring a SOQL Action

When adding a SOQL action, the following fields must be configured:

1. Common Properties

  • Label:
    • A user-friendly name for the action, displayed in the process flow.
    • Required field.
  • Name:
    • A unique identifier for the action, used internally.
    • Required field.

2. Inputs

The inputs section defines the SOQL query and its parameters. The following fields are available:

Required Fields

  1. SOQL Query:
    • The SOQL query to be executed.
    • Example:
      SELECT Id, Name, BillingCity FROM Account WHERE Industry = 'Technology'

3. Outputs

The query results are returned as an array of records.
Outputs can be used in subsequent steps to process or validate data dynamically.

Usage Example

Scenario: Retrieve Technology Accounts in San Francisco

  1. SOQL Query:
    SELECT Id, Name, BillingCity FROM Account WHERE Industry = '{IndustryParam}' AND BillingCity = '{CityParam}'

Best Practices

  • Always test your SOQL queries in Salesforce Developer Console before adding them to the process.
  • Use dynamic inputs to make your queries flexible and reusable.
  • Limit the number of records retrieved by using appropriate filters and the LIMIT keyword in the query.
  • Use the outputs efficiently to avoid redundant queries in subsequent steps.

Leave a Comment

       
Euphoria, forever till the end of times

Euphoria

Share this Doc

SOQL Action

Or copy link

CONTENTS