I need to remove spaces and accents (special characters) and capital letters from the 'From Email Address' field in the sender profile. Indeed, I would like to compose a dynamic From Email Address in the sender profile based on the Salesforce CRM account name (which would be a variable) and a static domain name which is verified. The account name is retrieved from Salesforce as the journey data entry is Salesforce data entry.
- I would like to concat the account name and the static domain name
- I would like to know how to remove the capital letters, the accents (eg :'à', 'â', 'é', 'ê', 'è', 'ù') and the spaces that can be in the field account name.
--> Example of desired output : If the field value on the account name is 'John Dôe' and the verified static domain name is '@digitalforu.com', the output should be 'firstname.lastname@example.org'.
How can I proceed to do these actions ? I had put the following code in the 'From Email Address' field in sender profile but I do not know how to solve the issue of accents, spaces and capital letters that can appear in the account name.
%%[set @accountname = AttributeValue("Opportunity:Account:Name") if not empty (@accountname) then set @FromEmailAddress = CONCAT(@accountname, "@digitalforu.com") else set @FromEmailAddress ="@digitalforu.com" endif ]%% %%=v(@FromEmailAddress)=%%