Business Hours and Public Holidays for Next Service Recommendations
The Restocker create next service modal screenflow relies on Salesforce's Business Hours in order to detect and suggest dates that land on weekdays and non-public holiday days.
Business Hours must be configured for the business at a top level.
Adding Public Holidays
Public holidays are held in Business Hours, one set per region. A holiday only affects the regions it is attached to.
- In Setup, search for Holidays and click New. Enter a name and the date. Tick Recurring Holiday for holidays that fall on the same date every year (Salesforce also supports rules such as "second Monday").
- In Setup, search for Business Hours and open the record named Restocker plus the region (for example Restocker QLD).
- In the Holidays related list, click Add/Remove, tick the holiday and save.
- Repeat for every region the holiday applies to. State public holidays differ, so a holiday must be added to each region's business hours separately.
- To remove a holiday from a region, use Add/Remove again and untick it. A holiday that is still attached to any business hours cannot be deleted.
Check or Fix a User's Region
The flow reads Region from the running user's record (QLD, NSW, SA, TAS, ACT, NT, VIC, NAT). Open the user in Setup and check the Region field. The Business Hours names must match: Restocker followed by a space and the region code.
Adding a New Region
- Create a Business Hours record named Restocker XXX (the region code), open Monday to Friday, closed Saturday and Sunday, with the region's timezone.
- Make sure the region also exists in the user Region list.
- The helper uses the region to decide the timezone through FieldTimeZoneHelper. A region that is not listed there uses Sydney time. Ask a developer to add it if the new region is in a different timezone.
Troubleshooting
|