Skip to main content
Skip table of contents

Salesforce Pagination

The maximum number of rows returned by any SOQL over the REST API is 2.000 per request. In case your data source has more than 2k items, the data will be cut off. To request up to 12.000 items, you can use the following workaround:

Original Data Source

Create a normal Salesforce data source and select the data you want to paginate over.

For example:

CODE
https://xxx.salesforce.com/services/data/v45.0/query/?q=Select name from account

Paginated Data Source

Create a second data source of type Paginated Data Source and select the original Salesforce data source.

The pagination type here is called Follow URL because the URL of the next page will be returned with each response.

URL Selector

Specify the location of the URL for the next page.

CODE
$.nextRecordsUrl

Result Selector

Sepcify the location of all records for each page.

CODE
$.records[*]

Finish Condition

Salesforce will send a follow-up URL until the last page. Thus, select Empty Target as a Finish Condition.

Finish Target

Once Salesforce doesn't return a URL, we know it's the last page and stop pagination.

CODE
$.nextRecordsUrl

Testing the data source should now return a valid result indicating that the data source is ready for use.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.