[Server error] Issue with Notification Email Metafield Retrieval

I used the following code in my Shipping confirmation notification email, and it used to return the value a few days ago. However, it suddenly stopped working without any changes to the metafields:

{{order.metafields.custom.something}}

The code {{order.metafields}} returns MetafieldCollectionDrop, but {{order.metafields.custom}} now returns an empty {}.

Additionally, previewing {{order.metafields.custom.something}} in the email templates editor returns a Server error. Inspecting the network tab shows an Internal server error in the API without any specific details.

Hi Riri,

In our docs, it doesn’t seem that order metafields can be accessed with {{order.metafields.custom.X}} - you can access line items but not orders. Can you share an example where this was working as you’ve described, by DM so our team can look into this more?