AI Search Results Action parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 01:52 AM
Hi everyone,
I would like to get a url parameter of the search results page and pass it from the search results page to the resulting url when clicking a search result so that this url parameter can be used for further processing on the appropriate portal page.
With the AI Search Results Action I do not see a possibility to apply the url parameter of the search results page to the resulting url.
An alternative would be to store the url parameter in the user session so that it can be picked up at a later stage, but before looking into alternative ways I would like to check here if I am perhaps missing a possibility of AI Search Results Action or perhaps other more convienient ways?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 07:12 AM
Hi Danny,
As long as you can infer what the url should be for a given search result, you can do more complex processing view the search scripted post-processor (that is part of the search application config). I would caution against putting too complex or long running scripts in that area because the scripts need to be run prior to rendering the search results screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 10:25 AM
Hi @Gerard Dwan
I had a similar question, using post processor script I was able to change the title of a single search result card (catalog item) so I am sure the script is actually running.
But I when I am using the:
record.setUrl() function to set a custom redirection URL, nothing is happening and upon clicking the search result card it is still opening the original url i.e. the catalog form.
script I wrote:
record.setUrl("https://...");
return;
I am missing something here? Please advice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 04:06 AM
Hi Gerard,
Thank you for your response. When I use gs.getSession().getUrlOnStack() to get to the session url in a post processing script it will return undefined. Do you know a way to get to the url parameter in a post processing script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 10:28 AM
Hi @Danny Roso within the script to get the instance url can you use the following.