Allow more reference field types in Flow actions & triggers

We’re developing several Flow actions and triggers for our app and have run into a limitation on being able to return actual reference fields for metaobjects and companies.

Reference fields seem to only be available for very specific objects, is there some reason we can’t return a reference to metaobjects or companies? Right now we’re working around this by returning the GIDs but this then requires a separate “Get metaobject entry” or “Get company data” action which seems unnecessary, being able to return the correct reference types instead of just IDs would be immensely valuable in simplifying Flows using our blocks.

Docs:

Hi Brett,

Yeah, understand the need. To be clear you want to provide a single company id (not a list) and a Metaobject entry id?

Hey @paul_n

Just to clarify: we’re currently returning the GIDs as a workaround, we actually want to be able to return a reference field for these types. But yes, our current use is returning a single metaobject/company, not a list.

I did a quick look at our code. I think that company_id is already supported (and company contact), but we forgot to update our docs.

  • order_id → Order

  • product_id → Product

  • customer_id → Customer

  • company_id → Company

  • company_contact_id → CompanyContact

I haven’t verified end-to-end yet, so if you find otherwise let us know.

2 Likes

Could you also please add support for the following refs in triggers?

  • Product variant
  • Company location

Thanks