They allow you to retain select structure and information from the raw data for different use cases, like sorting alphabetically, common domain analysis or simply allowing tokens to flow through your systems without triggering validation errors.
Let’s look at four possible transformers, to see how transformers work.
A transformer consists of a tuple of (ID, function, parameters)
id- a unique transformer identifier, which can be used as a reference when creating tokens
function- a transform function with the signature
func(data Object, parameters Object) (Token | error)
parameters- a static JSON object (not containing un-encoded PII) that is available at runtime, allowing you to parameterize and reuse functions like "obfuscate all but the first X letters of these emails"
UserClouds has several built-in transformers for common use cases, like masking emails, national ID numbers and credit card details. However you can also create custom functions, in two ways:
- Call the CreateTransformer() API - a convenience wrapper for in-lining a transformer
- Create functions in the UserClouds UI
Updated 29 days ago