Initials Cleanser
The initials cleanser generates initials by extracting the first letter of each word from the Name attribute and adds an attribute to the ReltioCleanser crosswalk.
Cleanser Name - InitialsBuilder
Description - This cleanser generates initials by extracting the first letter of each word from the Name attribute and adds an attribute to the ReltioCleanser crosswalk as per the output mapping.
Limitation - Following are the limitations associated with the initials cleanser:
- This builder does not generate initials for non-Latin words.
- Words that are enclosed or prefixed with special characters are not considered when generating initials.
L3 Configurations - Map the InitialsBuilder for any entity in your L3 configuration. Here is an example of a sample configuration:
{
"uri": "configuration/entityTypes/HCP",
"cleanseConfig": {
"infos": [
{
"uri": "configuration/entityTypes/HCP/cleanse/infos/InitialsBuilder",
"useInCleansing": true,
"sequence": [
{
"chain": [
{
"cleanseFunction": "InitialsBuilder",
"resultingValuesSourceTypeUri": "configuration/sources/ReltioCleanser",
"proceedOnSuccess": true,
"proceedOnFailure": true,
"mapping": {
"inputMapping": [
{
"attribute": "configuration/entityTypes/HCP/attributes/Name",
"mandatory": true,
"allValues": false,
"cleanseAttribute": "Name"
},
{
"attribute": "configuration/entityTypes/HCP/attributes/Initial",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "Initial"
}
],
"outputMapping": [
{
"attribute": "configuration/entityTypes/HCP/attributes/Initial",
"mandatory": true,
"allValues": false,
"cleanseAttribute": "Initial"
}
]
},
"params": {
"isForce": true,
"maxChars": 2
}
}
]
}
]
}
]
},
"attributes": [
{
"uri": "configuration/entityTypes/HCP/attributes/ID",
"label": "ID",
"name": "ID",
"description": "",
"type": "String",
"hidden": false,
"important": false,
"attributeOrdering": {
"orderingStrategy": "LUD"
}
},
{
"uri": "configuration/entityTypes/HCP/attributes/Initial",
"label": "Initial",
"name": "Initial",
"description": "",
"type": "String",
"hidden": false,
"important": false,
"attributeOrdering": {
"orderingStrategy": "LUD"
}
},
{
"uri": "configuration/entityTypes/HCP/attributes/Name",
"label": "Name",
"name": "Name",
"description": "",
"type": "String",
"hidden": false,
"important": false,
"attributeOrdering": {
"orderingStrategy": "LUD"
}
}
]
}The cleanseAttribute field in the input and output mapping only supports the values Name and Initial. Custom values, such as MiddleName or MiddleNameInitial, are not supported, and the cleanser returns no output.
To generate initials from a middle name, map the source attribute to cleanseAttribute: "Name" in the input mapping, and set cleanseAttribute to "Initial" for the target attribute in the output mapping, regardless of the underlying attribute name.
| Option | Inputs (In) | Initials (Out) |
|---|---|---|
{} | ABC xyz pvt. ltd. | AXP |
{“maxChars”: 5} | ABC xyz pvt. ltd. | AXPL |
{“maxChars”: 5} | Check with more than three words and case | CWMTT |
{} | Use This String | UTS |
{} | Reltio India | RI |
{“maxChars”: 1} | Walter | W |