|Exclusive feature only in Adobe Commerce (Learn more)|
Custom address attributes can be set up to provide additional information, such as an optional email address, Skype account, alternate phone number, building, or county. The custom attribute can then be incorporated into the address template that is used to produce sales documents. The process to create a custom address attribute is almost the same as creating a customer attribute.
Customer address attributes are used in the following forms:
On the Admin sidebar, go to Stores > Attributes > Customer Address.
In the upper-right corner, click Add New Attribute.
In the Attribute Properties section, do the following:
Enter a Default Label that identifies the attribute during data entry.
Enter an Attribute Code that identifies the attribute within the system.
The attribute code must begin with a letter, and can include any combination of lowercase letters (a-z) and numbers (0-9). The code must be fewer than 30 characters in length, and cannot include special characters or spaces. The underscore character (_) can be used to indicate a space.
Shortcut: To complete only the required fields, scroll down to Storefront Properties, enter the Sort Order, and save.
To determine the type of input control that is used for data entry, set Input Type to one of the following:
Text Field- A single-line text field.
Text Area- A multi-line text area.
Multiple Line- Creates multiple text lines for the attribute, similar to a multi-line street address. The number of separate data entry lines can be from 2 to 20. Use the
Default Valueto specify the initial value of the field.
Date- Displays a date field with a pop-up calendar. Additional properties: Use
Default Valueto specify the initial value of the field.
Minimal Valueto specify the earliest date that can be entered. Use
Maximum Valueto specify the latest date that can be entered.
Dropdown- A drop-down list that accepts only one value to be selected.
Multiple Select- A drop-down list that accepts multiple values to be selected.
Yes/No- A field that offers only a choice of
File (attachment)- A field that allows a file to be uploaded and associated with the customer attribute as an attachment.
Image File- A field that allows an image to be uploaded to the gallery and associated with the customer attribute.
If the customer must enter a value in the field, set Values Required to
To assign an initial value to the field, enter a Default Value.
To check the data entered into the field for accuracy before the record is saved, set Input Validation to the type of data to be allowed in the field. The available values depend on the Input Type specified.
None- The field has no input validation during data entry.
Alphanumeric- Accepts any combination of numbers (0-9) and alphabetic characters (a-z, A-Z) during data entry. To include special characters, see Escape HTML Entities in the next step.
Alphanumeric with Space- Accepts any combination of numbers (0-9), alphabetic characters (a-z, A-Z), and spaces during data entry.
Numeric Only- Accepts only numbers (0-9) during data entry.
Alpha Only- Accepts only alphabetic characters (a-z, A-Z) during data entry.
URL- Accepts only a URL during data entry.
Length Only- Validates the input based on the length of the data entered into the field.
To apply a preprocessing filter to values entered in a text field, text area, or multiple line input type, set Input/Output Filter to one of the following:
None- Does not apply a filter to text entered into the field.
Strip HTML Tags- Removes HTML tags from the text. This filter can help clean up data that is pasted into a field from another source that includes HTML tags.
Escape HTML Entities- Converts special characters found in the text to a valid HTML escape sequence, such as
&;. Escape sequences are enclosed between an ampersand and a semi-colon, and are frequently used for typographer’s smart quotes, copyright, and trademark symbols. Escape sequences are also used to identify characters such as the less than (
<) and greater than (
>) symbols, and the ampersand character which are also used in the code. This filter can help clean up special characters that are sometimes pasted into database fields from word processors.
Complete the customer grid and segment properties:
To be able to include the column in the Customers grid, set Add to Column Options to
To filter the Customers grid by this attribute, set Use in Filter Options to
To filter the Customers grid by text attribute with different filter-matching conditions, set Grid Filter Condition Type to
Prefix Match, or
Full Match. It does not affect the Search by keyword field for the grid.
To search the Customers grid by this attribute, set Use in Search Options to
To make this attribute available to customer segments, set Use in Customer Segment to
Scroll down to the Storefront Properties section.
To make the attribute visible to customers, set Show on Storefront to
Enter a number in the Sort Order field, which determines its order of appearance when listed with other attributes.
Set Forms to Use to each form that is to include the attribute.
To choose both options, hold down the Ctrl key (PC) or the Command key (Mac) as you click each form.
In the panel on the left, choose Manage Labels/Options.
Under Manage Titles, enter a label to identify the attribute for each store view.
When complete, click Save Attribute.
|Default Label||The default label that identifies the attribute in the Admin and storefront.|
|Attribute Code||A unique code that identifies the attribute within the system. The code can be up to 21 characters in length, and cannot include spaces or special characters. The underscore symbol can be used instead of a space.|
|Input Type||Determines the input control that is used for data entry. Options:
|Values Required||Determines if a value must be entered into the field. Options:
|Default Value||Specifies the initial value of the attribute.|
|Input Validation||The selection of options is determined by the input type. Options:
URL - Accepts only a URL during data entry.
|Input/Output Filter||Applies a preprocessing filter to values entered in a text field, text area, or multiple line input type before the record is saved. Options:
|Add to Column Options||Specifies if the attribute is included as a column in the Customers grid. Options:
|Use in Filter Options||Specifies if the attribute can be used as a filter for search operations from the grid. Options:
|Grid Filter Condition Type||Specifies filter-matching conditions for attributes in search operations from the grid. It does not affect the Search by keyword field for the grid. Options:
|Use in Search Options||Specifies if the attribute value can be used as a keyword in search operations. Options:
|Use in Customer Segment||Determines if the attribute is included in customer segment conditions. Options:
|Show on Storefront||Determines if the attribute appears as a field in the customer information in the storefront. Options:
|Sort Order||Specifies the sort order of this attribute in relation to other customer attributes. The sort order determines the sequence that fields receive focus during data entry when using keyboard navigation.|
|Forms to Use in||Determines the pages with data entry forms where the attribute appears. Options: