Echo Workflow Variants
Hi all
I would like to try out Echo and was looking for a way how to specify variants in the docs, but didn’t find anything.
Is this supported?
14 Replies
Hi @LUCKY, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.
@LUCKY, you just advanced to level 3!
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Variants
* Roadmap
* Workflows
* Quick Start
-----------------------------
Answer
Echo, as part of Novu's infrastructure, focuses on code-first notification workflow engines that allow for complex notification workflows to be crafted within your codebase. Echo provides a robust framework for defining and managing notification workflows but does not specifically mention or support "variants" as you've described within the context of Echo's documentation or functionalities (1) .
For managing variants within workflows, Novu provides a feature called "Variants" in another part of its platform. This feature allows users to create multiple versions of a given workflow step, linked to specific conditions, which is essential for sending tailored notifications based on subscriber attributes or other contextual information (2) . However, this is explicitly mentioned in the context of Novu's general notification infrastructure rather than the Echo code-first engine.
Given this, if you're looking to implement variants in the context of Echo, the current documentation does not explicitly cover this feature. Echo focuses more on the code-first approach to defining workflows and steps within your application, leveraging the power of Novu for notifications (1) .
For detailed functionalities and the latest updates, it would be beneficial to check the official Novu documentation or reach out to the Novu community for more specific queries or feature requests (3) .
Got it. Tagging @Support for additional help.
Hi @LUCKY variants can actually just be an if statement in your workflow definition. Both for content and for configuration.
Do you have a particular usecase in mind you are trying to achieve?
Hey @Dima Grossman
Many thanks for your reply
Ah I see, I could use the payload and based on it write a different logic, makes sense.
I am just trying out echo, as I like the code-first approach, attached a screenshots
Quick question:
- Will the end-result of Novu Framework always be the Cloud Configuration. It's basically, like terraform, but for Novu?
- In my example, will it create 2 variants and for each email + push? Can users still modify and say that they want to disable email?
- How can I define that I want to send it over OneSignal for push and SendGrid for Email?
Many thanks!
You will need to add your if statements inside of your step functions and not outse, the workflow engine hydrates state so the workflow definition function should always have the same step structures
The framework sdk will use your provider configurations from the cloud integrations page. So if you have email defined with sendgrid, it will use sendgrid
User preferences work exactly like they work today, so if a user disabled email for a specific workflow in his preference it will be appleid to your workflow definition
@Dima Grossman sorry, I don't fully understand the first point, do you mean like this?
Yes! Another option if you still want to keep them seaparate to easily preview content in the UI, each step has a
skip
method. If you will use it, you will be seeing them as separate steps in the web editor@Dima Grossman thanks for helping me with the first workflow, I like the overall code-first concept. Can we use it with our self hosted Novu? Which Echo URL should we use?
Many thanks
Hi @LUCKY the OSS Community Edition will rollout around mid-or and July, we are doing a big release next week on cloud and OSS will come next
@Dima Grossman many thanks for the update, great!