Magento for B2B Commerce, 2.2.x

Magento 2.2.x Notice: As outlined by the Magento Software Lifecycle Policy, Magento 2.2.x has reached the End-of-Support and will no longer receive quality fixes or documentation updates. To maintain your site's performance, security, and PCIPayment Card Industry: Refers to debit and credit cards and their associated businesses. compliance, upgrade to the latest version of Magento.

The online Magento 2.2.x User Guide is scheduled for removal, but will remain available in PDF for Open Source, Commerce, and Commerce for B2B.

Customer Attributes

Customer attributes provide the information that is required to support the order, fulfillmentThe process of managing customer shipments., and customer management processes. Because your business is unique, you might need fields in addition to those provided by the system. You can add custom attributes to the Account Information, Address Book, and Billing Information sections of the customer’s account. Customer address attributes can also be used in the Billing Information section during checkout, or when guests register for an account.

Customer Attributes
  • Field Descriptions



    Attribute Properties

    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:

    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. Additional property:

    Default Value

    Specifies the initial value of the field.


    Displays a date field with a pop-up calendar.

    Additional properties:

    Default Value

    Sets a default date.

    Minimal Value

    Determines the earliest date that can be entered.

    Maximum Value

    Determines the latest date that can be entered.

    Related properties:

    Input Validation


    Input/Output Filter

    Normalize Date


    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. To select more than one value, hold down the Ctrl key, and click each option.


    A field that offers only a choice of “Yes” or “No” values.

    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.

    Values Required

    Determines if a value must be entered into the field. Options: Yes/No

    Default Value

    Specifies the initial value of the attribute.

    Input Validation

    The selection of options is determined by the input type. Options:


    The field has no input validation during data entry.


    Accepts any combination of numbers (0-9) and alphabetic characters (a-z, A-Z) 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.


    Accepts only a URL during data entry.


    Accepts only an email address during data entry.

    Length Only

    Validates the input based on the length of the data entered into the field.

    Minimum Text Length

    Determines the minimum number of characters or numbers that can be entered into the field.

    Maximum Text Length

    Determines the maximum number of characters or numbers that can be entered into the field.

    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:


    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 &. You can use this filter to clean up special characters that might be pasted into database fields from a word processor.

    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.

    Add to Column Options

    Specifies if the attribute is included as a column in the Customers grid. Options: Yes/No

    Use in Filter Options

    Specifies if the attribute can be used as a filter for search operations from the grid. Options: Yes/No

    Use in Search Options

    Specifies if the attribute value can be used as a keyword in search operations. Options: Yes/No

    Use in Customer Segment

    Determines if the attribute is included in customer segment conditions. Options: Yes/No

    Storefront Properties

    Show on Storefront

    Determines if the attribute appears as a field in the customer information in the storefront. Options: Yes/No

    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. Hold down the Ctrl key to choose multiple forms. Options:

    Customer Registration

    Customer Account Edit

    Admin Checkout

  • Default Customer Attributes

    Attribute Code



    The date the customer account was created.


    The date the customer account was last updated.


    The website ID of the site where the customer account was created.


    The store view where the account was created.


    The ID of the customer group where the customer is assigned.


    Determines if customer groups can be dynamically assigned during VAT ID validation.


    Any prefix that is used with the customer name.(Mr., Ms., Mrs., Dr., etc.)


    The first name of the customer.


    The middle name or middle initial of the customer.


    The last name of the customer.


    Any suffix that is used with the customer name. (Jr., Sr., Esquire, etc.)


    The customer’s email address.


    The customer’s date of birth.


    The Value Added Tax (VAT) ID that is assigned to the customer. The default label of this attribute is “VAT Number.”. The VAT number field is always present in all shipping and billing customer addresses when viewed from the Admin, but is not a required field.


    The customer’s gender.