Shopify has a function to send a notification email to customers when an order is canceled, but the content is based on a pre-prepared template. However, there are times when you want to individually inform them of the reason for the cancellation or other information. Here is how to include additional information in the notification email by using the order metafield.
How to include the reason for cancellation in the cancellation notification by setting the "Reason for cancellation" metafield in the order details that contains the product on the product detail page and entering it before cancellation

Step 1: Add order metafield definition

Step 2: Edit the content of the "Order Cancelled" notification (add code to display the content of the metafield if it is set)

How to use: Enter the reason for your order and then cancel the order

