N
Novu2mo ago
Bren

How to Handle Missing Output When Skipping Steps in a Workflow with Dependent Steps?

I'm implementing a workflow with three steps: in-app, delay, and another in-app. The first in-app step is conditional and can be skipped based on certain logic. However, when the step is skipped, no output is returned. This causes the delay step to fail with the error: 'first-step-name' has invalid result. Please provide the correct step result. I understand that for in-app step outputs, fields like seen, read, lastSeenDate, and lastReadDate are necessary. But since the first step is skipped, there is no result to pass. Questions: How can I handle cases where a step is skipped, but subsequent steps depend on its result? Is there a way to provide a default or placeholder result for skipped steps to avoid this issue?
2 Replies
Pawan Jain
Pawan Jain2mo ago
@Bren Here second in-app is dependent on the output of first step? Can you skip second step as well as first step is also skipped?
Bren
BrenOP2mo ago
@Pawan Jain Let’s consider a scenario where the workflow involves the following steps: First Step: Email and in-app notification. If a user meets certain conditions, the in-app notification is skipped. Second Step: A delay of 2 days. Third Step: Another in-app notification or email. For example, I have an event related to payment reminders. If a user has not made a payment, I trigger this workflow. In the first step, I send an email and conditionally skip the in-app notification based on user-specific logic. After a delay of 2 days, the third step sends either another in-app notification or an email. However, if the in-app notification in the first step is skipped, the delay step fails with the error: 'first-step-(inapp)-name' has invalid result. Please provide the correct step result. How can I address this issue to ensure the delay step works seamlessly, even when the in-app notification in the first step is skipped? Is there a way to provide a default or placeholder result for skipped steps to avoid such errors? @Pawan Jain could you please help on this ?

Did you find this page helpful?