Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Agent Escalation Phrases

    Posted 09-11-2025 00:47
    Edited by Ramsha Shaikh 09-11-2025 00:48

    Hi everyone,

    We have an AI bot integrated in one of our Genesys flows and have already enabled agent escalation path handling. However, it doesn't cover all the queries that users type in, especially when phrasing varies.

    The idea is that whenever a user explicitly asks for an agent (e.g., "talk to a real person"), we want that query to bypass the AI model completely and go down a different path straight to an agent.

    Right now, we're handling this in Architect with a long chain of Contains() checks, like:

    Contains(Lower(Slot.user_query), "agent") or Contains(Lower(Slot.user_query), "real person") or Contains(Lower(Slot.user_query), "customer support") ...

    This approach works for exact strings but:

    • It's hard to maintain as the list grows.

    • It misses variations in phrasing (e.g., "speak to human" vs. "connect me to an agent").

    We've tried using NLU intents for escalation before but didn't have a great experience (accuracy issues and false matches created poor user experience). Because of that, we decided to use string matching.

    1. How can I use regex or pattern-based matching directly in Architect instead of "contains"? I tried exploring expressions but didn't find what I was looking for.

    2. Is there a better way to handle escalation phrases so they reliably go to a different path without going through the AI model?

    Any guidance, best practices, or examples would be greatly appreciated!

    Thanks!


    #ArchitectureandDesign

    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------



  • 2.  RE: Agent Escalation Phrases
    Best Answer

    Posted 09-11-2025 13:23

    Hello Ramsha, 

    I want to address both your questions. 

    1. You can use regex in architect by creating a custom regex slot type and here are the steps
      1. Go to NLU > Slots
      2. Click "Add Slot"
      3. Provide the name for the first slot
      4. Under the slot type, select "New ReGex"
      5. Create your regex pattern. 

    An example that you might want to consider is something like the below:

    .*(agent|human|person|representative|support|help desk|speak|talk).*(agent|human|person|representative|support|help desk).*

    This should match variations like "speak to agent", "talk to human", etc. 

    For your second question on how to better handle escalations I have a couple of ideas. 

    A. Built-in Escalation handler, I know we offer built in agent escalation detections systems that you can configure from the bot flow Settings>Event handling menu. This system can use pre-maintained escalation phrases, can be configured to either confirm escalation or bypass confirmations and sets the exit reason to "AgentRequestedByUser" when triggered. 

    B. Hybrid Approach, this uses regex and point A right above. This uses the built in escalation handler for common patterns, you will need to create a regex slot for custom patterns specific to your needs, and this maintains a small lost of high priority exact matches using Contains() for critical phrases. 

    Some best practices notes:

    1. Early Detection: Place the escalation check early in your flow to minimize unnecessary AI processing
    2. Maintenance Strategy:
      1. Keep a log of missed escalation attempts
      2. Regularly review and update your patterns based on actual user interactions
      3. Document all patterns and their purpose
    3. Testing: 
      1. Create a comprehensive test set of various escalation phrases
      2. include negative test cases to ensure your not over-triggering

    Hope this helps!



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: Agent Escalation Phrases

    Posted 09-14-2025 23:47

    Hi Cameron,

    Thank you for the detailed response, I will check this and get back to you with the updates and questions if any 



    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------



  • 4.  RE: Agent Escalation Phrases

    Posted 09-15-2025 00:12

    I have couple of follow up questions:

    1. I created a Regular Expression slot as instructed and tried these patterns but none of them are recognized during testing:

    \b([Aa][Gg][Ee][Nn][Tt]|[Hh][Uu][Mm][Aa][Nn]|[Ss][Uu][Pp][Pp][Oo][Rr][Tt]|[Hh][Ee][Ll][Pp])\b \b(agent|human|support|help)\b .*(agent|human|person|representative|support|help desk|speak|talk).*(agent|human|person|representative|support|help desk).*

    I've tried with and without case-sensitive options, but the slot tester still doesn't highlight matches for simple utterances like "I need an agent" or "talk to a human".

    2. If I use a Regular Expression slot to detect these phrases, how can I decide which path to redirect to inside Architect? Is there a formula or function I can use (for example something that simply returns true if the regex matches) so I can branch the flow in a Decision action?



    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------



  • 5.  RE: Agent Escalation Phrases

    Posted 09-22-2025 02:31

    Hi everyone,

    As a continuation from my previous thread, we decided to give Genesys NLU another try for handling user requests to speak with a human.

    Quick Context:

    I'm working on a Genesys Digital Bot Flow where I need to skip the AI bot and route to an Agent Escalation Task whenever a user expresses a desire to speak with a human (e.g., "I need a live agent," "Talk to support").

    Here's the setup and challenge:

    1. I have an open-ended slot (builtin:any) in my task where the user types their query.

    2. I've created a AgentEscalation intent in Genesys NLU with relevant utterances.

    3. The goal is:

      • If the intent is detected then route to Agent Escalation Task

      • Otherwise then continue with the current bot task

    The problem:

    • In Digital Bot Flows, I don't see any option to directly connect a builtin:any slot to an intent.

    • I also don't see an "Ask for Intent" action or similar mechanism inside the Digital Bot Flow UI.

    • I'm finding it difficult to understand how to set up and attach my intent so that the bot can use it for routing.



    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------



  • 6.  RE: Agent Escalation Phrases

    Posted 09-22-2025 04:57
    Edited by Lars Richter 09-22-2025 04:57

    Hello Ramsha,

    in Digital Bot Flows, each intent is linked to a specific task. For example, the AgentEscalation intent triggers the corresponding AgentEscalation task. When creating an intent, you can either associate it with a new task or connect it to an existing one.

    Instead of the "Ask for intent" action, which is available in regular bot flows, Digital Bot Flows have the "Wait for input" action. The provided input is matched against the defined intents, and if a suitable intent is found, the associated task is called.

    You could also use Genesys built-in agent escalation intent, which you can find in your (Digital) Bot Flow > Settings > Event Handling > Agent Escalation.

    Here is the related resource article: https://help.mypurecloud.com/articles/agent-escalation-in-voice-and-digital-bot-flows/



    ------------------------------
    Lars Richter
    Solution Consultant
    ------------------------------



  • 7.  RE: Agent Escalation Phrases

    Posted 09-22-2025 07:44

    Thank you for the explanation.

    So, if I'm using intents, I need to call the Wait for Input action in order to match the user query against the intents.

    However, with the Wait for Input task, all downstream processes are disabled because the end of the task is End Task.

    Right now, we have a slot that accepts builtin:any for the user query and then performs subsequent operations. With Wait for Input, the task just ends, how can I store this query in a variable, since the query (which may not match an agent intent) still needs to be passed to our AI bot?

    We are already using the Genesys built-in agent escalation intent, but it doesn't cover all variations of user's queries for escalation.



    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------



  • 8.  RE: Agent Escalation Phrases

    Posted 09-22-2025 08:06

    Hello Ramsha,

    the last input from "Ask for..." actions can be retrieved using the built-in variable Session.LastCollectionUtterance (Source: https://help.mypurecloud.com/articles/architect-default-variables/#tab11).

    Best regards



    ------------------------------
    Lars Richter
    Solution Consultant
    ------------------------------



  • 9.  RE: Agent Escalation Phrases

    Posted 09-22-2025 08:20

    Hi Lars,

    Thank you for the prompt response.

    so if I try to summarize because I'm feeling a bit lost:

    1. Define intents and utterances and associate them with a task - this part is clear.

    2. Use Wait for Input to receive user input and detect from the defined intents (step 1).

    3. Use Session.LastCollectionUtterance to retrieve the user's input in order store it in a variable and to perform the next tasks.

    For example:

    • If the user's input is "I need to speak to someone", this should trigger the Agent Escalation task associated with the intent.

    • If the user's input is "How to build a website", this is a valid query that should be passed to the AI Task.

    My question is: how can I implement this decision-making within the flow? I tried using `Session.ActiveIntent` but the value is always empty

    I'm sorry if this is a repeated question, but I'm having trouble piecing the flow together.



    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------



  • 10.  RE: Agent Escalation Phrases

    Posted 09-25-2025 01:19

    We're running into a new issue while testing the Agent Intent and the flow. I was experimenting with "Wait for input" block. However,
    For example, if the user types: 

    "How to build website"

    Genesys NLU is detecting our Agent Intent with a probability of 0.589, so the bot triggers the confirmation message.

    However, this is not what we want. A query like "how to build website" is a normal AI question and should be passed to the AI model, not treated as an escalation request.

    I tried different confidence threshold

    Here's our current configuration:

    • Normal Low: 40

    • Confirmation: 70

    • Normal High: 90

    Expected Behavior:
    Since the confidence score for the above query (0.589) is below the Confirmation threshold (70), I expected this to result in a No Match and allow the query to be handled by AI.

    Actual Behavior:
    The bot still triggers a confirmation message asking the participant to confirm the intent.

    I've tried adjusting these thresholds under User Input > Confidence Threshold, but the behavior remains the same.

    any advice, help, guidance would be really appreciated

    CC: @Lars Richter



    ------------------------------
    Ramsha Shaikh
    Engineer, AI
    ------------------------------