Understanding when to use 'Update Order Metafield' in eCommerce?

Understanding when to use 'Update Order Metafield' in eCommerce?

specklefarms
Excursionist
28 1 9

Does anyone on here have any examples they can provide on the forum for using the Update Order Metafield?

 

How is the Metafield displayed on the order? Is it similar to a Product's metafield where I can see it on the bottom of the page when editing that product?

 

I'm trying to decide if this is useful for what I need. My store sells unique products we sell on behalf of customers that do not exceed the quantity of 1. We have their email address in a Product metafield. I am hoping I could create a Shopify Flow that would copy their email address metafield into the order. This would be useful if something is wrong with the product and I would need to contact the seller.

 

Does anyone else on here use this feature?

Replies 6 (6)

paul_n
Shopify Staff
1172 143 276

Yes that should be possible. I think for the metafields to show in the Admin, you need to define it in your Admin > Settings area and then "pin" it, which makes it show up in the UI. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Leffrey
Explorer
40 0 17

I am trying to add text to a newly created Metafield and flow is not adding the text to that metafield after being run.  Can you take a look and let me know, what needs to be edited?  I am attaching a screenshot of both the Metafield from Settings and the action in Flow.  There is no error when running the action.  It says "Succeeded" by the action the flow history log.

It doesn't allow image upload in this community (only csv), you can see the images here:

Metafield Settings: https://www.screencast.com/t/7Vg78dsQ

Flow Metafield action: https://www.screencast.com/t/17rs6ZNc

paul_n
Shopify Staff
1172 143 276

In the action, your namespace is "custom" and your key is "order_risk_notes_flow_"

 

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Leffrey
Explorer
40 0 17

I made and saved those changes.  A new order just came in, but it still did not populate the metafield with the text value.

 

I tried to simplify even more just now and deleted that metafield and created a new one with no spaces and no other characters.  I also changed the flow to reflect the new metafield.  A new order came in and still it did not populate the metafield.

paul_n
Shopify Staff
1172 143 276

I can't help without more details. First, I would open the workflow run and look for errors/etc.

 

If there is no error, more likely with all the changes you still don't have namespace and key set correctly (that would actually set an undefined metafield that is hidden from view). 

 

FYI, apologies about the UX, we have changes coming to make this way better (where you can select from a list of metafields). 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Leffrey
Explorer
40 0 17

I recreated everything from scratch.  It works the way that you showed me fine.  Thank you.