Metafield Not Populating In Email Created Via The Send Internal Email Function

I am testing a product on which I have added a custom MPN metafield.

I am trying to get the MPN to appear in an internal email sent via a flow trigger in a flow related to orders placed.

{{fulfillmentOrder.order.lineItems.product.mpn.value}}

The above has been added to the internal email but when I create a test order with the product that has the MPN and the email is received, there is nothing there.

Any suggestions on where I’m going wrong?

Do you have a link to the workflow? Can you show the steps and conditions you’re using?

If the conditions pass, an internal email is sent with:

{{fulfillmentOrder.order.lineItems.product.mpn.value}}

The MPN is related to the product in the order for which the conditions have passed.

Try logging that value prior to the email send action. Be sure to copy and paste it exactly.

The format looks a little off. The lineItems should be an array. And you would need product.metafields.namespace.key.

thanks, you were right about the formatting. I have now added another custom metafield to my products which is a single line of text and it’s working when added to the email in flow. I just want to confirm, this is only visible via the back end/internal use? I was originally going to use the barcode field but found that using the barcode field for this use would have resulted in ‘fake’ barcodes and would have had a negative impact with google/merchant centre. Thanks again for taking the time to reply.

Hm not sure why it would result in fake barcodes. You should be able to pull metafields into the frontend with liquid if you want to.