When we disabled global notification using updateGlobalPreference,

we will get the reset password email or not ?
14 Replies
Chirag parmar
Chirag parmarOP2mo ago
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 ?
Chirag parmar
Chirag parmarOP2mo ago
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 ?
No description
Chirag parmar
Chirag parmarOP2mo ago
No description
Tomer Barnea
Tomer Barnea2mo ago
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?
Chirag parmar
Chirag parmarOP2mo ago
@Tomer Barnea Actually, when i disabled global config we want disabled sending email for selected subscriber , except some impportant email like reset password etc.
Tomer Barnea
Tomer Barnea2mo ago
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?
Chirag parmar
Chirag parmarOP2mo ago
@Pawan Jain Waiting for your reply
Pawan Jain
Pawan Jain2mo ago
@Chirag parmar Can you share transactionId from this trigger?
Chirag parmar
Chirag parmarOP2mo ago
@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?
Pawan Jain
Pawan Jain2mo ago
@Chirag parmar I am able to reproduce the bug. Global subscriber preference should be given more priority than workflow preference
Pawan Jain
Pawan Jain2mo ago
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.
Chirag parmar
Chirag parmarOP2mo ago
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
Richard Fontein
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 🙏
Want results from more Discord servers?
Add your server