Out now! Check out the Poll results: Do you have a Shopify store?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Default value for custom field on Shopify Flow extension

Default value for custom field on Shopify Flow extension

CharlyTalavera
Shopify Partner
31 1 9

Hi! I'm creating a Shopify flow action, there are 2 fields that I would like to receive:

  • Order.id
  • Fulfillment.id (if it's provided by the trigger, it's optional)

 

And I'm having problems with the second one, because the person who use my Action has to setup this field manually in the UI.

Is there anyway to set a default value for a custom field? For example, this is how my `shopify.extension.toml` looks like:

[settings]

  [[settings.fields]]
  type = "order_reference"
  required = true

  [[settings.fields]]
  type = "single_line_text_field"
  key = "fulfillment_id"
  name = "Fulfillment ID"
value = "{{fulfillment.id}}" // This does not exist, but this would be the idea required = false


So my action will have "{{fulfillment.id}}" as action input by default, if it's provided by the trigger.
Is it possible to accomplish something like this?

 

Thanks!

Replies 2 (2)

Liam
Community Manager
3108 344 888

Hi CharlyTalavera,

 

Currently, Shopify Flow does not support setting default values for custom fields in a flow action. The merchant who uses your action must set up this field manually through the Shopify Flow UI.

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

CharlyTalavera
Shopify Partner
31 1 9

I see, thanks for your reply!