RetrieveSalesforceObjects()
Returns a rowset with the selected information from Salesforce objects that match the criteria you specify.
To use this function with Marketing Cloud Engagement, configure Marketing Cloud Connect to integrate with Sales Cloud or Service Cloud.
This function returns data in a rowset. Use the Row() and Field() field functions to access individual fields. To prevent long-running functions from impacting email send performance, the resulting rowset contains a maximum of 1,000 rows.
When you call this function, it issues a SOAP request to your Salesforce org. SOAP API requests aren’t subject to the API usage limits that apply to your org.
| Marketing Cloud Engagement | ✅ Yes |
| Marketing Cloud Next | ✅ Yes |
This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).
The RetrieveSalesforceObjects() function has these parameters:
objectName(string): Required. The API name of the Salesforce object to retrieve information from.fieldsToRetrieve(string): Required. A comma-separated list of fields to retrieve information from.queryFieldName1(string): Required. The name of the field to filter on.queryFieldOperator1(string): Required. The operator to use for the filter.queryFieldValue1(string): Required. The value to filter on.
You can include more queries by adding them to the end of the list of parameters. When you include multiple parameters, they’re connected with AND logic.
To call this function, pass it the name of the object to retrieve data from, the fields that you want to retrieve, and at least one set of query parameters. A set of query parameters contains the name of the field to query, the operator to use, and the value to match.
The example outputs a list of all leads in the West region that have an annual revenue value greater than 1,000,000.