Engage Digital | Using search queries

Queries are used to identify message threads that meet certain criteria or to generate notifications when a certain threshold is exceeded.This article will discuss some of the most common search queries and how to use them.
 
Search is based on a ‘visual search’ research form that appears in several places where you can conduct a search of message threads in the platform. For example, you can access the form when you:
  • Create a folder through the Inboxes page under Routing in the left-hand navigation bar
  • Create a notification through the Notifications page under Settings in the left nav bar
Within the form, you can scroll or type to see the list of queries available. The search engine displays a number of filters for each query, such as true or false, or specifying the name of an agent.
View of the search interface populating suggested queries
Several queries can be used together for a single search. When you use several search queries within a single search, only the threads that meet all the criteria are displayed. For example, when you specify both the open_and_assigned and first_content_after queries in a single search, your results will include only those message threads that are currently being processed and that contain content after a specified date. In data query languages such as SQL, this method of searching is also referred to as an ‘AND’ search.
 
Every request can be used by every role in the platform if the role has the Search contents permission. You can check for this permission in the Users > Roles and Permissions section of the interface.
 
The results displayed from a search query are filtered according to the agent’s permissions on the channels.

Building a search query on a page with search query capability

The search query form is available only when you are on a page with search query capability, such as the Inbox page under Agent. You can specify your search query by entering it in the Search bar in the interface. You may also build a search query anywhere you see the Query setting in a configuration page, for example when adding a notification through Settings > Notifications
 
Some queries require you to select a parameter from several options, such as true or false, or a specific agent or team. If the query includes ‘such as’ options, the search will launch once you click on the option to select it. If the query requires only text, you can hit the Enter key on your keyboard at the end of the text to launch the search.
1. Click in the search bar to display the query list.
2. Scroll down to select a query or start typing the query’s name.
3. Click on the query you want to use. 
4. Choose from the options such as true or false, or enter the search text.
5. Launch the query by clicking on an option within the query, or by hitting Enter on your keyboard at the end of the text.

Common search queries

Open and assigned queries

The open_and_assigned queries display the threads containing messages that are (true) or are not (false) currently being worked on by an agent. These include both messages that have been assigned to an agent (through the Engage or Assign buttons), as well as messages deferred by an agent.
 
An agent may choose to defer a message when an immediate resolution is not needed. You can use this query together with the active and assigned queries to get more comprehensive results on messages in both statuses.
  • opened_and_assigned: Displays the threads containing messages that are (true) or are not (false) currently being processed. The threads may have been deferred.
  • opened_and_assigned_to: Displays the threads containing messages that are currently being processed by this agent. The threads may have been deferred by the agent.
  • opened_and_assigned_to_disabled_agent: Displays the threads containing messages that are currently being processed by a disabled agent. A disabled agent is an agent that an administrator has marked as inactive by deselecting the Active checkbox in the agent’s configuration page. The threads may have been deferred by the disabled agent.
  • opened_and_assigned_to_me: Displays the threads containing messages that are (true), or are not (false) currently being processed by the user performing the search query. The threads may have been deferred by the user.
  • opened_and_assigned_to_team: Displays the threads containing messages that are currently being processed by the selected team. The threads may have been deferred.

Active and assigned queries

The active_and_assigned queries display the threads that have (true), or don’t have (false), at least one case open that have not been deferred by an agent. Compared to the open_and_assigned queries, these queries only show threads that are active, currently assigned to an agent.
 
You can use this query together with the ‘open and assigned’ queries to get comprehensive results on messages in both statuses.
  • active_and_assigned: Displays the active threads that contain messages that are (true) or are not (false) being processed and that have not been deferred.
  • active_and_assigned_to: Displays the active threads containing messages that are currently being processed by this agent and have not been deferred.
  • active_and_assigned_to_disabled_agent: Displays the active threads that have (true) or don’t have (false) at least one case open by a disabled agent that have not been deferred.
  • active_and_assigned_to_me: Displays the active threads containing messages that are (true) or not (false) currently being processed by the user performing the search query, and which have not been deferred.
  • active_and_assigned_to_team: Displays the active threads containing messages that are currently being processed by this team and that have not been deferred.

Deferred queries

The deferred queries display the threads containing messages that are currently deferred and assigned.
  • deferred_and_assigned_to: Displays the threads containing messages that are currently deferred and assigned to the selected agent.
  • deferred_and_assigned_to_me: Displays the threads containing messages that are currently deferred and assigned to the user performing the search query.
  • deferred_and_assigned_to_team: Displays the threads containing messages that are currently deferred and assigned to the selected team.

First content queries

First content queries allow you to search threads according to the date of the first message (first content).
  • first_content_after: Displays the threads whose first content was posted after the specified date.
  • first_content_before: Displays the threads whose first content was posted before the specified date.
You must enter the selected date / time manually. Here is a list of sample dates that you can add:
  • yesterday
  • last month
  • 2017-02-03
  • 2017-02-03 14:27:33
  • 2 hours ago
  • 2 weeks ago at 4pm
  • last friday at 20:00
  • 4th day last week
  • dec 25
For more examples of valid dates or times that you can enter, see the Chronic examples on Github.

Last Content Queries

Last content queries allow you to search threads according to the date of the last message (last content). 
  • last_content_after: Displays the threads whose last post was posted after the specified date.
  • last_content_before: Displays the threads whose last post was posted before the specified date. 
You must enter the selected date/time manually. Here is a list of sample dates that you can add:
  • yesterday
  • last month
  • 2017-02-03
  • 2017-02-03 14:27:33
  • 2 hours ago
  • 2 weeks ago at 4pm
  • last friday at 20:00
  • 4th day last week
  • dec 25
For more examples of valid dates or times that you can enter, see the Chronic examples on Github.
© 1999-2022 RingCentral, Inc. Todos os direitos reservados.
Thanks!
We've sent you a link, please check your phone!
Please allow a full minute between phone number submissions.
There was an issue with SMS sending. Please try again. If the issue persists, please contact support.