Adding Custom Attributes to Magento 2 Quotes and Orders

Magento 2 provides some default attributes that are added to the quote and order item data. Here is how to go about adding custom Attributes to Magento 2 quotes and orders.
If you’ve read Adding Custom Attributes to Quotes and Orders in Magento 1, then the below steps aren’t too dissimilar from adding custom attributes …

Add a Custom Total in Magento 2

Custom totals can be added to provide a surcharge or discount to customers on your Magento store. To add a custom total in Magento 2, the total must first be defined within a configuration file.
The article will assume that you have correctly created a vanilla module with the registration.php and etc/module.xml files present.
The …