Lowercase Transformation

  • A builder for creating TransformationSettings that configure a Lowercase transformer.

    Use lowercaseAllVariables() to lowercase every string value in the dispatch payload, or lowercaseVariables(_:) to target specific keys. When neither method is called the transformation is a no-op (the dispatch passes through unchanged).

    All-variables mode — string values inside arrays and nested dictionaries are lowercased recursively. Non-string values (e.g. numbers, booleans) are preserved as-is. The visitor ID (tealium_visitor_id), CP trace ID (cp.trace_id), and Tealium trace ID (tealium_trace_id) are always preserved, unless they are explicitly listed via lowercaseVariables(_:).

    Specific-variables mode — only the values at the specified paths are lowercased. String values are lowercased directly; arrays and dictionaries are descended recursively and their string elements are lowercased. Non-string scalar values (e.g. numbers, booleans) are left unchanged. The excluded keys above are not automatically protected; listing them in lowercaseVariables(_:) will lowercase them.

    Example:

    // Lowercase everything
    let settings = LowercaseSettingsBuilder(id: "my-lower")
        .lowercaseAllVariables()
        .build()
    
    // Lowercase only specific keys
    let settings = LowercaseSettingsBuilder(id: "my-lower")
        .lowercaseVariables([.key("user_name"), .key("email")])
        .build()
    
    See more

    Declaration

    Swift

    public class LowercaseSettingsBuilder : TransformationSettingsBuilder