Okay via a pipeline, thanks to Chayce Duncan, I was able to implement the below logic. What this does is sends a report to our foreman every day at 6pm, if they have not approved a time entry. I have...
I agree with Chayce. More than one email a day about Timecards will make you unpopular with the Foreman. The architecture change is to add Summary Fields in the relationships.
Your Pipeline Search Step is looking for records in the Foreman table where the # of Unapproved Time Cards > 0. Then check the Email box and then uncheck it so it is blank for tomorrow.
Your Notification is part of the Foreman's table but has a Link to the Time Cards Table where you filter on Foreman User.
Now you do not need any JSON at all.
Do it the way Chayce suggested.
------------------------------ Don Larson ------------------------------
Understood on all accounts gentlemen. The main purpose for the pipeline instead of the native QB notifications is the constraint of time. I could not figure out a way to send an email at an exact time. Only daily, weekly, and monthly. Please see the below photo. Unless I am missing something there, and I need these alerts to go out at 6pm EST every day, therefore, I thought I would have to rely on a pipeline for the time management. Currently our report looks like the snippet below labeled figured 2, and we are satisfied with this look if we could keep something similar. Also, Chayce to your point of sending one report and having the foreman filter, this is something we have thought about within our Dev team, however, we have to verify with our in field reps this will be acceptable to them. We dont want anyone to feel, "called out" either.
------------------------------ William Hunter ------------------------------
You will need to use a Notification instead of a Subscription. That has a Rich Text Editor that will let you build a pretty good looking email. You can easily spend more time on that then the architecture and Pipeline.
------------------------------ Don Larson ------------------------------
Don, but I will have the limitation of time here correct, I will not be able to send a notification at 6 pm everyday, only when some type of trigger occurs, correct?
------------------------------ William Hunter ------------------------------