When we disabled global notification using updateGlobalPreference,
we will get the reset password email or not ?
14 Replies
Also I disabled like below code
await this.novu.subscribers.updateGlobalPreference(subscriberId, {
enabled: enabled,
preferences: [{
type: ChannelTypeEnum.IN_APP,
enabled: enabled
},
{
type: ChannelTypeEnum.EMAIL,
enabled: enabled
},
{
type: ChannelTypeEnum.SMS,
enabled: enabled
},
{
type: ChannelTypeEnum.CHAT,
enabled: enabled
},
{
type: ChannelTypeEnum.PUSH,
enabled: enabled
}]
});
But still got the email eveen i disabled global preference so why is happen ?
I'm schecked for this subscribe id : "4632913b-9103-4df4-b2b5-190176ad1a51"
you can check all the preference disabled but when i send email i get the email so why is happen ?
Hey @Chirag parmar great question, we actaully talked about it in the team yesterday. Prefrences are working in a priority based on granularity. In this case it means workflow level config have higher priority than global level config. Would you mind sharing what were you expecting?
@Tomer Barnea Actually, when i disabled global config we want disabled sending email for selected subscriber , except some impportant email like reset password etc.
I'll loop in @Pawan Jain but I think you should have it on global: off, password-reset: on to make it happen, but I'll let Pawan take that. @Pawan Jain can you confirm that?
@Pawan Jain Waiting for your reply
@Chirag parmar
Can you share transactionId from this trigger?
@Pawan Jain I have disbaled global notification for this subscriber
"subscriberId": "e7f8ea9a-b0d7-40f7-a668-d079eeabf6d2",
After disabling, I tried to send an email with the traction ID "d71be307-a095-435b-85e3-bec7bf94a702." The email didn't send, but it still appears to have been sent. Why is this happening?
@Chirag parmar
I am able to reproduce the bug.
Global subscriber preference should be given more priority than workflow preference
I have created an internal ticket. I will keep you updated on this
@Chirag parmar
I just got an update from team, if you change the workflow level preference then worklfow level preference will take precedence than global preference.
Yes, but i have updated global preference like this
await this.novu.subscribers.updateGlobalPreference(subscriberId, {
enabled: enabled,
preferences: [{
type: ChannelTypeEnum.IN_APP,
enabled: enabled
},
{
type: ChannelTypeEnum.EMAIL,
enabled: enabled
},
{
type: ChannelTypeEnum.SMS,
enabled: enabled
},
{
type: ChannelTypeEnum.CHAT,
enabled: enabled
},
{
type: ChannelTypeEnum.PUSH,
enabled: enabled
}]
});
if we update global then automatic all workflow will be disabled or enabled but still send email
Hi @Chirag parmar , we identified an edge case where using the Subscriber Preference API with new Workflows resulted in the preference resolution not respecting Subscriber Preferences. The fix was deployed yesterday.
Please try again and let us know if you see any further issues 🙏