Define routing conditions for Pega Email Bot to carry out automatic actions when
        email content meets these conditions. For example, you can configure the system to create a
        top-level case or route to a work queue based on information detected using natural language
        processing (NLP). For the routing condition, you can use a detected entity, topic,
        sentiment, language, or decisioning result based on text analysis, so that your email bot
        triggers the appropriate action for intelligent routing. 
        Before you begin: 
                - Select a routing processing mode so that the system either triggers only the
                    first action from the top of the list that matches conditions, or every
                        create case and automatic reply action
                    in the list that matches conditions. For more information, see Selecting the routing processing mode.
- Configure the iNLP text analyzer for your email bot to detect a decisioning
                    result in a routing condition. For more information, see, Adding a text analyzer for an email bot.
 
        If a routing condition holds true, the system triggers an action or several
                actions, depending on the routing processing mode that you select. If the email
                content does not meet any of the routing conditions, you can also specify how the
                email bot responds.
            Use the customizable Interaction API for text analytics with your email bot to set up
                routing conditions based on a decisioning result, to determine the outcome of the
                interaction strategy. The pyInteractionDF data flow for the
                Interaction API performs natural language processing through the iNLP text analyzer
                for the email bot and feeds the outcome to the interaction strategy. The system
                captures the strategy outcome in the pyDecisionResult property
                for the Data-pxStrategyResult class. For more information, see
                    Customizable Interaction API for text analytics. 
        
        - 
                In the header of Dev Studio, click the name of the application, and then click
                        Channels and interfaces.
            
- 
                In the Current channel interfaces section, click the icon
                    that represents your existing Email channel.
            
- 
                In the Email channel, click the Behavior tab. 
            
- 
                In the Intelligent routing section, click Add
                        condition. 
            
- 
                In the Action list, select an action that you want to
                    run automatically in email routing. 
                For example: Route to work queue 
- 
                In the Value field, enter an email template, case name,
                    operator, or work queue. 
                For example: For the Route to work queue action, enter the name
                    of a work queue: Sales requests. 
- 
                Define the validation conditions for a field on the form:
                
| Choices | Actions | 
|---|
 
                        | Detect an entity - a word or phrase in an email | 
                                In the list of fields, select , and an entity name, for example:
                                        #Email.In the comparator list, select the test that you want to perform
                                    on the field, for example: Is equal. In the value field, enter a value to compare against the user
                                    input, for example: [email protected]. |  
                        | Detect the topic - the subject matter of an email | 
                                In the list of fields, select .In the comparator list, select the test that you want to perform
                                    on the field, for example: Is equal. In the value field, enter a value to compare against the user
                                    input, for example: Insurance Quote. |  
                        | Detect a decisioning result - the outcome of the interaction
                            strategy | 
                                In the list of fields, select .In the comparator list, select the test that you want to perform
                                    on the field, for example: Is equal. In the value field, enter a value to compare against the user
                                    input. The email bot can check whether the decisioning result is empty, is
                                not empty, or contains a specified value as the outcome of the
                                interaction strategy, for example, a postal code, or a company or
                                product name. For more information, see Customizable Interaction API for text analytics. |  
                        | Detect the positive, negative, or neutral sentiment of an
                            email | 
                                In the list of fields, select .In the comparator list, select the test that you want to perform
                                    on the field, for example: Is equal. In the value list, select what sentiment to compare against the
                                    user input, for example: Positive. |  
                        | Detect the language of an email | 
                                In the list of fields, select .In the comparator list, select the test that you want to perform
                                    on the field, for example: Is equal. In the value list, select a language to compare against the user
                                    input, for example: French. |  
 For example: To route an email to a work queue when the email bot detects the language
                    of the email, select  from the list, set the Is equal
                    comparator, and then select French from the value field.
                    When the email bot receives an email that is in the French language, the email
                    is automatically routed to the French Sales requests work
                    queue. 
- Optional: 
                To add more automatic responses based on NLP text analysis, repeat step 4 through 7 for other routing conditions. 
                You can also add an automatic response based on an email header content or a
                    when rule. 
- Optional: 
                 To specify how your email bot responds when you do not define any criteria or
                    when the email content does not meet any of the criteria, define the default
                    action:
                
                    - 
                        In the Otherwise area, in the
                                Action list, click an action to perform.
                        
                    
- 
                        In the Value field, enter an email template,
                            case name, operator name, or work queue. 
                    
 
- 
                Click Save.
            
What to do next: Verify that the email routing conditions work as expected. For more information,
            see Testing email routing conditions.