0 Notify Staff of New Security Signal Shared by Sharee Bryant, Colorado Community Church 2 days ago 15.0 CRM, Workflow Beginner Description We recently started using a Safety and Security Signal to provide staff with a visual queue of safety or security issues on profiles. In conjunction with that, we wanted a way for our staff to be notified when a new signal had been added to a profile. We accomplished this by creating a data view for any new signals created in the past 24 hours, a workflow to send an email to a staff group, a data view to workflow job, and a dynamic data report to list all signals of that type. (There might be a cleaner way to accomplish this, but I went with the simplest way I could think of...)Here is how we accomplished this: 1. Create your Signal (if needed) If you do not have a Signal already created to hold the information, you can create one by going to Internal Homepage > Admin Tools > Rock Settings > Security > Personal Signal Types by default. Please take note of the signal type Id to be used later. 2. Create the Data ViewCreate your Data View at Internal Homepage > Tools > Reporting > Data Views by default. This data view returns any personal signals with the designated signal type id created in the past 24 hours. Applies To: Personal Signal Filters: Show if ALL of these are TRUE Filter Type: Personal Signal Fields Created Date Time > Range > Last > 24 > Hours Filter Type: Personal Signal Fields Signal Type Id > Equal To > [Enter your Signal Type Id here] 3. Create your Report pageCreate a new page in your system. Ours is under Internal Homepage > Tools > Reporting. Please put your page wherever makes the most sense for your organization. (I am not an avid SQL writer... So some of my columns may be obsolete in my query.)Basic Settings: Page Title: Safety & Security SignalsBasic Settings: Site: Rock RMS Basic Settings: Layout: Full WidthIcon CSS Class: fa fa-flagMake note of your page URL for use in the workflow.Add a Dynamic Data (Obsidian) Block with the following SQL Query: (Please adjust the second-to-last line with your Signal Type Id number) SELECT ps.[CreatedDateTime] AS [SignalCreatedDate], p.[Id] AS [Person], p.[FirstName], p.[LastName], ps.[SignalTypeId], st.[Name] AS [SignalTypeName], ps.[Note] AS [SignalNote], owner.[FirstName] + ' ' + owner.[LastName] AS [StaffContact], ps.[ExpirationDate] AS [SignalExpirationDate] FROM [PersonSignal] ps INNER JOIN [Person] p ON p.[Id] = ps.[PersonId] INNER JOIN [SignalType] st ON st.[Id] = ps.[SignalTypeId] LEFT JOIN [PersonAlias] pa_owner ON pa_owner.[Id] = ps.[OwnerPersonAliasId] LEFT JOIN [Person] owner ON owner.[Id] = pa_owner.[PersonId] WHERE ps.[SignalTypeId] = 1 ORDER BY ps.[CreatedDateTime] DESC Column Settings as follows: Signal Created Date: Set as Date, Enable Filtering Person: Set as Person, Enable Filtering First Name, Last Name, Signal Type Id, Signal Type Name: All set to Hide from Grid Signal Note: Set as Text, Enable Filtering Staff Contact: Set as Text, Enable Filtering Signal Expiration Date: Set as Date, Enable Filtering Additional Settings toggled on: Person Report Enable Sticky Header Enable Export Selection URL: ~/Person/{Person}/Security 4. Create your Workflow The workflow is attached to this recipe. You just need to download and import it into your system. The customizations needed are:Change the default value for the "Staff Group" attribute to whichever distribution group you want the notification email to be sent to. Change the page link in the body of the email to point to the report page you previously created.Customize the text in the email, if needed. 5. Create your new System JobSet up a Data View to Workflow job type to run each day at Internal Homepage > Admin Tools > Rock Settings > System Settings > Jobs AdministrationName: Safety & Security Signal NotificationDescription: This job launches a workflow to send an email to staff if any new Safety & Security signals have been added within the past 24 hours.Cron Expression:0 0 8 1/1 * ? * (Ours is set to run at 8 am every day. You can adjust this to your preferred schedule accordingly.)Job Type: Data View to WorkflowData View: The data view you created earlierWorkflow: The workflow you created earlier That's it. The job will run every morning, and if there are any signals that have been created in the past 24 hours, an email will be sent to staff directing them to the report page to review the signals. Hopefully it works well for you! Reach out on Rocket Chat @sharee.bryant if you have questions. Download File