Update Metafield Customer VAT with Metafield Company VAT

Topic summary

Goal: Populate a Customer VAT metafield from a Company VAT metafield via Shopify Flow. Error encountered when updating the customer metafield: “Value can’t be blank” (single_line_text_field), indicating the value being written is empty.

Key points and suggestions:

  • Likely cause: incorrect variable path; responder suggests referencing the metafield namespace and key explicitly (e.g., metafields_item.namespace.key.value) instead of a generic metafields_item.value.
  • Use the variable picker in Flow to select/add the exact metafield definition for customers/companies to ensure the correct path.
  • Add a Log output action to inspect Liquid expressions and confirm the source value is present before the update.

Resources shared:

  • OP provided an exported workflow via WeTransfer. Two screenshots of the Flow were attached (central for understanding the setup).
  • Responder shared a tutorial video link; first link had permission issues, a working link was then provided.

Status:

  • No resolution yet. OP still cannot pass the metafield reference through the variable selector (only sees “metafields” → “value”). Next steps are to use the video guidance, select/add precise metafield definitions, and debug with Log output to identify the correct metafield path and verify non-empty values.
Summarized with AI on December 23. AI used: gpt-5.

Hi,

I am unable to figure out why my metafield is not being filled from the company value. For some reason the value is blank.

The error I am getting is Got error updating metafield: “Value can’t be blank.” For value: “”, Type: single_line_text_field

I am not good at this so please bear with me if this is basic stuff. Please see flow below

I suspect you might need to reference the metafield namespace and key as well — so something like metafields_item.custom.vat_customer.value instead of metafields_item.value but hard to tell from screenshots. You should also be able to find the individual metafield key in the variable picker and drop in the correct reference. Do you have a link to the workflow?

Yeah I assume I need to fill in the metafield references somehow but I can’t seem to pass that info without getting errors no matter how I format. I’ve exported and uploaded to wetransfer below.
https://we.tl/t-T0TwlG0qzY

I am not able to find any specific metafields in the variable selector. It only allows to select “metafields” then “value”.

Maybe this video will help:https://descriptusercontent.com/published/1d9595e2-f0d0-4e23-b957-61dc541734d4/original.mp4

From the variable picker, you can select or add metafield definitions for orders, products, customers, etc. Does that help you find the path to the relevant metafield?

I don’t have permission to open

Does this link work? https://descriptusercontent.com/published/1d9595e2-f0d0-4e23-b957-61dc541734d4/original.mp4

Also, liquid can be a bit complicated and problems aren’t obvious. Using a Log output action can make it easier to debug the results of your expressions until you get the desired result.