The preferred name field is used for customers whose chosen or preferred name does not match their legal name. Enabling this field ensures that you are addressing your customers as they wish to be addressed. The preferred name option is also a way of respecting this component of an individual's identity, acknowledging the importance of inclusive language, and signaling your store's commitment to diversity and inclusivity.
This feature allows customers to enter any name of their choosing, which is then pulled into their order confirmation emails and order information by the system.
For all other customers whose legal name and chosen name match, they will simply enter their first name a second time. Or they can put in their nickname if they choose to do so!
This feature is available by request. Navigate to Store > Configuration > Account Information & Preferences > Store Features to request this feature. You must also have the Address Book feature enabled on your site before we can enable this feature.
Enabling Preferred / Chosen Name
1. Navigate to Store > Configuration > Countries and Addresses
2. Click 'Add an Address' field
3. Under Label enter 'Preferred Name' or 'Chosen Name' (This is what customers will see)
4. Under Field Name enter 'preferred_name' or 'chosen_name' (This is only what you will see in your address fields)
5. Check the box 'Field Required' to make this field mandatory to complete checkout.
6. In the description field, include instructions on what customers should enter into the field. If a customer does not have a preferred name, they will enter their first name a second time. Ex: "Please enter your preferred name. If you do not have one, please re-enter your first name".
7. Save your configuration.
8. Back on the main page, use the arrows to drag and drop the 'Preferred Name' underneath the 'First Name' field
Pulling Preferred Names into Confirmation Emails
To edit your order confirmation emails, you must have your 'Custom Invoice/Emails' feature enabled beforehand. If you do not already have this module enabled, navigate to your features page to request it.
1. Navigate to Store > Configuration > Orders > Email/Invoice Templates
2. If you already have custom email templates, use the drop down to select the template you wish to edit.
3. If you do not already have a custom template, enter a title in the field and click 'Add'.
4. In the boxed below, you'll see text and html (or replacement patterns). These replacement patterns teel the system what information to pull from the order and what readable, human text to replace it with. In this case, we want the preferred name to be reflected, not the first name.
5. Scroll down and click the expand arrow on replacement patterns. You'll find the field you need underneath Orders > Customer. You are looking for the line that says 'Preferred Name'. (It should contain a piece similar to 'ucxf_preferred_name')
6. Once you have found the replacement pattern, copy it and scroll back up to the text boxes.
7. Where it is pulling the first name (or wherever you would like a name to be included) paste the replacement pattern. Make sure it has a pair of closed brackets around the entire replacement. Ex: [ucxf_preferred_name]
8. Before saving, click the preview button at the bottom of the page. If it's working, the space where the preferred name would be should be blank.
9. Save and repeat steps 1-8 for all other templates.