Skip to main content

Get Records

Description

Salesforce (REST): Get Records step fetches all Salesforce record matching the criteria query.

References:

• API – Get Records

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_queryall.htm

• SOQL Syntax

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select.htm

Connection Tab – Salesforce

No.Field NameDescription
1Step NameName of the step. This name has to be unique in a single workflow.
Connection
1Instance URLSpecify the instance URL of the Salesforce instance.

This field is mandatory.
2Consumer Key / Client IDSpecify the connected app’s consumer key, which is found on the connected app’s Manage Connected Apps page or from the connected app’s definition.

This field is mandatory.
3Consumer Secret / Client SecretSpecify the connected app’s consumer secret, which can be found on the connected app’s Manage Connected Apps page or from the connected app’s definition.

This field is mandatory.
4Refresh TokenSpecify a refresh token to obtain a new access token.

This field is mandatory.
5Test ConnectionClick to verify whether the connection is established or not.

Note: Test Connection will only work with static (hardcoded) values and environment variables. It will not work for the previous step fields.

Input Tab – Salesforce

No.Field NameDescription
1Specify QuerySelect this check box to manually execute a query based on SOQL statements. By default, the checkbox is clear.

Note: The SOQL Query field appears only if the checkbox is selected. Otherwise, enter details in Module and Query Condition fields.
2ModuleSelect the module (table) from which you want to retrieve data.
3GetClick to populate the list of module names on the Salesforce instance.

Note: The list is populated if the connection is successfully established.
4Query ConditionEnter any query filters you want to apply. Variables are allowed.

Syntax: <<fieldName>>='<<fieldValue>>'
Example: Subject='Rpaticket'

Notes:
• Do not include WHERE in the Query Condition statement.
• The output response does not display deleted records. To view deleted records, use the isDeleted flag.

Example: Subject='Rest1' AND isDeleted=true
5SOQL QueryUse the Salesforce Object Query Language (SOQL) to search Salesforce data for specific information.

Syntax: SELECT <<fieldName>> FROM <<moduleName>> WHERE <<fieldName>>='<<fieldValue>>'
Example: SELECT IncidentNumber FROM Incident WHERE Subject='Rpaticket'

Notes:
Use isDeleted to fetch or omit deleted records in the output.

Examples:
SELECT Id, Subject FROM Incident WHERE Subject='Rest1' AND isDeleted=true
SELECT Id, Subject FROM Incident WHERE Subject='Rest1' AND isDeleted=false
SELECT Id,(SELECT Id FROM Contacts) FROM Account WHERE isDeleted=false
6Order ByUse this field to control the order of the query results.
7Get Top N RecordsFetch the top N records matching the query criteria.

Output Tab – Salesforce

No.Field NameDescription
1Display NameDisplays the list of fields (Display Name) associated with the module.
2Field NameDisplays the list of fields (Logical Name) associated with the module.
3Get FieldsOn click of this button, the Display Name and Field Name values are populated in the table.