You are here:
Use Data Values and Page Through Sorted Data
If an Omnistudio Data Mapper Extract is expected to retrieve numerous records, you can use paging to retrieve a few at a time based on field values. For example, you can page through Accounts by Id.
Paging through results requires creating the ORDER BY and LIMIT settings for extraction.
-
For ORDER BY, set to sort the data based on a specific field.
-
For LIMIT, specify how many records to retrieve at a time.
-
After retrieving each set of records, use the sort field value from the last record retrieved to retrieve the next set.
Create Settings
| Field | value | notes |
|---|---|---|
| Interface Type | Extract | |
| Input Type | JSON | If using with another Omnistudio component such as an Omniscript, set the input as JSON. |
| Output Type | JSON |
Extract Settings
Map the extracted object with the path in the JSON, and create a filter for the ID.
| Extraction Object | Extract Object Path | Filter |
|---|---|---|
| Account | Account | Id = lastAccountId |
For ORDER BY, and enter Id as its value. Then, choose
LIMIT and add a value of 2.
Mapping Settings
Map the input data to a JSON node so that an Omniscript (or other component) can access the data. To define a data transformation, you can add key-value pairs. This addition replaces the defined key with the value in the output.
| Extract JSON Path | JSON Output Path |
|---|---|
| account:Id | id |
| Account:Name | name |
Extract Preview
In Preview, add lastAccountId as the key and a valid Salesforce Account object ID as the value, such as 0016100001OBpRi.
After you execute the sample Data Mapper in Preview, the first page of Account records is shown. From the second record in the response, copy the Id value, and paste it in the Value field in the Input Parameters pane, and execute the sample. The second page of Account records is retrieved

