Update email addresses for events based on organization

If I have multiple organizations, each one representing a group of people that are responsible for their devices. All devices are the same hardware and so I want to use the same device type to automate their creation.

But, the events associated with the device type, such as events that send emails or post to slack channels, I would want to change the email addresses to go to the emails of the people belonging to that organization. So they only get alerts for their devices.

Is there a way to do this without creating a new device type with new events and new email addresses?

Ideas

  1. Instead of the events associated with the device type sending the emails directly, can it trigger an Ubifunction, that then reads what organization the device that generated the event belongs to, then reads a list of emails associated with that organization and sends them the email alert.

But where would that list of emails and slack channels be stored for each organization?

  1. Instead of the device type setting up events, I could put all devices within an organization into a Device group and do global events. This way they can use the same device type. But the problem is that if there are lots of events I have to manually create all of them for each organization. Does not scale very well if i’m creating and removing organizations a lot.

Do you have any better ideas to make this a cleaner process and/or automated? That way a customer or group of people can supply their email addresses to get alerts on, and all I have to do is update it in one spot to update all events for that organization.

Hello @guitardenver,

Unfortunately, at the moment it is not possible to associate the mail with the organization they belong to. I’m going to pass this as a suggestion for the team. We are currently working on new endpoints that will allow greater scalability and management of organization and events by API.

Cheers,
Maria H.