No result configuration to include chat feature

Hello,

My prospect wants to know if they can customize the no result to direct their users to live in-person chat that they offer during business hours. They understand that we would be using this data to create new entities, however, they also want to make sure they keep the user on-site and leverage their in-person chat in the meantime. Is that possible at all?

Hi Sarah,

for this are you imagining updating the copy to suggest they use the chat feature or are you thinking about something more interactive? Is this the no results on universal search or the no results on vertical search (which currently points you to verticals with results or shows you all results?).

Universal search default no results:

Vertical search default no results:

1 Like

Hi Liz,

Thank you for responding. This would be for the universal search. I would imagine under suggestions just letting the user know to leverage the in person chat feature. Its prominently displayed on the bottom right of the prospects main page anyway.

Yes, we can support that! You can specify your own no results template / text in the config.json file. It would look something like this:

  noResults: {
    // Optional, used to specify a custom template for the no results card, defaults to a built-in template.
    template: '<div> <em>No results found!</em> Try again or use our chat feature by clicking the chat button bellow! </div>',
    // Optional, whether to display all results in the vertical when no results are found. Defaults to false, in which case only the no results card will be shown.
    displayAllResults: false
  },
1 Like

Hey Liz,

Let’s say I want to apply a text banner I’ve already defined in my hbs file

<div class="Answers-alertBanner">Didn't find what you're looking for? <a href="xxxxx">Submit your question here!</a></div>

How do I apply that to the template field in JSON? I’m getting a syntax error when I try to apply it the way you have in the screenshot above. Basically, I have a client that just wants to a display text banner at the top of the page that contains a liink to their member assistance page ONLY if no FAQs are returned. Right now, that alertBanner class I made just sits at the bottom of the page at all times.

Try escaping the quotes with a backlash (\).

      "noResults": {
        "displayAllResults": true, // Optional, whether to display all results in the vertical when no results are found.
        "template": "<div class=\"Answers-alertBanner\">Didn't find what you're looking for? <a href=\"xxxxx\">Submit your question here!</a></div>"
      },
1 Like

Hi Liz,

Thank you so so much! Not sure how I missed this on Thursday but this helps a ton!

That did the trick! Thank you Amani.

Leaving my code here in case anyone finds it useful. (example: at first I didn’t put the template under VerticalResults - so hopefully this steers people clear of my past mistakes)

"VerticalResults": {
  "noResults": {
    "displayAllResults": true, // Optional, whether to display all results in the vertical when no results are found.
    "template": "<div class=\"Answers-noResultsBanner\">No results found in FAQs. <a href=\"url_here\">Submit your question here or view all FAQs below!</a></div>"
  },
  "hideResultsHeader": true
1 Like

Very cool! Where would you put the banner code if you wanted a similar banner on Universal Search instead of vertical for no results?

Hi Ariana,

It currently isn’t possible to customize the no results template on Universal search but it’s on the product roadmap!

Hi Liz,
Sorry to ask but a quick question about this reply you shared.
For the Universal search default no result text, when you say we need to update the config.json file, I am not sure to know which one it is. You mean index.json or any other file? Because I can find this “noResult” part for [vertical].json files but not in the index.json. I tried to add it to test but either it is not supposed to work this way or I was not able to find the correct syntax.
Could you please confirm which file needs this update?
Thanks a lot!!!

Hi @Nicolas_S ,

The ability to customize the No Result behavior on universal is not yet available. I would recommend posting on the idea board!

See here for additional documentation.

Best,
Melissa