Access metaobject within Flow?

Use case: I’d like to assign a variant in a metaobject that could then be called out in Flows to more easily do an HTTP request for 3rd party fulfillment update.

Currently, we use a Flow to add a line item to the order after the fact based on a qualifying event (loyalty program tag added to customer after qualifying order). We then do some basic tagging, but end with a Send HTTP request to update fulfillment and offset (basically we have a free/fake product that’s $0 for the order and then we offset those in the order - add in the real product, and reduce the fake product).

Is there a better way to do this for the moment (adding a line item but making it $0) OR more to just modifying the existing Flow, just setting it so that I can access a globally accessible metaobject to catch the variant and then check a variant metafield I’ve assigned to that variant (of course because the fulfillment software has their own variant ID).

Hi Taylor,

Thanks for highlighting this feature request and for detailing your use case - this is super helpful for our product teams to understand how to support this and the value of investing time to build this. I’ve flagged this to the Flow product team, and will update here when I hear more.

1 Like

Hi Taylor,

It’s a bit unclear how you have this implemented now, but you can do order editing using Send Admin API request now, which allows you to add a variant and discount it 100% (unlike the Add order line item action).

I’m not sure if that makes your metafield need moot or not?

Hey Paul thanks for asking!

Basically I was hoping to extend an existing metafield - rather than go through the whole rigmarole of re-doing a bunch of Flows. Plus, we are adding a product AFTER a tag change from third party (Yotpo loyalty program).

My hope was to be able to set something so the merchant doesn’t have to keep asking me every time they change the free gift product to update the values we need stored in variant metafields for the third-party fulfillment (Katana, that keeps it’s own set of variant Ids).

My thought was (order created trigger is the one we’re using) being able to create a metaobject that could then reference the product to be added to the order AND also access the variant metafield associated to grab the alternate variant Id. If I could set a metaobject to this value, the merchant wouldn’t need me to come in and adjust the Flow for the HTTP calls that are currently hardset values but maybe I can try accessing via the Send HTTP request instead :thinking: they might have an easy enough time doing the variant picker to add to the order.

Might have been trying too hard to make metaobjects work here since I like using them for everything and they have global access.

You can update metaobjects via Send Admin API request.

I’m not sure how you get the variant to add…is that attached to one of the line item / products? If so that should be doable in Run code, which you could pass to Send Admin API request.