Hi, @Rechelle McConnell,
Yes, it's possible to implement keyword filtering logic in Genesys Cloud to detect unwanted terms in the client's initial message and automatically end the interaction. Here's an enhanced and structured suggestion for this implementation, using native resources such as Data Tables or a variable containing all the words:
Creating a Data Table for Dynamic Keyword Storage:
Create a Data Table in Genesys Cloud (via Admin > Architect > Data Tables) with simple columns, such as "Word" (String type) to store the words or phrases.
This table allows you to add or remove terms over time without altering the flow, ensuring flexibility. For example, start with an initial list and update as needed via API or administrative interface.
Validation at the Beginning of the Bot Flow:
In the Architect Flow (for openmessaging or webmessaging bots), add an initial "Lookup Data Table" action to load the keywords from the table into a flow variable (e.g., Flow.words as a Collection of Strings).
Next, use a conditional expression to check the client's initial message:
Access the message body via Message.Message.Body.
Check if the message contains any words from the list using the case-insensitive Contains() function:
Example expression: Contains(Flow.words, Message.Message.Body, true) (true enables partial search and case-insensitivity).
If the condition returns true, send a custom closing message (e.g., "Thank you for your feedback.") and then perform a "Disconnect" action to end the session.
Simple Alternative with Static Word Set:
If the list is small and fixed, define a flow variable as a String directly in the flow (e.g., Flow.words = "word1, word2, word3")).
Apply the same check with Contains(Flow.words, Message.Message.Body, true).
Best regards,
------------------------------
Alesson Santos
NA
------------------------------