Magento Address Validation – Handling Residential and Commercial Addresses with Dynamics 365 Integration

We have integrated Dynamics 365 with Magento, where contacts are synchronized as Magento customers along with their billing and shipping addresses.

We are facing a challenge with address synchronization because Dynamics 365 uses a single Full Name field, which can contain either a person’s name for a residential address or a company name for a commercial address.

In Magento, however, addresses have separate fields for First Name, Last Name, and Company.

Here are the two scenarios we need to handle:

  1. Residential Address
  • Map the Full Name value from Dynamics 365 to the First Name and Last Name fields in Magento.

  • Keep the Company field optional and empty if no company name is provided.

  1. Commercial Address
  • Map the Full Name value from Dynamics 365 to the Company field in Magento.

  • Leave the First Name and Last Name fields empty.

The challenge is that Magento requires First Name and Last Name for customer addresses by default. This makes it difficult to synchronize commercial addresses where only a company name is available.

My questions are:

  1. Has anyone encountered a similar scenario when integrating Magento with a CRM or ERP system?

  2. Is there a recommended way to support commercial addresses without First Name and Last Name while keeping them required for residential addresses?

  3. Would you recommend customizing Magento’s address validation, modifying the customer address attributes, or handling this through the integration layer?

  4. Are there any potential issues with checkout, order placement, shipping integrations, or other Magento functionalities if we customize these required fields?

We would prefer a solution that handles both address types correctly without introducing issues in Magento’s standard functionality or third-party integrations.

I would appreciate any suggestions, best practices, or examples from anyone who has implemented something similar.

Thanks in advance for your help!