How to create a Salesforce record when the last name is unknown

Overview

For the Create record and Create or update record Salesforce actions within a journey or playbook, a contact must have a last name. If missing, the record will be skipped and not added to Salesforce.

Screenshot showing a failed Salesforce journey action due to a missing last name value.

How to create a Salesforce record when the last name is unknown

Workaround to create a Salesforce when the last name is unknown

To ensure the contact record is created in Salesforce, assign a generic fallback last name, such as LNU (Last Name Unknown). This ensures that the record is still created and prevents missing valuable contact information.

Use Liquid in the Create record or Create or update record action setup to achieve this. To do so in your journey or playbook:

  1. Add the Salesforce action Create record or Create or update record.
  2. Select the relevant Object type (e.g. Contact or Lead).
  3. At the Last name field, delete the existing merge tag.
  4. 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.
    Example create record action setup using LNU as a fallback last name value.
  5. Continue with the remainder of the action setup and click Test action or Save when ready.
Example contact record in Salesforce created using the fallback last name value LNU.