In this tutorial, we’ll walk through how to create an external data source in Pega, configure it using an external REST API, and finally use it to populate a dropdown in a case.
1. Creating the Data Object
To begin, go to:
Data → New
This opens the wizard for creating a new data object.
Enter a name for your Data Object, then click Next.
In the System of Record dropdown, select Create new, and enter a name for the new system of record.
For this example, we will integrate with an external API that returns a list of countries.
2. Defining the External Data Source
Since we are retrieving information, we’ll use a GET method.
Enter the endpoint URL for the external API.
In this example, the service does not require headers or authentication, so we can simply click Initialize call to generate the structure.
3. Selecting the Fields to Source
The API response includes multiple details—country name, currency, languages, and more.
You do not need to map all values. Instead, select only the properties you need.
Click Add new and choose the specific fields that should be included in your data object.
Environment Settings
This section displays the Integration System Settings created automatically.
These help manage different endpoints across development, staging, and production environments.
4. Reviewing the Generated Data Type
Open the data type you just created. You will notice:
- The System of Record is set to External
- The data source is the Get Countries API
The wizard also automatically generates a Data Page in Page List mode.
This Data Page is ready to be used as the source for:
- Dropdowns
- Autocomplete fields
- Any UI component requiring country data
5. Reviewing the Generated Data Page
The Data Page is already configured with:
- The Connector
- The Response Data Transform
Since the API does not require parameters, no Request Data Transform is needed.
Click Run to test the Data Page.
This confirms:
- The API connection is successful
- The response mapping works correctly
- All returned data is visible under pxResults
You should now see a list of all countries retrieved from the API.
6. Using the Data Page in a Dropdown
Next, let’s use the Data Page as the source for a dropdown field.
In your case or UI section:
- Select Field type: Data Page
- Enter the Data Page name created by the wizard
- Set the parameter value to countries (or the name used in your Data Page)
- For the Property value, select Alpha Code
- For the Display text, select Name
Click Save, and then run a case to verify that the dropdown loads correctly.
Open the dropdown and choose any country.
Check the Clipboard to confirm the selected country is saved properly.
This completes the process of creating and using an external data source in Pega—from configuring the API to integrating it into your UI. If you have any questions or run into issues, feel free to ask!






Leave a Reply