Customer ID field names

The extension uses three field names for the same business identifier. They belong to different Magento data contracts and are not interchangeable.

Context Field name Where it appears
Customer account customer_id Customer EAV attribute, customer forms, and customer API custom_attributes
Sales order customerid sales_order, sales_order_grid, and the OrderInterface extension attribute
Order email mageb2b_customer_id Additional value placed on the order object before Magento renders the email template

Magento already uses customer_id on an order for the internal customer entity relation. The extension therefore stores the copied business identifier as customerid without an underscore.

The order value is a snapshot. Changing customer_id on the customer account does not rewrite customerid on existing orders.

Integration checklist

  1. Read and update the customer value through the customer_id custom attribute.
  2. Read the historical order value through the customerid extension attribute.
  3. Use mageb2b_customer_id only in the order email rendering context.
  4. Do not map the business identifier to Magento's native order customer_id column.