Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello,
It would be great to get some feedback on the following:
Thanks for any suggestions!
Regards,
Constantine
Solved! Go to Solution.
Dear Constantine,
In order to create a Notification with a custom Trigger programmatically, the following services need to be called one after the other :
> This sequence will provide you with a working Notification that, for example, sends an email every time a specific alert is triggered.
Please note that calling above mentioned services 3, 4, 5 and 6 in a custom javascript service will lead to error "ReferenceError: "NotificationDefinitions" is not defined" or "ReferenceError: "NotificationContents" is not defined". This has been reported to R&D and is planned to be fixed in ThingWorx 9.0
In the current state of things these services can be used through REST calls or, in the case of NotificationDefinitions, directly under the Generic Services of Notification Entities as well as in mashups.
Hope this helps,
Charlotte
Hi,
I know you found this info already, but I will share here in case someone else is interested in.
1. Until now, there are no plans to deprecate the notifications facility.
2. I didn't find any service that is creating Triggers for notifications.
Best regards,
Raluca Edu
Dear Constantine,
In order to create a Notification with a custom Trigger programmatically, the following services need to be called one after the other :
> This sequence will provide you with a working Notification that, for example, sends an email every time a specific alert is triggered.
Please note that calling above mentioned services 3, 4, 5 and 6 in a custom javascript service will lead to error "ReferenceError: "NotificationDefinitions" is not defined" or "ReferenceError: "NotificationContents" is not defined". This has been reported to R&D and is planned to be fixed in ThingWorx 9.0
In the current state of things these services can be used through REST calls or, in the case of NotificationDefinitions, directly under the Generic Services of Notification Entities as well as in mashups.
Hope this helps,
Charlotte