I have recently been experimenting with Microsoft’s new Omnichannel for Customer Service. This fantastic tool gives us webchat (and much more) within Dynamics 365. One really useful feature is the ability to “mask” data. In this post I will explain this feature.

Imagine your contact centre agents are chatting with customers using Omnichannel for Customer Service, in these regulated times you may find compliance rules exist around the storage of sensitive information such as credit card numbers. You will probably have rules around not storing this information.

It is probably true that you won’t want to collect sensitive information like credit card numbers via web chat. But I have still had a requirement around this! My customer has found that whilst you don’t want to collect sensitive data in web chat you can’t control what the customer says. And if customers happen to supply sensitive information this creates an admin task to firstly spot this and secondly remove this data. It would be much better to stop this data being captured in the first place!

Another requirement for data masking might be removing abusive comments from customers. Not all customers are nice people! Some may feel it is appropriate to vent their frustrations and might swear at your hard working agents. Wouldn’t it be great if you could detect certain keywords and simply remove them from chat transcipts?

Omnichannel for Customer service allows data matching patterns to be masked. Lets look at how;

Step One – Create some masking patterns

If you open the Omnichannel Administration app, you should be able to find a “Data Masking Settings” option within the Settings area.

In here you can create, edit and test your masking rules.

Out of the box will find three example masking rules. Credit cards, emails and Social Security Numbers (SSN).

Tip:
Whilst I did have three example rules they were all inactive by default. Meaning to enable the rules I needed to activate them.

FYI: I believe there is currently a limit of 10 masking rules.

I decided to complete a simple test by creating a rule for myself from scratch. So I decided to work out how I would create a rule to mask all of the “bad” words a customer might say.

You can see below that I clicked “new” and then created a regular expression to match against. (ok, my words aren’t that bad but you didn’t want me to say #### or ####!!)

A regular expression is essentially the JavaScript pattern to apply to text being entered into the chat window. They might look slightly technical but they aren’t that hard. You can find out more about regular expressions here.

My expression is simply looking for anyone of a list of words. Including offensive phrases like “Poo” and “bottom”.

Step Two – Test

Having created my mask wanted to test it. You can do that right on the masking rule form. You can see below that I have typed a phrase in the “enter test data” field.

Notice that the test result return a “#” character in place of anything that matched the rule. But did allow anything not in my phrase. (Such as the word “is” below.)

Step Three – Wait

I needed to wait! Changes in the omnichannel administration can take 15 minutes to take effect. Actually in my example I had to wait a little longer than that. So be patient and give the magic plenty of time to happen.

End Result

Now when I customers chat with me the masking rules are applied. You can see the chat window my customer would be using below, this customer decided to volunteer their credit card number. But the matching rules spotted this and replaced it with “#” characters.

Tip: Actually I found that the out of the rule worked but if I added spaces then it didn’t mask the number. So maybe you’d want to create an extra rule with spaces!

Back in Dynamics you can see that the agent also only sees #. Importantly if you look at the chat transcript after finishing the conversation that also only shows the “#” character. So none of this data has been passed to the agent or stored in the database. And therefore any compliance requirements should have been satisfied.

Next I tested the reverse. What if my agent said something inappropriate to the customer?? Well below you can see that the customer’s comments have “#” as their abuse is masked. But what the agent says is not filtered in this way.

I guess it is ok for the agent to swear at the customer! (Or maybe we are assuming agents are well trained and would never do such a thing!)


Something I spotted was that the sentiment analysis isn’t effected by the masking. The customer might make some REALLY negative comments but if the words are masked any sentiment analysis does not get applied. So phrases like “You ###in ####” but not register as negative sentiment. I guess this makes sense as the masking has stopped the data being stored therefore it isn’t available for sentiment analysis.

One limitation is that currently we can only use the “#” character as the mask character. The field to change the character is read-only. But as the field exists maybe this suggests we’ll be able to change it in the future.

This is a simple feature but one that I’ve found interesting and useful. If you are using Omnichannel for Customer Service I hope you do also. If not #### ###!!