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:
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.
$.nextRecordsUrl
Result Selector
Sepcify the location of all records for each page.
$.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.
$.nextRecordsUrl
Testing the data source should now return a valid result indicating that the data source is ready for use.