Once the day ends at midnight, the status of activities can no longer be updated, so
what happens to activities that haven't been completed by the end of the workday?
If you've set a value other than 0 in the Overnight Work field on the Business Rules
screen, your workday will end at that specified time instead of midnight.
To prevent having to manually create new work orders for activities that are still
pending at the end of the day, you can set up a message scenario that runs just
before the workday ends. This scenario will automatically mark those activities as
non-scheduled using the unschedule_activity action. The activities will stay
assigned to the same resource, but they’ll no longer be tied to a specific time or
route position.
How it works:
- The scenario runs shortly before the workday ends.
- It applies to all activities that are still pending in the day's routes.
- The trigger (launch condition) for this scenario is Activity is created.
Note: If you're already using the Activity is created
condition in another scenario, you won’t be able to create a new one with the
same trigger. In that case, simply add the necessary steps to your existing
scenario instead. Just open the scenario and start from Step 3 in the
configuration process.
Here’s what to do.
-
Navigate to Configuration and select Message
Scenarios. Click + in the left column to add a scenario. Name
it, create a label, and define the start date. If you want, add an end date as
well. Click OK.
-
Select the new scenario from the list in the left column.
-
In Launch Conditions, click Add
New, and then select the Activity is created launch condition.
Click OK.
-
In the Scenario Steps section, click the Add
New link to add the step that will set pending activities to
non-scheduled. The Settings tab opens by default.
- Enter a name for the step, for example, Move to
non-scheduled.
- Select Start in the Type drop-down list.
- Select Set Property in the Delivery Channel
drop-down list.
- Select Use static address in the Recipient field,
and then specify the time zone that is set for Overnight Work on the
Business Rules screen.
- Select day of route for Sending time and leave
the days setting at 0.
- Define the time in the Start time field at 10:30 p.m., with a Message
expiration interval value of 1 hour and 30 minutes. Leave the rest of
the settings at their defaults.

- Now click the Patterns tab.
- Enter action for the Subject and unschedule_activity for the Body. This is the
required method used to set a pending activity to non-scheduled.
- Select Generate content on message creation.