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.
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:
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
- Click the Users tab on the left-hand panel.
- Use the 'Name' filter by checking the box next to it.
- Set the condition by selecting the corresponding radio button. In our case, we need the ‘equal to’ condition.
- Review the result on the right-hand panel.
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.
- Launch your API tool or client (e.g., Postman).
-
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.
-
Select the POST method from the drop-down.
-
Write the URL using this pattern:
https://DOMAIN.kayako.com/api/v1/users/filter.json
- Replace
DOMAIN
in the above URL with your Kayako domain.
- Replace
- On the Body tab, select raw and JSON as type.
- 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"}]}]}}
- Click the Send button.
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.
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.
ATLAS
Comments