How to pass parameters from one action to another using api.enqueue()
Context:
I have a multi-step CSV processing workflow with two actions:
parseCsvFromFtp.ts - Initial action that processes CSV files and enqueues background jobs
processCsvInBackground.ts - Background job that handles the actual CSV parsing
importProductsInShopify.ts - Background job that handles the saving of product to Shopify. Triggers after processing all the CSV rows
The Problem:
When I use api.enqueue() to queue the background job from the first action, the parameters are not being passed correctly. The background job receives empty/undefined parameters.
2 Replies
Hello,
You would pas params from one action to another in the action invocation and by setting parameters of the action that's recieving those params.
Mind sharing what parameters you'd want to pass along between actions?
Do you like this answer?