Start a conversation

Searching for Short Names by Name Filter Under the Users Tab or via API

Overview

The Unified Search is used in Kayako to run powerful searches in conversations and Help Center. However, the Unified Search has a limitation and requires every search keyword to be at least three characters in length. This is a default functionality of the Unified Search and helps Kayako to produce more accurate search results. But sometimes you need to search for short names like “Ivan G”. This example will not be searchable with a standard Unified Search no matter will you use quotes or not.

 

mceclip0.png

 

This article explains how to avoid this limitation while searching for the users via the Users tab and via API.

Prerequisite

  • To use Unified Search, you need at least a collaborator user account.
  • Skills and knowledge of API (Application Programming Interface) call and API tool or client (e.g., Postman).

Information

Users Tab on UI interface

One of the tabs in the left-hand panel of the Agent area is called the ‘Users’ tab. It contains a number of attributes that you can use as search conditions. In the “Match any” drop-down list you can choose the ‘Match any attribute’ or ‘Match all attributes’ condition, and inside of every attribute you can narrow down a search with a ‘contains\equal to’ radio button.

The list of available filters is the following:

 

mceclip1.png

API endpoint documentation

You can do a partial search by using the API endpoint to retrieve a smart list of users.

 

Solution

Let's take “Ivan G” as an example of the short name to run a search by the Name filter.

Searching for the Users via the Users Tab

  1. Click the Users tab on the left-hand panel.
  2. Use the 'Name' filter by checking the box next to it.
  3. Set the condition by selecting the corresponding radio button. In our case, we need the ‘equal to’ condition.
  4. Review the result on the right-hand panel.

mceclip2.png

 

You can perform other functions under the Users tab like Retrieving User Activity Logs in Kayako.

Searching for the Users via API

NOTE: The following steps were performed using Postman.

  1. Launch your API tool or client (e.g., Postman).
  2. On the Authorization tab, select Basic Auth and add your Kayako credentials.

    NOTES:
    • Specify your Kayako email address and password in the Username and Password text fields.
    • If the user account you are using has two-factor authentication enabled, you need to disable it.
  3. Select the POST method from the drop-down.

  4. Write the URL using this pattern:https://DOMAIN.kayako.com/api/v1/users/filter.json

    • Replace DOMAINin the above URL with your Kayako domain.

      mceclip2.png

  5. On the Body tab, select raw and JSON as type.

    mceclip3.png

  6. Below is a sample JSON body. Copy and Paste the following in the body tab of Postman.
    {"predicates":{"collection_operator":"OR","collections":[{"proposition_operator":"OR","propositions":[{"field":"users.fullname","operator":"comparison_equalto","value":"Ivan G"}]}]}}
  7. Click the Send button.

    mceclip4.png

Confirmation

Running the above endpoint will give you the list of users matching "Ivan G" name, as well as their content. If successful, you will receive the "status: 200" followed by the JSON output as shown in the example below.

 

mceclip5.png

 

NOTE: If you receive an error, it will provide you a link to our developer website to understand what the error means. Check the information you entered to make sure it's accurate and try again.

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted

Comments