Commerce 365 is capable of processing additional order attributes. The most popular module to use for this, is the Amasty Order Attributes extension. https://amasty.com/order-attributes-for-magento-2.html
This module allows you to add check-out fields like requested delivery date, comments, PO number *or *project references, with just a few clicks. And once values have been filled in, our software will automatically import these when importing the Magento order.
If you do not want to use this module, you can also accomplish similar results by doing some custom programming. (See below)
Once these values have been imported in to Business Central, the only thing left to do is to write a bit of custom code to take care of handling these values. By default our software doesn’t know what you want to accomplish with the order attributes you created on the Magento side. The values will just be imported. You can see them on the staging order page. But from here some coding is need.
Below is an example of further processing such values.
Here we are going to use the Sales Order API (codeunit 11260734) to extract the order attributes values, project_code, comments, file_upload and req_delivery_date. And next we will bring all the values over to their corresponding fields on the Business Central sales order we are creating.
Below is an example REST API order response message which contains some custom attributes that were created by using the Amasty module. This is the type of response which can be processed by Commerce 365. If you want add custom attributes without using the Amasty module, just make sure that you add your custom attributes to the extension_attributes object in the API response.
Custom attributes on order line level are also possible. At line level the application supports both the use of extension_attributes and the additional_data property.
Working with order line attributes works exactly the same as with values on header level. Just make sure you supply a StagingOrderLine parameter.