Understand filter operators
Last Update: Oct 2024 • Est. Read Time: 8 MINIn Kustomer, you can use filters on your data to help you narrow down the exact information you want to see or use. With filters, you can determine whether an object matches your defined criteria and then perform an action, such as:
- Send a satisfaction survey when a conversation is marked done.
- Run a business rule when an email conversation is updated.
- Route a conversation from a VIP customer to the appropriate team.
In this article
The following operators are available:
- After
- Before
- Changed From
- Contains
- Does Not Contain
- Contains Any Of
- Does Not Contain Any Of
- During Business Schedule
- Outside Business Schedule
- Is Equal To
- Does Not Equal
- Is Greater Than or Equals
- Is Less Than or Equals
- Is One Of
- Is Not One Of
- Is Set
- Is Not Set
- On or After
- On or Before
- Is Within
- Starts With
Choose a condition
The first step in creating filter criteria is to decide the type of condition you want to use.
The following conditions are available:
- Match All of the Following provides you with "And" functionality. Choose this option when you want all of the criteria in this filter to be met. Selecting this type of condition will narrow the type of data you retrieve and help to hone in on one very specific thing. For example, if you want to look at the status of recently created conversations, and don't want all channels included in the data set, you can set this filter value to “equals email”.
- Match Any of the Following provides you with "Or" functionality. Choose this option when you have multiple criteria for this rule, and at least one condition has to be met. This type of condition can be useful for finding data when you're not sure which term will be used from a known list. For example, you can use this condition to build a report of all custom objects where you input a list of 10 order numbers using OR conditions.
You can create filter criteria using both Match All and Match Any conditions. If you create conditions using both, all of the criteria set in Match All must be true and any criteria in Match Any can be true. In this example, you can both conditions to find email conversations for a specific customer that contains the word "refund" in either the message subject or body.
Available filter operators
Operators specify how your filter criteria relate to one another. Filters are made up of four parts:
- The object you are filtering on.
- The value you want to filter.
- The operator describes the relationship between the object and the value.
- The criteria you are using to define your results.
For example, this filter will return all Customers (object) whose Name (value) Contains (operator) the word john (criteria), such as John Smith and Mary Johnson.
The list below defines the operators available in Kustomer and provides an example filter for each.
Note: The available operators change based on the value you select to filter.
Use when you want to return results that occurred after the specific date or time interval you entered. You can select to use an Absolute or Relative value in the condition. For example:
- If you select Absolute, the filter Customer Created At After Absolute 03/01/2020 returns all customers that were created in Kustomer after 03/01/2020.
- If you select Relative, the filter Customer Created At After Relative 7 Days Ago returns all customers that were created in the last 7 days.
Note: This operator is only available for datetime values.
Use when you want to return results that occurred before the specific date or time interval you entered. You can select to use an Absolute or Relative value in the condition. For example:
- If you select Absolute, filter Conversation First Response Sent At Before Absolute 03/19/2020 returns all conversations that were first responded to before 03/19/2020.
- If you select Relative, the filter Conversation First Response Sent At Before Relative 8 Hours Ago returns all conversations that were first responded to 8 hours before the present time.
Note: This operator is only available for datetime values.
Use to return results that happened when an attribute changed. For example, the filter Conversation Channel Changed Was Equal To Email to Is Equal To Chat returns all conversations that had the conversation channel changed from email to chat.
Note: This operator is only available for the Conversation object.
Use when you want to return results that include the value in your criteria. The filter Customer Email Contains kustomer returns all results that have the kustomer string value anywhere in their email address, regardless of their user name, such as catherine@kustomer.com and kustomersupport@kustomer.com.
For multi-level lists, the Contains operator returns all of the results that match the value, as well as all of its sub-levels.
You can also use this operator to:
- Return results where the object string includes the criteria string. For example, the filter Conversation Name Contains out of returns all conversations that have Out of Office as the subject line.
- Return results where the criteria array has only one value and it is included in the object string. For example, the filter Conversation Status Contains Open returns all open conversations.
- Return results where the array includes the criteria string. For example, the filter Conversation Channel Contains twitter returns all conversations that have twitter-dm or twitter-tweet as a channel.
Note: The Contains operator is not case-sensitive.
Use when you want to return records that do not include the value in your criteria. For example, the filter Message Subject Does Not Contain refund will return messages that exclude (or don't include) the word "refund" anywhere in the subject line, such as Refund Status.
Note: The Does Not Contain operator supports the same values as Contains.
Use when you want to return results that can include any of the values you entered. For example, the filter Message Subject Contains Any Of out of, autoreply will return all conversations that have either or both of these strings in their message subject lines, such as Out of Office or Autoreply: On Vacation.
Note: The Contains Any Of operator is not case sensitive.
Use when you want to return results that do not include any of the values you entered. For example, the filter Customer Email Does Contain Any Of acme, galaxy, kustomer will not return any results that have acme, galaxy, or kustomer in their email string.
Note: The Does Not Contain Any Of operator is not case sensitive.
Use when you want to return results for events that occur within your organization's office hours, per the Business Schedules Settings.
For example, the filter Message Created At During Business Schedule Tier 3 Support Schedule only returns results where the message is created within the defined business schedule. This could be used in a business rule to send a daytime acknowledgment auto-response message.
Use when you want to return results for events that occur outside of your organization's office hours, per the Business Schedules Settings.
For example, the filter Message Created At Outside Business Schedule Tier 1&2 Support Schedule only returns results where the message is created outside of the defined business schedule. This could be used in a business rule to send an after-hours acknowledgment auto-response message.
Use when you want to return results for an exact match. For example, the filter Company Name is Equal To Acme only returns results where the company name is Acme.
You can also use this operator to:
- Return results where a boolean in the object matches a string. For example, the filter Message Direction Type Is Equal To In returns all inbound messages.
- Return results where the number field in the object matches a string in the criteria. For example, the filter Customer Phone Is Equal To 7181234567 returns the customer whose phone number is 7181234567.
- Return results where the object matches a boolean value. For example, the filter Conversation Ended Is Equal To false returns conversations that are still open.
- Return results where a number field in the object matches the number in the criteria. For example, the filter Customer Avg Sat Score Is Equal To 6 returns all customers that have an average satisfaction score of 6.
- Return results where the array includes the criteria string. For example, the filter Conversation Channel Is Equal To Chat will return a conversation with chat as a channel.
- Return results where the object matches an object value in the criteria. For example, the filter Customer Company Is Equal To 123 Goods will return all customers whose company is 123 Goods.
Use when you want to return results for a specific object that does not match the value in the criteria. For example, the filter Conversation Status Does Not Equal Done returns all conversations that are currently Open or Snoozed.
Use to return results that are equal to or exceed the criteria you entered. For example, the filter Customer Points Is Greater Than or Equals returns all customers that have 20 or more points logged in their profile.
Use to return results that are equal to or less than the criteria you entered. For example, the filter Customer Miles Balance Is Less Than or Equals returns all customers that have 10,000 or fewer miles.
Use to filter a property on a series of exact matches. For example, the filter Conversation Tags Is One Of Exchanges Refunds Returns will return results for all conversations over time, but only for conversations where at least one of the three specified tags is present. You can add up to 20 values in the criteria.
Use if you want to exclude records that contain any one of the specific values defined in the criteria. For example, the filter Conversation Assigned Teams Is Not One Of Chat VIP Team Voice will return results for all conversations over time, and exclude those assigned to the Chat VIP or Voice teams.
Use if you want to return results for a specific value set in an object. For example, the filter Customer Preferred Channel is Set will return results for all customers that have a value set in the Preferred Channel custom attribute.
Note: Values set to false or 0 will return as set.
Use if you want to return results where a specific value is not set in an object. For example, the filter Customer Phone Is Not Set will return all customers who do not have a phone number.
Use to return results that happened on or after the specific date or time interval you entered. You can select to use an Absolute or Relative date value in the condition. For example:
- If you select Absolute, the filter Customer Created At On or After Absolute 03/19/2020 returns all customers that were created in Kustomer on or after 03/19/2020.
- If you select Relative, the filter Customer Created At On or After Relative 3 Months Ago returns all customers that were created in the selected time interval of 3 months before today.
Note: This operator is only available for datetime values.
Use to return results that happened on or before the specific date or time interval you entered. You can select to use an Absolute or Relative value in the condition. For example:
- If you select Absolute, the filter Conversation First Response Sent At On or Before Absolute 03/19/2020 returns all conversations that were first responded to on or before 03/01/2020.
- If you select Relative, the filter Conversation First Response Sent At On or Before Relative 1 Hours Ago returns all conversations that were first responded to 1 hour before the present time.
Note: This operator is only available for datetime values.
For an insight card, use to show additional attributes if a specific list item is selected. For example, filter Cancelation Reason Didn't Use Membership.
Note: This operator is only available for custom attributes with multi-level list data types.
For an insight card, use to show additional attributes that start with a specified set of characters. For example, filter Company Name Starts with Star to show attribute if the company starts with "Star".
Note: This operator is only available for custom string properties, company names, and conversation names.