Highlighted
Roast Chef
Roast Chef

Custom SFM Workflow

Hello all,

Within our environment we have a custom SFM that each user is to complete each day. I would like to try to build a workflow that notifies the back office when the daily task isn't completed? I can't see a way to do this, it only shows me options to trigger an email via workflow when a record is created and/or modified - I really would like to flag when a record hasn't been created on a business day? Anyone got any ideas with this?

Regards,

Mark

Message 1 of 6
5 Replies
Staff Chef
Staff Chef

Re: Custom SFM Workflow

Hi Mark Varley, can you share more details on this please? What is the SFM for and I guess more importantly what does it do? Does it create a record or update an existing record? Is there one record per day or is the same one updated each day?

I have a few ideas but think I need to know a bit more about the use case before I point you in a direction.

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Message 2 of 6
0 Likes
Reply
Roast Chef
Roast Chef

Re: Custom SFM Workflow

Hi Richard Lewis​ thanks for the reply!

The SFM is a custom built one that our engineers have to complete each day, one at the start of their working day and one at the end of their working day. It creates a record called 'Safety Check' and 'Return Home' - these are to capture several fields about the engineers day and the condition of his tools, vehicle etc. ensuring we comply with a duty of care to our employees. I would like really to be able to develop something that would notify (by email alert) when one of these isn't done by a specific group of users (with a specific role profile). Hope this helps to explain, any help you can give would be great - your help has been great so far with different things we have!

Regards,
Mark

Message 3 of 6
Pastry Chef
Pastry Chef

Re: Custom SFM Workflow

We used to do something very similar: At the start of the techs day they would create a record called "Start my Day", then at the end of the day create a different one called "End my Day". Because they were separate records in Salesforce, it was difficult to easily calculate the difference between time stamps, check if someone had started but not finished etc.

To resolve this, we put them both onto the same record and called it a "Day" record. So at the start of the day they create it and record their start time. Then at the end of the day, they use a search to find it and edit it to record their end of day time. So now we have both start and end on a single record in Salesforce so we can use formula fields to calculate the total working day time, reports to find records that are started but the end date is blank etc.

Message 4 of 6
Staff Chef
Staff Chef

Re: Custom SFM Workflow

Hi Mark, thanks for the praise . Glad I have been helpful.

Adam Cooper's solution sounds solid to combine them into one record.

You can have two sets of fields if you need to record the same data twice and you can have two validation rules to make the important fields required depending on a status of the record which could be 'starting day' or 'ending day'. Your two different SFMs would map this status accordingly. Alternatively you could determine which fields are required at page layout level as you will have different page layouts for the start and end day SFMs. Thus avoiding the validation rules.

I also suggest that the search you use is filtered based on these fields. To start their day engineers would create the record and to end their day they would use a search filtered on only those records in the status of starting day or possibly records that had a required field that is only populated at the end of the day blank.

Make sure not to make start or end of day fields required at field level and only on page layout or with validation rules.

When it comes to reporting/notifications how about this as a solution. Create a report that shows records that are in a status of day started and were created less than or equal to yesterday. Then you can ask your users who need the notifications to subscribe to this report. They can set to only receive it if the number of records is greater than or equal to 1. So they only get emails when they need it. They can also set to receive it at the start of each day or at a different point during that day, once per day.

You can also setup a report to be emailed out on a schedule but it will email it out even if its got no records.

The details to set this up should be found here.

Help | Training | Salesforce

Let us know what you think as there are other solutions.

Regarding how to tell when the record hasn't been created then you could create the records for the technicians via dataload and have a status on them of new. Then report on those that haven't had the status changed. The search for the tech in this case could look at those with a date of today based on a date field you have loaded when you created them. A downside with this is having to do some loads and also that when a Tech is off either they or the back office will have to update the records with a status of cancelled or offshift or similar.

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Message 5 of 6
Staff Chef
Staff Chef

Re: Custom SFM Workflow

HI Mark Varley​, how did you get on with this? Did you manage to resolve your problem?

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Message 6 of 6
0 Likes
Reply