Documentation Basics Sensitive data

Sensitive data

Card numbers are hidden from every conversation, and your own patterns can hide, refuse or flag anything else you would rather not keep or send.

Card numbers

When a customer types a payment card number into a conversation, only its last four digits are kept, as in •••• 4242. The full number is never saved, shown to your team, or passed to your bot or any of its steps. Replies from your team and your bot are treated the same way, and so are internal notes, tickets, close notes, descriptions of the files customers send, and comments and mentions on the social accounts you listen to.

This is on for every workspace, on every plan, in UniversalChatbot and UniversalDesk, and cannot be turned off. A number counts as a card number when it has the length and leading digits of a card network (Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay, Verve, Maestro, Mir or RuPay) and passes the check digit cards carry, so phone numbers and most order numbers are left alone. It is found however it is written: in groups split by spaces, dots, dashes, slashes or commas, and in full-width or other digits.

What was hidden cannot be brought back. Ask customers to pay through a payment link rather than in the chat.

Your own patterns

On the UniversalChatbot Business plan you can add patterns of your own. Pick a ready-made one or write a regular expression:

  • Email address
  • Phone number
  • Bank account number (IBAN)
  • Password or PIN, such as password: hunter2
  • Ghana Card number
  • US Social Security number

Each pattern checks messages from customers, replies to customers, or both.

What a match does

Each pattern decides what happens to the text it matches:

  • Mask it: what the pattern matches is replaced with the pattern's name in brackets, such as [Email address], before the message is saved. As with card numbers, the original is never kept and cannot be recovered.
  • Refuse to send, for replies only: the reply is not sent. An agent is told which pattern stopped it and can edit the reply and send it again, or ask for it to be sent as written (see Asking to send a refused reply). A bot reply is replaced with Let me get you to someone on our team. and the conversation goes to your team, as a handoff step would send it. While that team is closed, the customer is told the team's after-hours message instead. A flow's closing message is replaced with Thanks for chatting with us. and the conversation ends as the flow says.
  • Leave it as written: the text is kept. Use this with a flag, to know when something appears without changing it.

Separately, a pattern can flag the message. A flagged message is marked in the inbox with the pattern's name. A pattern can mask and flag at once. Refused replies are always recorded, so they need no flag.

Card numbers are masked, and patterns apply, from the moment they are in place onward. Messages already in a conversation are not changed.

The messaging platform a customer writes on, such as WhatsApp, Intercom, Messenger, Instagram, Telegram or X, keeps its own copy of what the customer sent, under its own terms.

Asking to send a refused reply

Sometimes a refused reply has to go out, such as an account number the customer asked for. The agent chooses Ask to send and says why. The reply stays in the conversation, marked Waiting for approval, and is not sent until someone else approves it. The reason is checked by your patterns too, so a refused value typed into it is not kept.

A supervisor of the conversation's team, a manager or the owner can decide, as long as they have an inbox seat. The agent who asked can never approve their own reply, whatever their role, so when nobody else could decide, asking to send is refused and the agent edits the reply instead. Everyone who can decide gets an alert (see Notifications), and the replies waiting on them are listed under the inbox's Waiting for approval tab.

  • Approve: the reply is sent exactly as the agent wrote it. Nobody can change it on the way. If the conversation went back to the bot or to someone else while the reply waited, approving gives it back to the agent who wrote it first, so the bot is not answering when the reply goes out.
  • Decline: the reply is never sent. It stays in the conversation for your team with what the pattern matched hidden, and the agent who wrote it can rewrite it.

A reply cannot be approved once its conversation is closed, once the agent who wrote it no longer has an inbox seat, or once nobody holds the conversation on a team where conversations are assigned rather than picked up. It can still be declined. While a reply waits, the customer is still waiting for an answer, so the conversation's service targets keep running. Asking to send counts as replying: the conversation is assigned to the agent who asked and the bot stops answering, and on a team where conversations are assigned rather than picked up, an agent can only ask on conversations assigned to them.

Card numbers can never be sent this way. They are hidden before the reply is saved, so an approved reply carries only the last four digits. Bot replies are not held either: they still go to your team as described above.

Each step is recorded in the audit log by the patterns' names, never the reply's text: asking, approving and declining, and any attempt to decide by someone who may not, or on a reply that can no longer be sent. Asking records the reason the agent gave, as it is kept on the reply: with anything your patterns mask or refuse replaced by the pattern's name. Asking to send comes with the UniversalChatbot Business plan, like your own patterns.

A pattern checks each message on its own, so a value split across several replies is not caught.

What your bot can use

Your bot and every one of its steps only ever see the masked text, on every channel: the last four digits of a card number, and the pattern's name in brackets for anything your own patterns mask. That includes its variables and AI steps, and also the steps that look something up, such as a table lookup, list or delete, a call to one of your endpoints, and a condition. A flow that needs to find something by what a pattern masks will not find it, so mask only what your bot never needs to look up.

A reply that is refused leaves no question waiting: the next time the bot answers, it starts the flow from the beginning. When the team the conversation goes to is closed and leaves its conversations to the bot after hours, the customer is told the team's after-hours message instead, and the bot keeps answering.

What is checked

The text of every message on every channel, the caption on a photo or file, what the bot writes down about a file a customer sends (the words of a voice note, the text in an image), and the values an agent fills into a WhatsApp template. Your team's internal notes, ticket titles and updates, close notes and reasons for declining a conversation are checked by card numbers and by every pattern that masks, whichever messages it checks. The files themselves are not changed.

A pattern that takes too long to check a message stops checking it, so a slow pattern never holds a conversation up. In a message from a customer or a note, that pattern is skipped for that text, while card numbers and your other patterns still apply. A reply it cannot decide on is handled as if the pattern matched: a pattern that masks replaces the whole reply with its name, a reply it would refuse is not sent, and a pattern that flags flags the reply. A pattern that is too slow on five messages in a day is switched off, and the people who get your workspace's connection alerts are emailed so someone can fix it. Keep patterns simple so this does not happen.

A pattern that would match empty text, a single space or a line break is refused when you save it, since it would match nearly every message.

Setting up a pattern

In UniversalChatbot, the owner and managers open Settings → Security → Sensitive data. Add a pattern, choose which messages it checks, what happens when it matches and whether to flag it. Add a few sample texts to see what it matches before customers do. Switch a pattern off to stop it without deleting it. A workspace can have up to 25 patterns.

In UniversalChatbot, changes to patterns are recorded in the audit log.

Seeing what happened

Every message with something masked or flagged, every reply refused, and every reply asked to send, approved or declined, is recorded with the patterns' names, never the text they matched. Card numbers are recorded as masked too.

In UniversalChatbot, these records are in the audit log: choose Sensitive data there to see only them.

The report, under Settings → Security → Sensitive data report, adds them up over the last 7, 30 or 90 days: how much was masked, flagged and refused compared with the period before, which patterns matched most, what each agent's own replies matched, and the latest cases with a link to each conversation. It is for the same people who set the patterns.

Talk to sales
This form is running on UniversalChatbot.