To add sales order status history records to the given order, you required order id, status, comment message, is customer notify and entity name to insert entry on the sales_order_status_history table.
Create a factory object for the class Magento\Sales\Model\Order\Status\History and save the object data using the Order Status History Repository Interface. Continue reading “How to add sales order status history data programmatically in Magento 2?”