App-reserved customer metafields can't be accessed in the POS receipt template?

Hey,

Our app has several app-reserved customer metafields that can be easily accessed through liquid. Eg.:

{{customer.metafields.app--152217321473--loyalty_program.points}}

However our merchants reported that this doesn’t seem to work in the POS receipt template.

Could someone confirm if it’s a bug or a known limitation?

Hey @Balint_Jakabos :waving_hand: - thanks for flagging this and waiting for our reply here. Just confirming this is expected behaviour. Right now, we don’t support customer metafield access in the POS receipt template, but I’ve logged a feature request for you so that we can look into implementing something liek this in the future since I definitely agree that it would be really useful to have.

Let me know if I can help out further :slight_smile:

@Alan_G thank you for getting back.

In the meantime I did find a workaround and was able to access the metafields by NOT specifing the name space, with the following liquid snippet:

{% assign current_points = order.customer.metafields.points | default: 0 %}

This works to access a customer metafield in the POS liquid template.

Is this expected to keep working?

(Hope so, since it’s super useful)

No worries @Balint_Jakabos and interesting! Thanks for sharing that workaround, appreciate you circling back with what you found. This isn’t something I’ve seen documented anywhere, so while it’s working for now, I can’t make any promises about whether it’ll stick around or change in future POS updates. Let me dig into this internally and see if I can get clarity on whether this is something that’s officially supported going forward.

In the meantime, if it’s meeting your needs, go for it for sure, just wanted to mention I can’t officially confirm the status of this approach yet. I’ll loop back once I know more, thanks again!