This content has been archived.

Shortening URL configurations

Customer Service Representatives (CSRs) who are responsible for social media responses can insert a shortened Knowledge Management article URL in a social media response. Pegasystems uses the TinyURL™ service to get a short URL, which is specified in the PegaFW-KM-Admin-ApplicationSetting.pyDefault data transform.

The activity KMShortenURL, which is present in @baseclass of a PegaKM ruleset, shortens a long URL. Its input is longURL and output is shortURL. It starts a connector for a RESTful connection with the endPointURL using the Connect-REST method.

Fields in the Method Parameters section

For example:

  • A longURL sent to the KMShortenURL activity is: http://IPAddress:port/prweb/PRServletCustom/!STANDARD?KMHelpSiteName=Sample&FromWSS=true&ArticleID=KC-43.
  • The shortened URL that is generated is:

Details for the endPointPointURL and the query parameters for the resource that shortens a long URL are set in D_KMApplicationSettings.

Data Transform fields

If using the TinyURL service, you must request an API Key from the following page:

The API Key is required in line 34 of the data transform, KMShortEndPointURLApiKey.

The TinyURL service is for personal, educational, and non-commercial use only. You can license and configure other URL shortener services, such as the Google URL Shortener, in the provided KMShortenURL rules.

The REST connector, KMShortenURL, connects to the resource specified in .KMShortEndPointURL in D_KMApplicationSettings. The returned URL from the REST service is stored in the .KMShortURL property in the primary page of clipboard. The GET request parameters can vary depending on the endPointURL resource that is specified in D_KMApplicationSettings.

The GET Request method request and Response method are displayed in the following images.

Request method

Request method

Response method

Response method

Have a question? Get answers now.

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