# Search contacts & chat history

### Function Introduction

The Inbox has added a new search function to help customer service staff quickly locate historical conversations and contact information. It supports two search modes:

* **Global Search**: Search across all conversations and contacts
* **Search within conversation**: Search historical messages in the currently open single conversation

### 1. Global Search (Web)

#### Entrance

Click the search icon at the top of the left contact list to expand the search box.

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FjRxRDoCyx8CU37wwFzuN%2F1.png?alt=media&#x26;token=d8d0d1b3-71d6-4f72-9ef8-826dcf90acaa" alt=""><figcaption></figcaption></figure>

#### Contact Search

By default, it enters the \<Contact> tab.**Support Search:**

* Contact Name (Fuzzy Search, Case-Insensitive)
* Contact phone number (exact match)

**Result card includes:** avatar initials, name, phone number, last message preview, message time, and associated Agent

**Click Result:** Directly jump to the corresponding conversation.

**New Conversation:** Regardless of whether the search results are empty or not, the page always displays the "+ Create a new conversation" button. After clicking it, the new conversation pop-up window will open, and the entered number will be automatically filled in.

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2F5qPtJcS6W9D2bHlp2wYy%2Fcontact.png?alt=media&#x26;token=54ad6925-a793-4a87-ba95-ac4c4225299c" alt=""><figcaption></figcaption></figure>

#### Message Search

Click the "Messages" tab to switch to message search.**Note: After switching tabs, the content of the input box will be automatically cleared.Support Search:**

* Text message content
* Text part of the graphic message

**Search time range:** By default, it supports message records from the last 1 year.**Filter Criteria:**

* **Agent**: Supports fuzzy search, multiple selection available
* **Time**: Select the start time and end time

**The result card includes:** sender's avatar initials, sender's name, contact information, message content snippet (keyword highlighted), message time

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FBaYwF5tPEJXr25FOb3LC%2Fmessage.png?alt=media&#x26;token=229ed905-97b4-4b99-a1ad-93a9863786af" alt=""><figcaption></figcaption></figure>

**Click Result:**

* Click on the conversation title row: Expand or collapse the message list under this conversation
* Click the "Jump" button: Jump to the corresponding conversation
* Click on the right side of a specific message row: A preview panel will pop up, displaying the context within 24 hours before and after that message
* Click the "Jump" button of a specific message: Jump to the position of that message in the corresponding conversation, where the message will be highlighted for 2 seconds and then disappear

#### Close Search

Click the Clear button to close the search box and restore the original state of the contact list.

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FnDF5ePP5G1dD0Wc9nn3v%2Fpreview.png?alt=media&#x26;token=8b949353-5ce6-4f42-a212-d7b3ed2ef388" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2F8G6mIWNBJssh21GAZGn5%2Fconversation%E5%AE%9A%E4%BD%8D.png?alt=media&#x26;token=182bbb87-b17f-4cd8-8479-4b1d79cfa880" alt=""><figcaption></figcaption></figure>

### 2. In-conversation Search (Web)

#### Entrance

After opening any conversation, click the search icon (located to the left of the close button) at the top right of the conversation details area on the right.

#### Usage

1. Click the search icon to expand the search box
2. Enter keywords, and the system will search in the historical messages of the current session in real time
3. When hovering over a message in the search results list, a background color is displayed
4. Click on a message, and it will automatically jump and scroll to the position of that message

**Search Scope:** All historical messages within the current conversation (including messages sent by both the customer service and the client)

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FehsPT3I9KkZVnUyvuck3%2F%E4%BC%9A%E8%AF%9D%E5%86%85%E6%90%9C%E7%B4%A2.png?alt=media&#x26;token=72fb248c-9761-49f8-84f6-75b55df52799" alt=""><figcaption></figcaption></figure>

**Filter Criteria:**

* **Agent / Contact**: Dropdown multi-select, can filter message records by sender
* **Time**: Select the start time and end time

**Highlight Rules:**

* Currently selected item in the result list: gray background
* Keywords matched in the list: marked in bold or special color
* Matching items within the dialog box: highlighted in light yellow

**When there are no results:** Display a no-results prompt, keep the search box open, and allow users to continue modifying keywords.

### 3. Mobile Search

#### Global Search

1. Click the search button, and by default, it will enter the "Contacts" search
2. Click the toggle button to switch between "Contacts" and "Messages"
3. Message search only supports fuzzy search of chat content, **not** filtering by Agent or time
4. Search time range is consistent with the web version (last 1 year)

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FltsK23yq6ebeMH27AiVg%2Fmobile_1_3_4_1920x1080_masked.png?alt=media&#x26;token=115052ce-358f-4551-ad92-2224505f6b58" alt=""><figcaption></figcaption></figure>

#### In-conversation Search

1. Enter the Conversation Details Page (Details)
2. Click the 「Search chat history」 button to enter the search page
3. Enter keywords to search the content of the current session
4. Click "Cancel" to return to the details page

   <figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FsTHzmxh2PgfEhlgJrFDc%2F%E7%A7%BB%E5%8A%A8%E7%AB%AF%20final.png?alt=media&#x26;token=5dc73854-346a-41f1-aaf2-4e1408e5ea52" alt="" width="188"><figcaption></figcaption></figure>

### Frequently Asked Questions

**Q: How many characters need to be entered at least to trigger a search?**&#x20;

A: Entering 1 character is sufficient to trigger a real-time search.

**Q: How far back can message search go?**&#x20;

A: The global search feature supports message records from the past 1 year, and the page will display corresponding prompts. Message search within a conversation has no time limit.

**Q: Which fields does contact search support?**&#x20;

A: It supports contact name (fuzzy search) and phone number (exact match).

**Q: What content types does message search support?**&#x20;

A: It supports plain text messages and the text part of image-text messages. Image content does not currently support search.

**Q: After switching the contact/message tab, will the previously entered content still be there?**&#x20;

A: No. After switching tabs, the content in the input box will be automatically cleared, and you need to re-enter the keywords.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpdocs.ycloud.com/help-center/inbox/search-contacts-and-chat-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
