Configure URL for navigating directly to a specific landing page in user portal from an external application

Hi All,

Our user case is to configure an URL that launches a specific landing page in a user portal. This URL is used in an external application. I tried using OOTB activities ShowSelectedPortal, doUIAction and pyMobileSnapStart in our custom activity that is called post authentication but nothing is working. I could load the harness by using doUIAction but it doesnt load the full portal. We are using Theme-Cosmos UI in our application.

Any pointers would be greatly helpful!

Thanks,

Vignesh.

@Vignesh Amarnathan

:warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

Based on your description and the fact that you’re using Theme-Cosmos UI, I have several recommendations that should help resolve your issue:

Solution 1: Using pyMobileSnapStart with Full Portal Parameter

The most direct solution is to use the pyMobileSnapStart activity with the pyShowFullPortal parameter set to true. This parameter is crucial for Theme-Cosmos UI since it’s based on Ajax containers that require the full portal for proper functioning.

Here’s an example URL structure:

[https://[hostname]/prweb/PRAuth/app/[appname]_?pyActivity=pyMobileSnapStart&Action=showHarness&className=[classname]&Purpose=[HarnessName]&pyShowFullPortal=true](https://[hostname]/prweb/PRAuth/app/%5bappname%5d_?pyActivity=pyMobileSnapStart&Action=showHarness&className=%5bclassname%5d&Purpose=%5bHarnessName%5d&pyShowFullPortal=true)

Replace the bracketed values with your specific application details:

  • [hostname]: Your Pega instance hostname
  • [appname]: Your application name
  • [classname]: The class name of the landing page
  • [HarnessName]: The harness name you want to display

Solution 2: Additional Parameter for React-Based UI

If Solution 1 doesn’t work, you may need to add another parameter: Param.pxUseDXapi=true. This ensures the application settings are correctly configured for React-based UI, which is essential for Theme-Cosmos UI.

Your URL would then look like:

[https://[hostname]/prweb/PRAuth/app/[appname]_?pyActivity=pyMobileSnapStart&Action=showHarness&className=[classname]&Purpose=[HarnessName]&pyShowFullPortal=true&Param.pxUseDXapi=true](https://[hostname]/prweb/PRAuth/app/%5bappname%5d_?pyActivity=pyMobileSnapStart&Action=showHarness&className=%5bclassname%5d&Purpose=%5bHarnessName%5d&pyShowFullPortal=true&Param.pxUseDXapi=true)

Solution 3: Configure URL Mappings (For a More User-Friendly URL)

For a cleaner, more user-friendly URL, you can configure URL mappings in your application:

  1. In Dev Studio, navigate to Records → Technical → URL Mappings
  2. Add a new URL alias (e.g., “/portal/landingpage”)
  3. Configure a supportive activity that handles the redirection to your specific landing page
  4. Override the pyIsAutoGenThread when rule if necessary
  5. Save as the Default rule in your application ruleset

This would allow you to use a simpler URL like:

[https://[hostname]/prweb/[appname]/portal/landingpage](https://[hostname]/prweb/%5bappname%5d/portal/landingpage)

Post-Authentication Considerations

Since you mentioned this URL is used in an external application and called post-authentication, ensure that:

  1. The authentication flow is properly completed before attempting to navigate to the landing page
  2. If using SSO, make sure the original request URL is preserved after authentication completes
  3. Check that the user has appropriate permissions to access the landing page

Troubleshooting Tips

If you’re still experiencing issues:

  • Verify in your application settings that under Advanced → UI Runtime, “React-Based UI” is selected or “Enable React-based landing page” is enabled
  • Check browser console for any errors during the navigation attempt
  • Ensure all required parameters are correctly URL-encoded
  • Test the URL directly in a browser where you’re already authenticated to isolate any authentication-related issues

References:
How to open a Harness with in Cosmos User portal using a direct link?
Theme-Cosmos: Open work object in Full portal on Copy sharable Link
Theme-Cosmos: Configure URL Mapping

@Vignesh Amarnathan To configure a URL that directly opens a specific landing page in the user portal from an external application in Theme-Cosmos, you should use the pzHarnessURL format with query parameters like pyActivity=OpenDefaults, portal, and harnessName. A sample URL could look like: https://<yourdomain>/prweb/PRServlet?pyActivity=OpenDefaults&portal=UserPortal&harnessName=YourLandingPageName. However, for full portal context (menus, navigation, etc.), it’s best to use a deep link with the correct authentication and redirection setup. You can try configuring a Web-Login redirect rule to set up a custom activity that uses ShowDesktop or DisplaySelectedPortal and sets the correct pyStartPage parameter.

@Sairohith , Thanks a lot for the suggestions. Let me try implementing the same.

Thanks,

Vignesh.