Set notification preferences

Ask the Community

Set viewer notification preferences from your UI


Overview #

This method allows you to set notification preferences for the current viewer.
Vanilla JavaScript:
window.CordSDK.user.setNotificationPreferences({ sendViaSlack: true, sendViaEmail: true});
window.CordSDK.user.setNotificationPreferences({ sendViaSlack: true, sendViaEmail: true});
Copy

What this function returns #

A promise that resolves to true if the operation succeeded or rejects if it failed.

Arguments this function takes #


preferences #

required
Partial<NotificationPreferences>
An object with two optional properties, sendViaSlack and sendViaEmail, to specify the new notification preferences for the viewer.

This is an object with the following fields:

Show property details


Not finding the answer you need? Ask our Developer Community

Ask Cordy