A common ask I get in Salesforce is how to group data based on it’s characteristics – for example grouping random Industries into tighter categorizations or grouping people’s Job Titles into defined ‘Personas’. This makes it simpler to analyze and target your data – instead of dealing with disparate Industry or Job Title values users can now focus on cleanly grouped data. The solution to this problem is a formula field in Salesforce – I’ll walk through how to set up a formula field to return a ‘persona’ for a Contact based on it’s Job Title:
Let’s say you have a few predefined Job Titles that you want to group into ‘Personas’ for your outbound marketing efforts:
- ‘Marketing Persona’ – anyone with the word ‘Marketing’ in their Job Title
- ‘Sales Persona’ – anyone with the word ‘Sales’, ‘Support’, or Account’ in their Job Title
- ‘Executive Persona’ – anyone with the word ‘Chief’ or ‘President’ in their Job Title
Create a Formula Field in Salesforce that returns Text:
Use the ‘If’ and ‘Contains’ functions on the Job Title field to return your personas if the record’s Job Title contains a relevant value:
The value of using a formula field here is as the Personas change it’s just an update to the formula field – for example if you want to add ‘VP’ the Executive Persona, just add in that line item. Here’s the compiled formula:
IF(CONTAINS(Title,’Marketing’), ‘Marketing Persona’,
IF(CONTAINS(Title, ‘Sales’), ‘Sales Persona’,
IF(CONTAINS(Title, ‘Support’), ‘Sales Persona’,
IF(CONTAINS(Title, ‘Account’), ‘Sales Persona’,
IF(CONTAINS(Title, ‘Chief’), ‘Executive Persona’,
IF(CONTAINS(Title, ‘President’), ‘Executive Persona’,
NULL))))))