Connect to External API- Design Approach

Requirement is I have to call API to get CusTomer data. the search paramters are customerID or Firstname Last DOB combination, or MemberKey. I need to do call api based on the search parameters and API would be returning results. Now two scenarios.

  1. The search can be done mutiple times. i need to get latest data based on search parameters.
  2. There might be more records at each search. say 100 to 200 records.

How we can efficiently handle this and how we can efficiently load the results in UI. Apart from API change having pagenumer , pagsize or offset , limit is there any other way from Pega?

Post Selection, I need to pass the some of selected results values to another data page to call another API.

You can go with teh following approach as this is a common integration design.

  1. Create a parameterized Read-Only Data Page to call the customer search API using the provided search criteria (CustomerID, Name + DOB, or MemberKey).
  2. Refresh the Data Page on every search so users always see the latest results.
  3. Bind the UI directly to the Data Page instead of copying 100–200 records to the case clipboard, reducing memory usage and improving performance.
  4. For result sets of 100–200 records, Pega’s grid pagination is generally sufficient. For larger datasets, API-side pagination (pageNumber, pageSize, offset, limit, or cursor-based pagination) is the recommended approach.
  5. When a user selects a customer, store only the required key fields (e.g., CustomerID or MemberKey) on the case.
  6. Use these selected values as parameters to a second Data Page that invokes the follow-up API to retrieve detailed information.

The approach already suggested by @AJRangarh is the right baseline, so I would not repeat it. One additional recommendation is to use a search screen with a paged grid instead of autocomplete or loading large result sets directly into the case, especially when the API can return 100–200 records and users may search multiple times.

Also, keep the results in a parameterized read-only data page rather than copying them onto the work page, and store only the selected customer keys on the case for the second API call. That keeps the case clipboard smaller and aligns better with how Pega data pages are intended to manage integration and caching.

If the external service supports API-side paging, that is still the best option. Otherwise, at minimum, enforce tighter search criteria so broad repeated searches do not overload the UI or integration layer

Could you please clarify if this requirement for Constellation or Traditional application? The solution differs based on the UI architecture.

This is for Constellation

Please check this article

Yes saw those. is there any other way from Pega end rather than from API end. earlier we used to set pagination in Report Definition. we have now with insights and report definition. but am checking is there any other way which pega can do ? Also post selection of records, Lookup data page run before the post DT which expects the data to be present in the Data table. so in case of 100 to 200 records for every API call before the selection of results, it might be difficult to store the records in DB table

@MarcCheong Could you help on this scenario. Configuring list Data Objects with local and external data. is this related to my scenario ?

There are multiple questions here.

  1. Retrieving the records.
    1. Yes, you can use that pega docs Pegasystems Documentation
    2. the one @RameshSangili Infinite Scrolling in Constellation Table for REST API
    3. and a few others focusing specifically on how to get the data from the Data Reference “search and select pattern” to the API call.
      1. Empty List on Load in Constellation Landing page
      2. Advanced Use Cases for Search and Select Pattern
      3. Managing external system of record through REST with CRUD actions in Pega Constellation
  2. Search multiple times, new search. This should happen implicitly if you use Search and Select.
    1. You may have to set your data page refresh strategy to “Reload once per interaction” to getting loading and not caching.
  3. Selecting and passing this on
    1. If you use a data reference, then the selected details will be stored in your case. You can then pass that on in another datapage as a parameter. See Quickly building dynamic form field behavior with Constellation and App Studio: Cascading dropdowns | Pega for an example of pass the parameters on. So you shouldn’t have to do anything in the UI, form refresh, trying to set values etc. So long as the data model is correct those details should be passed on in the model.