From version 10.0 Bee’s Knees Configuration Engineers are able to create and send Notifications.
Here you can see a couple of examples
Notice usage of Notifications API with builder patternThis article will show you how to do it.
Each notification has one of four statuses (info, success, warning, error) and will end up in Notification center.
Take a look at Notification (Technical User Reference) for API reference.
...
Here you can see a couple of examples
Notice methods of Notifications API and usage of builder pattern.
Code Block | ||||
---|---|---|---|---|
| ||||
// Simple success notification with a link to the quote
user = api.user("loginName")
quote = "896.Q"
api.notificationApi()
.withRecipient(api.user("loginName"))
.withTitle("Quote review requested ")
.withSuccessStatus()
.withSource("896.Q")
.withContextLink("Go to P-896", AppPages.QC_DETAILS_PAGE, "896.Q")
.withDownloadActionType("asyncdownloadmanager.download/Pricefx_seeddata_DMDS_Customer_20221111_100755_nvgg4.zip")
.withMessage("Quote created by $user needs your attention.")
.send() |
Code Block | ||||
---|---|---|---|---|
| ||||
// Creates a notifications with a deep-link to a specific Quote to a particular tab. E.g. P-896, tab: dashboard. api.notificationApi() .withRecipient(api.user("loginName")) .withTitle("New insight found") .withInfoStatus() .withSource("896.Q") .withContextLink("P-896.", AppPages.QC_DETAILS_PAGE, [id: "896", tpTab: 'dashboard']) .withMessage("We found an issue with the Quote P-896. Go to") .send() |
...