Is it possible to create EMP Time Card Rejection Notification?
Hi guys,
I’ve noticed that there’s Pending Approval Notification for EMP Time Cards, but we want another notification working as following: whenever a time card is rejected, the owner/Employee should receive an email that he/she should check the reason, revise it accordingly and resubmit. So far I couldn’t find it anywhere in “Time & Expenses Preferences”. Is it possible to achieve it?
Thanks.
Page 1 / 1
Hi @shuang57 You should be able to do this using Business Events. Here are a few links that might help
Video on how to send an email using Business Events
Hi @shuang57 ,
Create a GI, displaying all the records for which you want to send the notification.
Then by using Business Events and GI, you can trigger BE on record Insert.
Select the Keys fields in the Group record by
Hi @Anacarina Calvo@parveza33 thanks for both of your answers. I’m trying to figure out how “Business Events” works, and kinda stuck at the first step, which is to create a Generic Inquiry of displaying all the time cards that have been rejected.
I basically followed the steps here, changing all “TCType” to “TCStatus” and didn’t wirte the code on step 6:
And it turned out weird like this:
I mean at least we don’t have 378972 time cards in our system…
Is there any more specific instuction on this one? Thanks again.
Regards,
Shuang.
@shuang57 can you share the Generic Inquiry? On the Generic Inquiry form, use the Export as XML option
Hi @Anacarina Calvo here’s the XML file. Thank you!
Hi @shuang57 One way to accomplish the result would be to create a generic Inquiry that lists the time cards so that on the Business event, the trigger condition is if the status is Rejected. On your Generic Inquiry i see you are joining the Time card with the summary and later, again with the time card. The later join those not have a condition that so it bring duplicated results. I You can create the GI with only one table, the Timecard table. See the example attached
Then create the business event based on the status
Hi @Anacarina Calvo thanks a lot. I have revised my generic inquiry based on your suggestion and now the result looks good :)
Below shows the outcome if I filter the status as “rejected”. If I don’t filter, it will show all the records of EMP time cards.
And then I watched the video on how to send an email using Business Events, and set up the notification template, automation schedule and business event.
I had the schedule run for once, and when I tried to check the Email Pending Processing, there should be 5 emails ready to be sent, right? But instead there shows no record.
Do you have any idea where I might set wrong possibly? Thanks again.
Hi @shuang57 If you want an email to be sent every time a time card is rejected then you need to set the Business event with Type Trigger by Record Change, instead of Trigger by Schedule.
Hi @Anacarina Calvo
If I change the type from “trigger by schedule” to “trigger by record change”, the schedules tab disappears as the screenshot below shows. So it’s ok that I don’t link this business event to an automation schedule, right? An automation schedule isn’t needed in my case? Thanks!
@shuang57 correct, you will not need an Automation Schedule. Trigger by Schedule is used when the event is executed at the times and frequency specified on the Automation Schedule.
Hi @Anacarina Calvo
I tested with only Generic Inquiry, Notification Template and Business Event, but it didn’t work. When I rejected an employee’s time card, she didn’t receive any email, and there’s nothing shown in “Emails Pendings Processing” page.
Any idea where could be wrong? Is it possibly because I haven’t set up the basic configuration of sending email from the admin email address, if there’s any? And how should I check it?
Hi @shuang57 On the Business Event screen, use the action View History
This is how it should look like, notice that the status says a check meaning that it was executed correctly
On the All Emails (CO409070) screen you should also see the email as well
Hi @Anacarina Calvo
seems like it didn’t work. How is the error text supposed to mean? And What needs to be done to clear it?
btw the status was a yellow exclamation mark (completed with errors) when I first checked it. I tried to click the execute button, and then it became red (failed). Thank you for your help!
Hi @shuang57 What was the error message when the status was a yellow exclamation? Also, I would try setting the email configuration and define the From on the email
Hi @Anacarina Calvo yes the message has been the same.
Meanwhile I’m starting to try the email configuration. Thank you!
Hi @shuang57 were you able to find a solution? Thank you!
Hi @Chris Hackett I have checked the email configuration and it seems to be the issue. As for the configuration of Business Events and Notification Template, I think they are good now. Once we connect our admin email address to the system it should work. Thanks for asking.