Notifications
These broadly follow the same method as each of the other entities. Given there wide use cases we have provided some more detail to help you work around the finer detail
To create a notification through the API the easiest way is to create one through the UI and then retrieve it through the API and use it as a template
The examples below show how to create the 2 most common types, an email notification and a postback (webhook) notification
C#
BOUserFormNotification bufn = new BOUserFormNotification();
bufn.UserFormId = formId;
bufn.UserFormNotificationId = 0;
bufn.NotificationType = 6;
bufn.EmailSubject = "New Survey completed";
bufn.Recipient = "user@user.com";
service.Add(bufn, credentials);
bufn = new BOUserFormNotification();
bufn.UserFormId = formId;
bufn.NotificationType = 3;
bufn.HTMLPostBackAddress = "https://myserver..."
service.Add(bufn, credentials);
Notification Types
EMAILNONE = 1,
SMS = 2,
POSTBACK = 3,
EMAILHYPERLINK = 4,
EMAILCSV = 5,
EMAILXML = 6,
EMAILHTML = 7,
JOBSTATUS = 8,
EMAILSSRS = 9
Please note that HTMLPostBackAddress property is only required when using notification type: 2 - PostBack.
Please note that EmailSubject and Recipient properties are required for all notification types, except when using notification type: 2 – PostBack
Retrieving Notifications
You can retrieve All or a specific notification using the methods described elsewhere - an example is below
C#
BOUserFormNotification bufn = new BOUserFormNotification();
bufn.UserFormId = formId;
bufn = service.RetrieveById(bufn, credentials);
object[] myNotifications = service.RetrieveAll(new BOUserFormNotification(), crendentials);
BOUserFormNotification firstNotification = (BOUserFormNotification)myNotifications[0];
Deleting Notifications
You can also delete a notification
C#
BOUserFormNotification bufn = new BOUserFormNotification();
bufn.UserFormId = formId;
bufn = service.RetrieveById(bufn, credentials);
BOUserFormNotification bufn = new BOUserFormNotification();
bufn.UserFormId = formId;
bufn = service.Delete(bufn, credentials);