User Preferences Question pt 2

going back to this thread, I had another question. Is it possible to have user preferences about a channel that is never used in a workflow? For example, I have a "file collected" workflow which sends an in app notification, then has a custom step that triggers my summary email step. In my summary email step I would like to check the email preferences for the "file collected" workflow. However, the only preferences that seem to exist are in app notifications because that is directly used in the file collected workflow. Here is the relevant snippet of the json response i get back from my list preferences call. as you can see the only channel is in_app .
{
"enabled": true,
"channels": {
"in_app": true
},
"overrides": [
{
"channel": "in_app",
"source": "subscriber"
}
],
"workflow": {
"slug": "file-collected_wf_fqWQs23645XzGn2X",
"identifier": "file-collected",
"name": "file-collected"
}
},
{
"enabled": true,
"channels": {
"in_app": true
},
"overrides": [
{
"channel": "in_app",
"source": "subscriber"
}
],
"workflow": {
"slug": "file-collected_wf_fqWQs23645XzGn2X",
"identifier": "file-collected",
"name": "file-collected"
}
},
4 Replies
Pawan Jain
Pawan Jain2w ago
@Jonathan Licht Could you please share which sdk method you are using to fetch subscriber preferences?
Jonathan Licht
Jonathan LichtOP2w ago
const preferences = await novu.subscribers.preferences.list(subscriberId); actually, now im thinking we might send real time emails for the file-collected workflow as well. Is there any recommendation for how to store the summary email preferences? It does not seem like this fits into Novu's preference data structure.
Pawan Jain
Pawan Jain2w ago
@Jonathan Licht Subscribers have data attribute which can be used to store digest preferences https://docs.novu.co/platform/concepts/subscribers#subscriber-attributes and then use skip function https://docs.novu.co/framework/skip @Jonathan Licht Just want to check if you got chance to check custom data attribute and skip function?
Jonathan Licht
Jonathan LichtOP2d ago
Sorry just getting back to this, I think I am going to hold off on this work for a little bit. However, I think the subscriber.data idea and skip function could work well for this. Thank you!

Did you find this page helpful?