Overview
It is not possible to search for specific words or phrases from the macros you created in Kayako using the unified search function. If you want to find specific content or words from macros, you can accomplish the goal by using an API endpoint to retrieve all macros. Once you have the macros retrieved, you may search for the content you want to find.
Prerequisite
- Any agent or admin Kayako user accounts.
- Skills and knowledge of the API (Application Programming Interface).
Solution
-
Log in to Kayako using your agent or admin account.
-
On the same browser, open a new tab.
-
On the new tab, type the GET request API URL endpoint.
- The GET request will look like:
https://domain.kayako.com/api/v1/cases/macros.json
NOTE: Replace the domain in the above URL with your Kayako domain.
- The GET request will look like:
-
Press enter to run the GET request.
Handling API Limits
Keep in mind that there is a limit applied to the API response by default. You can see the limit by looking at the "limit" parameter returned by the API response for https://domain.kayako.com/api/v1/cases/macros.json as seen in the screenshot below.
In the screenshot above, the limit is set to 10. You can also observe in the same response that the parameter "total_count" is 194. This means that there are a total of 194 macros but the result will only return 10.
The next_url on each page gives you the link to view the next 10 and so on and so forth. As it is tedious to keep doing this, you may directly make an API call by explicitly specifying a limit higher than the total_count parameter. In this case, the API call will become https://productlaunchformula.kayako.com/api/v1/cases/macros.json?limit=200.
Confirmation
Running the above endpoint will give you the list of macros created from your instance, as well as their content. If successful, you will receive the "status: 200" at the top of the page followed by the JSON output as shown in the example below.
From there, you can either use CTRL+F to find the words or phrases, or you may also use online converters to convert the output to a CSV file so you can have a clean and nice table view of the result.
NOTE: If you receive an error when running the GET request, go back to Step 3 above and check your API URL endpoint. Also, make sure you are log in to an agent or admin account on the same browser.