Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Using a data page with integrations that have complex input

Updated on April 6, 2022

You can use data pages to integrate APIs that contain complex input with Pega Platform. Data pages accept objects with scalar inputs, such as a Customer object with inputs for Name, Address, and City.

However, you might need to integrate data that contains complex inputs, such as a list of values, or persist a page of data to a remote system of record. You have the following options to integrate this data in Pega Platform:

Updating data by using a save plan

Consider the use case of a human resources employee running a job applicant case. The employee needs to update the desired start date and qualifications for a Software Engineer opening that is posted on engineeringjobs.com. The REST API returns the following JSON for the software engineer position:

{"Start date": "Immediately," "Qualifications": "Bachelor's degree in Computer Science"}

You need to pull the Software Engineer object data into the case, present the human resources employee with UI elements with which to update the data, and then persist the changes back to the remote system of record. The optimal way to update the case is by configuring a save plan. A save plan is an API that supports complex input. This use case involves complex input because you are persisting all the data you collected for the Software Engineer object back to the remote system.

For more information, see Savable data pages and Configuring a save plan for a data page in App Studio.

Updating data by using a data transform

For a separate job applicant case, a human resources employee needs to complete a background check. The system needs to make an API call to run the background check. The API accepts a variety of inputs, including a Previous Addresses object that is structured as a list:

{
"Previous Addresses": [
"101 Main St.",
"55 Washington Ave.",
"215 Broadway St."
]
}

In order for the API to return the background check information to the case, you must convert the schema into a format that the data page accepts, such as JSON. Then, you provide the JSON as an input to the background check data page. Use a data transform to capture the inputs on a page in Pega Platform:

  1. Configure a JSON data transform to construct the JSON from the relevant fields of the case.
  2. On the Parameters tab of your data page, provide the JSON as an input to your data page.

    If the JSON is in a format that the connector accepts, you can pass the JSON to the connector as an input.

    If the JSON is not in a format that the connector accepts, run the same JSON data transform again in deserialized mode. Deserialized mode converts the JSON back to a page in the request data transform in the data page. Then, in the request data transform, continue to make the request.

JSON data transform example
Example of mapping the values for the Previous Addresses field in the JSON

For more information, see the following documentation:

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us