How to create a Salesforce record when the last name is unknown
When using the Create record and Create or update record Salesforce actions in a journey or playbook, a contact’s last name is required.
Without a last name, the record will be skipped and wont be added to Salesforce.
One way to handle this is to assign a generic fallback or dummy last name to the contact, such as “LNU” (last name unknown). This way, the contact record will be created in Salesforce and your team won’t miss out on receiving this person’s information.
You can achieve this using Liquid in the Create record or Create or update record action setup. To do so, in your journey or playbook:
- Add the Salesforce action Create record or Create or update record.
- Select the relevant Object type (e.g. Contact or Lead).
- At the Last name field, delete the existing merge tag.
- Type in
{{ people.last-name | default: 'LNU' }}
This will give the contact the last name “LNU” (e.g. “John LNU”) if no last name value exists for the contact. You can of course use another name other than “LNU”, as suitable. - Continue with the remainder of the action setup and click Test action or Save when ready.
Here is an example of what a contact record created using this method looks in Salesforce.