Transformation steps
Overview
Transformation steps change the text of a message before it is delivered. They run last in a pipeline, PII redaction first and Translation after it, so the message that arrives is the finished result of every earlier step.
Both steps keep what they changed: PII redaction keeps the original values and Translation keeps the original text. Both travel with the delivered message as enrichment, so a destination that is allowed to see them can use them.
PII redaction
What it does. Replaces personal details in a message with placeholders, so the destination receives the message without them.
How it works. The step finds personal identifiers in the text, across languages, and replaces each one with a numbered placeholder that says what kind of detail was removed, for example [FULL_NAME_0]. The same value always gets the same placeholder within a message, so a name mentioned three times stays one person, and two different names stay two. The message is still readable and meaning is preserved.
Original:
Hi, I am Jan de Vries, call me on 06 12345678.Delivered:Hi, I am [FULL_NAME_0], call me on [PHONE_NUMBER_0].
Settings. Select the personal identifiers to redact:
| Identifier | Examples |
|---|---|
| Full name | A person's first and last name. |
| Phone number | A mobile or landline number. |
| Email address | An email address. |
| Postal address | A street address. |
| Payment card number | A credit or debit card number. |
| Bank account number | An IBAN or other account number. |
What you will see. The delivered message contains the placeholders. The Explorer shows a Redacted line on the PII redaction step that counts what was replaced by kind, for example Redacted: 2 phone numbers, 1 name, or Nothing detected. It names the kinds, never the values.
The original values. The text of the message is redacted, but the original values are not thrown away. Each redaction is attached to the delivered message as enrichment, with its label, the original value and the placeholder that replaced it. This lets an application that is allowed to handle personal data, such as the one that completes an order, map a placeholder back to the person. Anyone who reads only the message text, such as a support employee in an inbox, sees only the placeholders.
Good to know.
- Because the enrichment carries the original values, treat it as personal data. The transcription endpoint of the History API leaves enrichment out unless you ask for it with
includeEnrichment=true. The pipeline's own record of the run, which is kept in the conversation history, holds the labels and placeholders but not the original values. - Only the types you select are redacted. Anything else in the message is delivered as written.
- Detection is based on context, so it can find names and addresses that follow no fixed pattern. As with any automatic detection, it can miss some values and occasionally mark text that is not personal.
- To mask credentials and secrets rather than personal details, use Data loss prevention.
- Redaction is applied before Translation, so a translation never contains the personal data either.
Translation
What it does. Lets customers and your team each use their own language. Customer messages are translated into your team's language, and replies are translated back.
How it works. The step translates in both directions:
- Messages from the customer are translated from the customer's language into the host language, the language your team or application works in.
- Messages from your side, which are assumed to be written in the host language, are translated into the customer's language.
The customer's language is found in one of two ways:
- Auto detect. The language of each conversation is detected by the Language identification step, which this mode requires. Replies go out in the language the customer has been writing in.
- A fixed language. You choose the customer language yourself. Language identification is not needed, and every customer message is treated as written in that language.
A message that is already in the target language is passed through unchanged. So is a message without any words to translate, such as ??? or a number.
Settings.
| Setting | Description |
|---|---|
| Client language | The language your customers write in: Auto detect, or one of English, Dutch, German, French, Spanish and Italian. |
| Host language | The language your team or application works in. Choose from English, Dutch, German, French, Spanish and Italian. |
For advanced cases, such as an agent who reads a different language per conversation, the host language can also be set through the APIs.
What you will see. The delivered message is the translation, and the original text is attached to it as enrichment. In the Explorer the Translation step shows the languages involved, for example Translated Dutch -> English, or No translation needed when the message was already in the target language.
Good to know.
- Values that earlier steps have put in place are kept as they are: redaction placeholders, masked secrets, neutralised links and extracted entity values are not translated. If one of them cannot be kept intact, the message is delivered untranslated rather than with a gap in it.
- Emails are translated block by block. An email is billed as one translation however many blocks it has.
- Translation is automatic. Names, product terms and very short messages can come out differently than a human translator would choose.
- Language identification is free when the pipeline also contains Translation.