Scheduled report on Unreturned Devices

prash4
Tera Expert

I am working on Scheduled report and i was stuck at calculation duration to it.

 

Requirement is: 

 

there is a report called unreturned devices - 

 

  1. Duration Trigger based off age of ticket – (created and updated relative 3 days i mean not updated since created) 
  2. Sent to user in requested for field in SCTASK
  3. email report needs to send every Monday 8 am to requested for in the ticket 

how can i - not happening with standard report schedule.

 

2 REPLIES 2

Suryansh Verma
Mega Sage

Hello @prash4 

 

A scheduled report is not suitable when the recipient must be dynamically determined from each SCTASK because scheduled-report recipients are configured statically.

Create a weekly scheduled flow that runs every Monday at 8:00 AM. Use Look Up Records on sc_task to find active unreturned-device tasks created more than three days ago, with a non-empty request_item.requested_for. Process the returned records with For Each and send the reminder to request_item.requested_for.email.

Use an explicit device-return status or Boolean field instead of relying only on sys_updated_on, because unrelated system or agent updates can change the Updated timestamp even though the device remains unreturned. For a production design, fire a custom event for each task and use an event-based notification so the email template and recipient confguration remain within the standard Notification framework.

 

If it is helpful, please mark it as helpful and accept the correct solution by referring to this solution in the future, it will be helpful to them.

Tejas Adhalrao
Kilo Sage

hi @prash4  ,

Based on what you've described, the challenging part is sending the report to the user in the Requested For field for each individual SC Task. Scheduled reports don't dynamically resolve recipients from report data; the recipients are static.

For the report filter, you can use conditions such as:

  • State = Open (or the appropriate active state)
  • Created on is more than 3 days ago
  • Updated on = Created on (or Created = Updated if you specifically want records that have never been updated)

For the email requirement (every Monday at 8 AM to the Requested For user), I'd recommend using a Scheduled Script Execution or Flow Designer Scheduled Trigger instead of a scheduled report. The scheduled job can:

  1. Run every Monday at 8 AM.
  2. Query the qualifying SC Tasks.
  3. Group them by the Requested For user.
  4. Send each user an email containing only their relevant records.

This approach is more flexible and is the recommended solution for dynamic recipients.

 

If this helped, please mark it as Helpful. If it resolved your issue, please mark it as the Accepted Solution.