How to Launch Pega Portal from API

Share with Love
In Pega, I have a requirement to launch the User portal from an API call from external system. The API will be sending few details in the header (i.e Job ID) for which I need to launch the portal with the list of cases created for that particular Job ID.

To launch the User portal with the list of cases created for a particular Job ID from an API call in Pega, you can follow these steps:

  1. Create a new API rule in Pega that can accept the external system’s API call. To create the API rule, you can navigate to Designer Studio > Integration > Services and Connectors > REST and create a new REST Integration.
  2. Define the input parameters for the API, including the Job ID that the external system will be sending in the header.
  3. In the API rule, use the Job ID to retrieve the list of cases created for that particular Job ID. You can use a data page or a report definition to retrieve the list of cases.
  4. Once you have the list of cases, you can create a URL that will launch the User portal with the filtered list of cases. The URL should include the following parameters:
    • pyActivity=WorkList
    • pyDefaultFilter=<filter condition to retrieve cases based on the Job ID>

    The pyDefaultFilter parameter should be set to a filter condition that retrieves cases based on the Job ID. For example, if the Job ID is stored in a property called “JobID” on the case, the filter condition should be: pyDefaultFilter=JobID='<Job ID>’

  5. Return the URL to the external system as the response to the API call.
  6. The external system can then launch the User portal by opening the URL in a browser. The User portal will open with the filtered list of cases for the specified Job ID.

Note: Make sure that the user who is launching the User portal has the appropriate privileges to access the cases.