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.
- 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: http://tinyurl.com/h9m2jlj.
Details for the endPointPointURL and the query parameters for the resource that shortens a long URL are set in D_KMApplicationSettings.
If using the TinyURL service, you must request an API Key from the following page: http://www.tiny-url.info/open_api.html.
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 https://developers.google.com/url-shortener
, in the provided KMShortenURL
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.
Published April 12, 2016 — Updated April 15, 2016