Merge "Result of Step X" when WHEN is used

Dear community,

I am currious if there is a simpler way handling Workflows when a step has a WHEN clause and updating a “Thing” based on the result(s).

image
You can see that a stripe subscription is been created but depending if the user already took a trial, the option is passed to stripe or not. Sofar so good and it is working as expected.

my issue starts now to store this return values as it might can come as a result of step1 or step2. Is there a way I can merge step1 and step2 and use it in following steps?
image

You can use a custom workflow. Create a new custom event that takes two parameters (that are the same data type as Result of step 1/2). Pass result of step 1 and result of step 2 to that custom workflow.

In the custom workflow, add a ‘return data’ that’s the right data type. Then, return the step 1 data if it’s not empty, and return the step 2 data if it’s not empty. Then, using Result of step 3 (the custom workflow) will return either Step 1 or Step 2, depending on which is not empty.

2 Likes

:clap: (all I can say)

thank you for the hint, worked like a charm!