Virtual Agent allows users to type emojis

Yasmin
Kilo Guru

Hello, 

We've noticed that after the Rome upgrade, the VA UI is allowing users to type emojis. How does this work with NLU? Are emojis being recognized when typing phrases? Can this be disabled? Appreciate any information on this new feature. 

find_real_file.png

8 REPLIES 8

Those screenshots you shared are from Agent Chat. We are seeing the problem on Virtual Agent. Where can we inactivate emojis from appearing in Virtual Agent?

Hi @Yasmin ,

I think there is no option to disable the emojis. 

But I figured a workaround to reject emojis and request users to type again. I tried this with couple of emojis and it worked. So you can try this and let us know.

Step 1,

Make the input section as custom,

find_real_file.png

 

Step 2,

Add this script,

function validate(value) {

    var strSplit = value.toString().split(''); // split the input value

    for (i = 0; i < strSplit.length; i++) {
        if (strSplit[i].charCodeAt().toString().split('').length > 4) {//check emoji
            var containEmoji = ''
        }
    }

    var isValid = containEmoji === 'yes'

    return {
        valid: isValid,
        error: isValid ? undefined : "Sorry, emoji's are not accepted, kindly type again your query"
    };
}

 

Result:

find_real_file.png

When using charcode the output of emoji is in 5 digits (html entity) and rest all char are max out at 3. So if any char having more than 4 in charcode, I am considering as emoji. 

Also, this can be achieved using RegEx, I am working on that, will post if I am done.

 

Thanks for the question. 

 

 

 

Slightly modified script 

function validate(value) {

    var strSplit = value.toString().split(''); // split the input value

    for (i = 0; i < strSplit.length; i++) {
        if (strSplit[i].charCodeAt().toString().split('').length > 4) {//check emoji
            var containEmoji = 'emojiis'
        }
    }

    var isValid = containEmoji != 'emojiis';

    return {
        valid: isValid,
        error: isValid ? undefined : "Sorry, emoji's are not accepted, kindly type again your query"
    };
}

Hi Murali,

In the agent chat, during conversation. if the user types " 🙂 " it sending as an smile face emoji to the requestor, how can we disable this ? 

We have Emoji Enabled checkbox disabled, but still this is happening.

Do you have any idea how to overcome this issue ? we do not want users to send emoji in any possible way in the chat.