I have an app and flow action extension is used by the app. I need to fetch the product reference when customer abandons cart and it has product in it. Currently its just adding customer_id as reference but no product_id as I have set it in toml file. Product reference is coming when trigger is related to product.
More detail is needed. What workflow are you testing it with? What does your workflow run look like? What does your TOML file look like?
[[extensions]]
name = "Start Custom Flow"
handle = "start-custom-flow"
type = "flow_action"
description = "Sent a custom flow using template Id from Mail-bot App"
runtime_url = "https://shared-vocabulary-computed-mh.trycloudflare.com/api/v1/flow/start-campaign"
[settings]
[[settings.fields]]
type = "customer_reference"
[[settings.fields]]
type = "product_reference"
[[settings.fields]]
type = "single_line_text_field"
key = "template_id"
name = "Template Id"
description = ""
required = true
[[settings.fields]]
type = "single_line_text_field"
key = "subject"
name = "Subject"
description = ""
required = true
[[settings.fields]]
type = "single_line_text_field"
key = "flow_worker_label"
name = "Flow Worker Label"
description = "Add flow worker label"
required = true
[[settings.fields]]
type = "single_line_text_field"
key = "preview_text"
name = "Preview Text"
description = ""
the above is my toml file of extension.
Hi.. @paul_n Is there anything missing in toml or workflow that’s not providing the product reference?
Likely you are using an outdated version of your task (before product was added) Have you tried adding the task again to the canvas?
Yes I have done that. It shows reference of product only if the starting trigger is related to Product.
In your TOML those fields are not marked as required. My guess is that it’s just not showing the product field because it’s not required and there is no product in that workflow (it has a list of products but the actions only accepts a single one).
If you used a “For each” loop on productsAddtoCart.product and call your action for each product, I’d guess that you would see both the customer and the product