---
schema_version: "1"
id: d43c40669b4d12bd081004421484d99eec3c6531e66a2b1e1771950bdc4d0a37
title: Automatically Trigger an Action Based on Detected Keywords
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/voice_trigger_action_with_keywords.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.voice_trigger_action_with_keywords.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f70d73f35c6433285b0901a4f7f41a6a0fd86b3c598227b7f36560789406defb
description: Create a Conversation Intelligence rule to trigger an action when a support rep or customer speaks or types a keyword on the phone or in a message. Sample actions include sending notifications to a supervisor and a support rep, displaying recommendations to support reps, and running processes in the background. For example, create an action that recommends that the support rep offer a discount if the support rep says “cancel your service.”
products:
  - Service Cloud
release: "264"
---
# Automatically Trigger an Action Based on Detected Keywords

Create a Conversation Intelligence rule to trigger an action when a support rep or customer speaks or types a keyword on the phone or in a message. Sample actions include sending notifications to a supervisor and a support rep, displaying recommendations to support reps, and running processes in the background. For example, create an action that recommends that the support rep offer a discount if the support rep says “cancel your service.”

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.service_editions_reference.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d20695e56">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d20695e56 ">To create Conversation Intelligence rules: </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d20695e56 ">Customize Application, MAD user, Salesforce Voice Contact Center Admin, or Configure
              LiveMessage</td>

          </tr>
        </tbody>
      </table>

Keyword detection works when the support rep and customer are both on the call or participating in the message. For example, keywords aren’t detected until the support rep answers the inbound call or message.

Conversation Intelligence detects keywords using a case-insensitive, exact match method. For example, if the specified keyword is “Cancel your service,” the action triggers if the support rep says or types, “Are you sure you want to **cancel your service**?” The action doesn’t trigger if the support rep says, “If you cancel the service, this change takes effect immediately.” 

When a keyword is matched, the recordId and a list of matched keywords are passed to the Next Best Action or autolaunched flow. To simplify the scenario where multiple keywords are used to generate a single Next Best Action recommendation or trigger a business process, pass the Conversation Intelligence rule as input to the Recommendation Strategy or autolaunched flow. To use the rule as input, enable the Pass the Conversation Intelligence Rule Name as Input to a Flow release update. 

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/images/icon_tip.png)

Tip To perform keyword matching with multiple conditions or using pattern matching for a contact center with Amazon Connect telephony, create a rule in Amazon Connect using intelligence signals. See [Taking Action Based on Intelligence Signals](https://help.salesforce.com/s/articleView?id=service.voice_intelligence_take_action_on_signals.htm&release=264.0.0&type=5 "Automate actions based on intelligence signals detected by your telephony system. For example, if your telephony system detects that the customer is unhappy during a support call, Salesforce Voice can show a Next Best Action recommendation. The recommendation can suggest that the support rep offer a 20% discount based on the detected signal and their customer loyalty information.").

1. From Setup, in the Quick Find box, enter Conversation Intelligence Rules, and then select **Conversation Intelligence Rules**.
2. To create a rule, click **New**.
3. Enter the rule details.
4. Select one of these actions.
    
     
    | Action | Description |
    | --- | --- |
    | Update Next Best Action | Recommend the next best action to the service rep. See [Set Up a Next Best Action](https://help.salesforce.com/s/articleView?id=service.voice_conversation_intelligence_nba.htm&release=264.0.0&type=5 "If you created a rule that triggers a next best action, set up an Einstein Next Best Action component to show recommendations to support reps based on keywords during a conversation or intelligence signals from your telephony system. To determine which recommendation to show a support rep, the Next Best Action component evaluates an incoming signal using the predefined action strategies."). |
    | Run Autolaunched Flow | If you choose **Run Autolaunched Flow**, you must select an autolaunched flow. Only active autolaunched flows appear in the selection dropdown. If an autolaunched flow is deactivated or deleted after creating the rule, the flow is removed from the rule. No action is taken until you update the rule with another flow. See [Set Up an Autolaunched Flow](https://help.salesforce.com/s/articleView?id=service.voice_conversation_intelligence_autolaunched_flow_setup.htm&release=264.0.0&type=5 "Use autolaunched flows to run business processes. In this case, use a no-trigger autolaunched flow, which runs in the background and doesn’t require an event to trigger it. To specify when to run the autolaunched flow, define the conditions in the flow."). |
    | Alert Supervisor | Send an alert to the supervisor. |
    | Alert Support Rep and Supervisor | Send an alert to the support rep and the supervisor. |
5. In the Service Channel Instance field, select the service channel.
    
    For matching keywords, you can select a Voice, Enhanced Chat, Facebook Messenger (enhanced only), and WhatsApp (enhanced only) service channel instance.
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/images/icon_tip.png)
    
    Tip This rule applies to this service channel instance only. To use the same NBA recommendation across multiple channels (for example, both voice and web chat), create a separate conversation intelligence rule for each channel pointing to the same Recommendation Strategy flow.
6. To trigger the action based on a keyword:
    1. In the Trigger Type field, select **Matching keyword**.
    2. In the Detect keywords mentioned by field, select **Customer**, **Agent**, or **Either**.
    3. Enter the keywords that trigger the NBA. Use words specific to the NBA that you want to display. Avoid overly general terms that could trigger recommendations in unintended contexts.
        
        ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/images/icon_tip.png)
        
        Tip You can enter up to 25 keywords, where each keyword has a 255-character limit. Keywords don’t support punctuation. Conversation Intelligence ignores punctuation when matching words. 
        
        ![The "Cancel your service" and "close your account" keywords are defined for the rule.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/support/images/voice_intelligence/voice_rule_match_keyword.png)
    4. Save the rule.

#### See Also

- [_Salesforce Help_: Automatically Trigger an Action Based on Detected Keywords](https://help.salesforce.com/s/articleView?id=service.voice_intelligence_take_action_on_signals.htm&release=264.0.0&type=5 "Automate actions based on intelligence signals detected by your telephony system. For example, if your telephony system detects that the customer is unhappy during a support call, Salesforce Voice can show a Next Best Action recommendation. The recommendation can suggest that the support rep offer a 20% discount based on the detected signal and their customer loyalty information.")
- [Pass the Rule Name as Input to a Flow](https://help.salesforce.com/s/articleView?id=service.voice_conversation_intelligence_rule_pass.htm&release=264.0.0&type=5 "To pass a list of keywords to a Next Best Action or autolaunched flow, add an input variable that stores the Conversation Intelligence rule developer name. To use the keywords in a flow, add the input variable to the flow.")