Here you will learn a few ways you can redact PII from your data before you send it to Dashbot's platform

PII Redaction via Redact-PII NPM Library

If you are using redact-pii NPM for integration, and you wish to remove personally identifiable information from the text, please see the steps below.

Install & Initialize Redact-PII

First, add Redact-PII to your project:

npm install redact-pii
const { Redactor } = require('redact-pii');
const redactor = new Redactor();

Redact PII from Your Data

Use Redact-PII to clean text data. The library can remove names, email addresses, phone numbers, social security numbers, and other identifiable information. It works by using predefined and customizable patterns to identify and redact sensitive information:

function redactText(text) {
  return redactor.redact(text);
}

Integrate with Dashbot

Ensure data sent to Dashbot is PII-free by applying the redaction:

const cleanedText = redactText(userMessage);
// Now, send `cleanedText` to Dashbot

PII Redaction via Dashbot NPM library

If you are using the Dashbot NPM for integration, and you wish to remove personally identifiable information from the text, you may set a flag when you include the dashbot NPM. This will enable the redact-pii library prior to sending messages to Dashbot.

Install Dashbot via NPM

npm install --save dashbot

Include Dashbot

Change the inclusion of Dashbot from:

const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY).facebook;

to:

const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY, {"redact":true}).facebook;

The example above is for Facebook bots, make sure to use the appropriate platform call when invoking the Dashbot npm.