I am curious about whether the value of Contant Variable in XO PlatForm can be used depending on the situation or randomly.
I have developed a content variable to be included in each response to classify FAQs. The customer asked if this value could be changed randomly because it was too fixed. If there is a solution, I’d like to know.
The solution to this is that KG has no choice but to randomize from advanced to js code?
I want to help you with this question but don’t understand the desired result. Can you please provide examples of your FAQs and the content variable usage? You can create a script in the Advanced tab to manipulate your variables, so that may be the best approach but I cant be sure without some examples.
I’m currently putting different types of responses for each FAQ into the content variable for each FAQ. For example, it consists of welfare, administration, IT tasks, and Teams-related topics.
For example, if we take Teams as an example: Prompt: How to install Teams Response: We will guide you on the newly introduced MS365 and Teams.
Here is how to install Teams:
PC installation method
Mobile installation method
Uninstalled usage method (web version) …
I have put the first sentence “We will guide you on the newly introduced MS365 and Teams” into the content.faqPreMsg_Teams variable.
So, I have also utilized that variable when giving other Teams responses.
However, I received a request asking if it’s possible for the phrase to come out randomly instead of giving the variable value too fixedly.
You can add message variation by creating alternate messages for the SAME channel. When more than one message exists, the platform will automatically alternate between messages. For Entity and Message nodes, alternate messages might look like this:
Again, they must be created for the same channel. I do not know of a way to alternate Content or Environmental variables, since they are intended to be static. However, you can vary the message text that contains the variable.
Yes, you can vary the response using JS in the advanced tab. Here is an example of a conditional message I created for my bot. It’s not the exact application you need but it shows the basic design elements.
You could create a script that selects from a list of alternate messages and then ‘print’ to display.