Set Subscriber Preferences Then Notify
A 3-step recipe with Novu. We can help you get access.
Recipe · 3 steps
Set Subscriber Preferences Then Notify
with Novu
Retrieve subscriber, set their channel preferences, then trigger a workflow.
- Retrieve the subscriber by id to confirm they exist before changing their preferences.
- Patch the subscriber's channel preferences for the supplied workflow so the upcoming trigger respects their channel choices.
- Trigger the workflow to the subscriber; delivery honors the preferences set in the previous step.
What you'll need to have ready
- subscriberId: The identifier of the subscriber.
- workflowId: The workflow identifier whose preferences to set and trigger.
- channels: Channel toggles (email, sms, in_app, push, chat) as booleans for the subscriber's preferences on this workflow.
- payload: Custom payload object used to render the workflow.
For your developer
Arazzo workflow novu:set-preferences-then-notify, 3 operations: SubscribersController_getSubscriber → SubscribersController_updateSubscriberPreferences → EventsController_trigger. Specs on APIs.io.