Skip to main content

Query (SOQL)

Run a SOQL query and return all matching records as a table (all result pages are read).

Command in the Salesforce toolkit · id ooa.salesforce/query · 8 inputs (1 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Instance address (URL)StringNoInstance URL, e.g. https://yourcompany.my.salesforce.com.
Access tokenCredentialNoOAuth access token from the vault. Or leave it empty and choose a connection that signs in, which gets and renews the token.
SOQLStringYesSOQL query.
Maximum recordsNumberNo50000Safety limit.
API versionStringNov61.0REST API version.
Include deletedBooleanNofalseAlso return deleted and archived records (queryAll).
Batch sizeNumberNo0Records per page (200-2000); Salesforce's default when 0.
ParametersDictionaryNoValues for :name in the SOQL, quoted and escaped for you, e.g. WHERE LastName = :name. A list becomes (a, b) for IN. Safer than putting values into the text.

Outputs​

OutputTypeWhat it is
tableTableRecords.
countNumberNumber of records.
total_sizeNumberNumber of matching records Salesforce reports, which can be more than were read.