How do I create a link to a pre-populated answer page?
Customer Portal (CP) end-use page set
Oracle Service Cloud
I would like to link to a list of public answers related to a specific product/category combination or the results based on searching for a specific phrase.
Resolution:In the Customer Portal end-user pages, the basic URL to link to the answer list page is:
To pre-populate fields so that the search results match specific criteria, you can add parameters to the base URL. Additional parameters that can be added are listed below:
- /p/3,15 -- sets the Products fields to the products and sub-products with the numerical value listed. In this case, the top-level product field is set to the product name that has an ID of 3 and the sub-product field is set to the value that has an ID of 15.
To obtain the numerical value to use, open the Products table (from the Service Configuration items) and hover over the product name. Use a comma to separate subsequent values.
- /c/8,25,42 -- sets the Categories fields to the categories and sub-categories that match the numerical values listed. In this case, three category levels are set with the top level corresponding to the category with a numerical ID of 8. The second and third level categories are set to the values with IDs of 25 and 42.
To obtain the numerical value to use, open the Categories table (from the Service Configuration items) and hover over the category name. Use a comma to separate subsequent values.
- kw/word or kw/word1%20word2 -- the kw parameters allows you to set keywords to be searched on when the page opens. To include multiple words separated by a space, use %20 to represent the space. For example, kw/apple%20banana pre-populates the Search by Keyword field with apple banana.
- In Customer Portal framework 3.x.x (CPv3), it is possible to directly link to the sub-product/sub-category.
- In order for pre-populated answer lists to work correctly using the URL extensions the answers.map_prod_hierarchy and answers.map_cat_hierarchy filters are required in the report. The CP pages that call reports against the answers table without these filters will throw an error and the default answer list will display.
Example 1: An example of a URL that links directly to a specific product and sub-product is of the form:
where 5 and 21 are the numerical database IDs for the product and sub-product values.
CPv3 - http://interfacename.custhelp.com/app/answers/list/p/21
Example 2: Similarly, to link to a list of answers that are returned for a keyword search on "staff profile", the URL is:
Example 3: To link to the answers that match a specific category and are returned on a keyword search for "account", the URL is:
where 14 is the numerical database ID for the category of interest.
Additionally when referencing the URL from non-rightnow pages, you should URL encode the commas (replace them with %2C) to ensure you don't run into browser errors. This isn't required but highly recommended.
For Example 1:
In addition, other answers in this knowledgebase address linking to answers and other pages: