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
- Read and update the customer value through the
customer_idcustom attribute. - Read the historical order value through the
customeridextension attribute. - Use
mageb2b_customer_idonly in the order email rendering context. - Do not map the business identifier to Magento's native order
customer_idcolumn.