Transforms that are in use

What would be the best way to validate which Transforms are in use? That way we can start to review and remove those that may have been used for testing.

Hi @ethompson,

The transforms API collection doesn’t provide any information on transform usage, so that won’t help here. Since transforms are applied to identity profiles, you can try the following list of actions. This will require some scripting on your end to put together, but it should work for your case.

List all identity profiles in your tenant. This will give you an array of identity profiles, one for each source in your tenant. Under identityAttributeConfig, you will find the list of attributeTransforms. Ignore any types of accountAttribute, as those are simply references to an non-transformed account attribute. You want to filter by type = reference. The ID will be the name of the transform that you created. You can keep a running list of these transform IDs, which you can then use to compare to all of the transforms you have in your tenant. Any transform that doesn’t exist within an identity profile is not being used, and is likely safe to be deleted.

List all identity profiles

[
    {
        "description": null,
        "owner": null,
        "priority": 20,
        "authoritativeSource": {
            "type": "SOURCE",
            "id": "2c9180887671ff8c01767b4671fb7d5e",
            "name": "Employees [source]"
        },
        "identityRefreshRequired": false,
        "identityCount": 3,
        "identityAttributeConfig": {
            "enabled": true,
            "attributeTransforms": [
                {
                    "identityAttributeName": "uid",
                    "transformDefinition": {
                        "type": "accountAttribute",
                        "attributes": {
                            "attributeName": "name",
                            "sourceName": "Employees",
                            "sourceId": "2c9180887671ff8c01767b4671fb7d5e"
                        }
                    }
                },
                ...
                {
                    "identityAttributeName": "department",
                    "transformDefinition": {
                        "type": "reference",
                        "attributes": {
                            "input": {
                                "attributes": {
                                    "attributeName": "department",
                                    "sourceName": "Employees",
                                    "sourceId": "2c9180887671ff8c01767b4671fb7d5e"
                                },
                                "type": "accountAttribute"
                            },
                            "id": "deptNameNormalizer"
                        }
                    }
                },
                ...
            ]
        },
        "identityExceptionReportReference": null,
        "hasTimeBasedAttr": false,
        "id": "2c91808876628b6201767b4bfea61dbb",
        "name": "Employees",
        "created": "2020-12-19T13:59:06.663Z",
        "modified": "2021-11-30T13:03:21.937Z"
    }
]

List all transforms

[
    {
        "id": "3a9e973e-0df4-4c59-a423-a4de3574e0bc",
        "name": "deptNameNormalizer",
        "type": "trim",
        "attributes": {
            "input": {
                "attributes": {
                    "begin": 0.0,
                    "end": 64.0,
                    "input": {
                        "attributes": {
                            "length": "64",
                            "input": {
                                "attributes": {
                                    "attributeName": "department",
                                    "sourceName": "Employees"
                                },
                                "type": "accountAttribute"
                            }
                        },
                        "type": "rightPad"
                    }
                },
                "type": "substring"
            }
        },
        "internal": false
    },
...
]

Thanks @colin_mckibben!

I assume I would also need to check all of the Account Profiles for each source. Then for each transform used, also check for any transforms that are referenced by the complete list.

For example, complete list: A, B, C but C has a reference to D. so the actual list would be A, B, C, D otherwise C would break.

Good catch! Yes, you will need to check account create profiles and any references to transforms within a transform. If you manage to get this working, would you mind sharing your code here for others to use?