Add rules to a search topic

Search topics consist of one or more search rules and define the data that's available for your analysis. You can add an unlimited number of rules to a search topic. Each rule selects posts that will be available for the analysis of the data set. You can update your search topics at any time and add more rules or change existing ones.

Social Engagement supports the following search rules. You need to be a Social Engagement Administrator or Power Analyst to create or modify search topics.

Tip

This topic is part of a walkthrough about how to set up searches. More information: Set up searches to listen to social media conversations

Add a rule to a search topic

To enable searches and collect posts, add one or more rules to a search topic.

Important

Your keywords, inclusions, and exclusions can extend up to 128 characters. You can add up to 15 keywords and inclusions per search rule and up to 25 exclusions per search rule.

Adding a rule usually leads to more posts resulting from your searches. The increased number of posts will count against your post quota. You'll need to validate every search topic that you changed before you can save it. It's a good idea to frequently review the results of a new or updated search topic to confirm that it collects relevant data and complies with your quota limits. More information: Manage your post quota

Add a new rule

  1. Go to Search Setup.

  2. In the list of search topics, select the search topic to add a rule to.

  3. Click Add rule (Add button) to open the Add Rule pane.

  4. Select the rule type that you want to add.

  5. Define the values as required for the new rule.

  6. Click Continue in the Add Rule pane to add the rule to the search topic.

    Important

    The solution checks the quota availability for the new rule and prompts you accordingly. If your quota can't accommodate the new rule, you can't save it.

  7. In the search topic pane, click Save (Save button) to activate your search topic, or click Add to add another rule to your topic.

    More information: Download the eBook

Add a keywords rule

Create rules from keywords, inclusions, and exclusions, and define the sources and languages that you want the rule to search on. This is the most common way to define a rule in a search topic, and it usually results in a large number of posts.

Add a new keywords rule

  1. Go to Search Setup.

  2. Select the search topic that you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click Keywords rule.

  5. Enter the keywords; select the inclusions, exclusions, and the filters that you want to use when searching for posts.

  6. Select Continue in the Add Rule pane to add the rule to the search topic.

    Important

    The solution checks the quota availability for the new rule and prompts you accordingly. If your quota can't accommodate the new rule, you can't save it.

  7. In the search topic pane, click Save (Save button) to activate your rule.

Add keywords to search for

Keywords define the terms and phrases to listen for. Keywords are exact but not case-sensitive. We recommend that you include variations of keywords. For example, if your keyword is phone and the term that appears in a post is phones, your result won't be selected by the search rule and the result won't show up in your analysis. For each keyword, the comma serves as an OR. If you add more than one search term, your search rule looks for at least one of the listed terms. To increase the likelihood of getting the results you want, think about adding acronyms and common contractions.

It's important to review keywords regularly. If your keywords yield too many results, consider narrowing the search rule by adding inclusions and exclusions, or reducing the number of keywords.

More information: Refine your search rules

For example, let's assume that you want to listen to posts about a product that Contoso manufactures. You could add the keywords to a search rule like this: Product name, #prodname, Name of the product. All posts that mention one of these keywords will result from the search rule.

Add inclusions to a keywords rule

Narrow your search so that you get a much higher quality selection of posts. Think of inclusions as the word AND. Your search will be filtered so that posts are selected only if they contain at least one of the keywords and at least one of the inclusions. Inclusions aren't case-sensitive.

When listening to posts about a product, you want to make sure that posts relate to a product in the manufacturer's portfolio. Consider adding different spellings of the brand or company name. For example, to find posts that mention Contoso's product you might add something like this to the inclusions: #contoso, Contoso, @contoso. All posts that mention one of the keywords and one of the inclusions are now found by this search rule.

When you set up your search rule, you can choose from the following options to decide how close a keyword and an inclusion must appear in a post:

  • Sentence: Keywords and inclusions must appear in the same sentence.

  • Paragraph: Keywords and inclusions must appear in the same paragraph.

  • Post: Keywords and inclusions must appear in the same post.

It's a good idea to start with the default option (Paragraph). If your search topic yields too many irrelevant results, narrow it by selecting the Sentence option. Note that this may also remove relevant posts because all combinations of inclusions and keywords outside of a sentence will no longer be picked up by the keywords rule.

Inclusions are a great way to reduce the number of posts resulting from your search and make sure you stay within your quota.

Exclude terms from a keywords rule

Sometimes a specific word or phrase can overwhelm your results with irrelevant posts. With exclusions, you can narrow your searches and improve your results. Enter the terms to exclude, separate them by commas, and your searches will ignore posts that contain those terms. Exclusions aren't case-sensitive. For every term that you add to the exclusions, your search will be filtered so that no post will be selected if it matches one of the keywords but contains any of your exclusions. Think of exclusions as the words AND NOT.

For example, let's assume that you're not interested in discounts or offers around Contoso's product. To avoid results that contain either discounts or offers, add those terms to the search rule's exclusions. All posts that mention at least one of the exclusions in the same post as a keyword will no longer be included in the results from this rule.

To exclude multiple terms, the exclusions must be added to the same search rule. If one rule searches for Contoso while excluding discounts and another rule searches for Contoso while excluding offers, the search topic will only exclude all posts mentioning Contoso that contain both discounts and offers. If the rule searches for Contoso while excluding discounts, offers, the search topic will exclude all posts mentioning Contoso that contain either discounts or offers, which is what you want.

Tip

You can exclude terms from all active search rules in one step by adding a term to the list of blocked content. More information: Manage the quality of your search results

Exclusions are a great way to reduce the number of posts that result from your search and make sure you stay within your post quota. However, you should choose your exclusions carefully to avoid missing relevant posts.

Handle special characters in keywords, inclusions, and exclusions

Exact searches are critical to successful social listening. Special characters are often used in brand or product names in the form of connectors. Social Engagement interprets the special characters +, &, /, and - as separate entities in a search rule.

For example, searching for the term City Power & Light will result in posts that mention this term with all combinations of white space. Posts that contain any of the following terms (not case-sensitive) will be picked up by the search:

  • City Power & Light (white space before and after the special character)

  • City Power& Light (white space after the special character)

  • City Power &Light (white space before the special character)

  • City Power&Light (no white space before or after the special character)

Additional special characters

Authors on Twitter and Instagram regularly use #hashtags and @mentions. Twitter authors also will use $stocktweets. Use those special characters if you want to search explicitly for #hashtags, $stocktweets, or @mentions. Social Engagement interprets those terms as unique entities when added to a search rule.

For example, searching for the term #contoso will only find results that contain the exact match of the hashtag.

Limitations on topic names, keywords, inclusions, and exclusions

Although you can create an unlimited number of search rules per search topic, there are limits on the length and number of terms:

  • Maximum length, in characters, of search topic names: 35

  • Maximum length, in characters, per keyword, inclusion, or exclusion: 128

  • Maximum number of keywords per search rule: 15

  • Maximum number of inclusions per search rule: 15

  • Maximum number of exclusions per search rule: 25

Add a Facebook pages rule

Keep track of all conversations that happen on a Facebook page. Usually, you follow conversations on a Facebook page in full context and don't only look at specific posts. If you add a Facebook page to a search topic, you can make sure that all posts on the Facebook page (such as posts from the audience and the page, or comments from the page and the audience) are captured for further processing in Social Engagement.

Add a new Facebook pages rule

  1. Go to Search Setup.

  2. Select the search topic that you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click Facebook pages rule.

  5. In the input field, enter a Facebook page URL or search for a Facebook page with a keyword.

  6. In the list of results, select the Facebook page to add.

    or

    Select a Facebook page from the social profiles that you added.

    Note

    You can also add multiple Facebook profiles or pages to a rule in one step by clicking Add (Add button) next to each page.

  7. Click Continue in the Add Rule pane to add the rule to the search topic.

  8. In the search topic pane, click Save (Save button) to activate your rule.

Add a Twitter rule

Follow conversations on Twitter, and add a Twitter rule to see tweets, mentions, replies, or retweets in a search topic.

Add a new Twitter rule

  1. Go to Search Setup.

  2. Select the search topic you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click Twitter rule.

  5. In the search field, enter the Twitter @username that you want to track.

    If you don't have a Twitter profile added to your social profiles, you need to sign in to Twitter first to perform searches on Twitter.

  6. In the list of results, select the Twitter profile to add.

    or

    Select a Twitter profile from social profiles that have already been added. More information: Manage social profiles

    Note

    You can also add multiple Twitter profiles to a rule in one step by clicking Add (Add button) next to each profile.

  7. Select the message types that you want to add to this rule.

  8. Click Continue in the Add Rule pane to add the rule to the search topic.

  9. In the search topic pane, click Save (Save button) to activate your rule.

Add an Instagram rule

Create rules to gather posts from Instagram accounts.

  1. Go to Search Setup.

  2. Select the search topic you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click Instagram rule.

  5. In the search field, enter the Instagram @username that you want to track.

    Note

    You can also add multiple Instagram accounts to a rule in one step by clicking Add (Add button) next to each profile.

  6. Click Continue in the Add Rule pane to add the rule to the search topic.

Add a private messages rule

To see the details of private messages that Social Engagement users send or receive on an added social profile, create a private messages rule in a search topic. You can create a private messages rule for every social profile if the owner of the social profile allows the data acquisition of private messages.

Important

If you add a private messages rule, all private messages that were sent to the selected profile are visible in your organization's Social Engagement solution. All users of the solution will be able to see the private messages and their replies if they are sent through Social Engagement.
When you add a new private messages rule, all private messages from the past 14 days get acquired by Social Engagement and thus count toward your monthly post quota.

Add a new private messages rule

  1. Go to Search Setup.

  2. Select the search topic you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click Private messages rule.

  5. Select the social profile for which you want the private messages to be available in Analytics. Keep in mind that you can only choose from social profiles whose owners explicitly allowed data acquisition for private messages.

    Note

    You can also add multiple social profiles to a private messages rule in one step by clicking Add (Add button) next to each profile.

  6. Click Continue in the Add Rule pane to add the rule to the search topic.

  7. In the search topic pane, click Save (Save button) to activate your rule.

Add a custom sources rule

Create rules to gather posts from custom sources. You can also create keyword rules that match keywords in custom source posts. More information: Add a keywords rule

Add a new custom sources rule

  1. Go to Search Setup.

  2. Select the search topic you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click Custom sources rule in the Add Rule pane to add the rule to the search topic.

  5. In the list of results, select a custom source group, and then click Continue.

    Note

    You can also add multiple custom sources to a custom sources rule in one step by clicking Add (Add button) next to each profile.

  6. In the search topic pane, click Save (Save button) to activate your rule.

Add a YouTube rule

Gather video posts and comments from YouTube channels.

Note

After adding a new YouTube rule, it might take several hours until the first videos and comments are acquired. The data acquisition of comments is focused on videos that have had user activity in the last month.

  1. Go to Search Setup.

  2. Select the search topic you want to add the rule to, or create a new search topic.

  3. Under Rules, click Add new rule (Add button) to open the Add Rule page.

  4. Click YouTube rule.

  5. In the search field, enter the YouTube channel name that you want to track or select a YouTube profile from the list.

    Note

    You can also add multiple YouTube channels to a rule in one step by clicking Add (Add button) next to each channel.

  6. Click Continue in the Add Rule pane to add the rule to the search topic.

Add a LinkedIn page rule

Gather posts and comments from LinkedIn Organization Pages that you administer.

  1. Go to Search Setup.

  2. Select the search topic you want to add the rule to, or create a new search topic.

  3. Under Rules, select Add new rule (Add button) to open the Add Rule page.

  4. Select LinkedIn page rule.

  5. Select the LinkedIn Organization Pages you want to keep track of, and then select Add to add them to the search rule.

    Note

    You need to have organization pages added to your social profiles to add them to a rule.

  6. Select Continue in the Add Rule pane to add the rule to the search topic.

  7. In the Search Topic pane, select Save to apply the changes and start data acquisition.

Privacy notices

Microsoft Social Engagement offers hosted online services available to a wide variety of customers and comprises the following social capability components within the software application:

Social Media Monitoring – ability to listen to and monitor publicly available social communications across public and managed networks administered by third parties.

Social Analytics – ability to identify, compute, and project queries related to publicly available documents and posts.

Please note that Microsoft Social Engagement may enable access to third-party services, such as Twitter, Facebook, Tumblr, YouTube, and blogs whose privacy practices may differ from Social Engagement. Your use of such services, and any information you provide to them, is governed by their service-specific privacy statements. When establishing these connections, certain data, such as the search query used to retrieve the Social Content and your IP address, may be shared with those services. You are encouraged to review these other privacy statements. You are also encouraged to review the Microsoft Online Services Terms.

Microsoft Social Engagement stores customer search configurations and data curations in tenant-separated databases (customer data). The customer data is then cached on the server side in an internal application, to allow common retrieval indexing for the sole purpose of maximizing solution performance.
Access to index cached data (customer data) is handled exclusively by the internal application, and does not allow users to access or modify index cached data interactively in the internal application. After a subscription license agreement is terminated, customer index cached data is removed after a period of 180 days, according to our data retention policies.

For every new or changed search topic configuration we run an initial estimation with third-party social content providers to assess the amount of posts we will acquire with your provided search topic configuration. For this purpose your keywords, inclusions, exclusions, and applied language filters will be submitted to third-party social content providers.

Microsoft Social Engagement uses Microsoft Cognitive Services to detect the language of the content in private messages from Twitter and Facebook pages. To detect the language, only the title and content of private messages are sent to Microsoft Cognitive Services. The title and content of private messages are not stored in Microsoft Cognitive Services. Review the privacy statement for Microsoft Cognitive Services here: https://www.microsoft.com/trustcenter/cloudservices/cognitiveservices#privacy

See also

Set up searches to listen to social media conversations
Create or delete a search topic
Manage your post quota
Get started with Social Engagement