process-mining
2024.10
true
UiPath logo, featuring letters U and I in white
Process Mining
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Nov 11, 2024

Due dates

Introduction

The Due dates dashboard displays information regarding cases meeting or not meeting deadlines and the related costs. Due dates can be predefined to set a significant stage or activity deadline in processes. The Due dates dashboard can be used to analyze various aspects of due dates in the processes. Using this dashboard, predefined due dates in the process can be examined, such as a payment deadline or an SLA that needs to be met on time.

Due dates can have costs associated for due dates late.

Configuring Due dates

If you want to use the Due dates dashboard to analyze due dates, due dates must be defined for your app template.

If there are out of the box due dates available for your app template, these due dates will be shown in the Due dates dashboard. In the documentation for your specific app template you will find an overview of the available due dates. The App Templates page contains links to the documentation for all available app templates.

If no data is available in the due dates dashboard, you need to configure your own due dates in the models\5_business_logic\Due_dates_base.sql file using data transformations. Here you can also configure any default due dates to your business needs.
For Custom process you can also upload due dates using the Due_dates_raw.csv file. See Custom process input fields.

Adding business logic in transformations

In the last transformation step, business logic is added as needed for data analysis.

Each record in the due dates table represents one due date for a certain event. Example due dates are:

  • a payment deadline for a payment event.
  • an approval deadline for an approval event.
The mandatory fields for this table are the Event_ID, Due_date, Actual_date, and Expected_date.


Not all events will have a due date and some events may have multiple due dates.

Refer to Data transformations for more information.

Providing due date configuration input using dbt seeds

You can provide additional input data to be used for the calculations in the Due dates dashboard using a dbt seed file. The seeds\ folder of the app transformations for the app template contains a Due_dates_configuration_raw.csv file. For all due dates, you can provide the following fields.

Name

Type

Description

Due_dateTextThe name of the due date

.

Due_date_typeTextThe Due date type.
Fixed_costs

Boolean

An indication whether costs are fixed or time based.

Cost

Float

Fixed costs: The amount of costs.
Variable costs: The amount of costs per Time and Type_type.

Time

Integer

A number indicating the amount of time in case of time-based costs.
Time_typeTextType of time period for cost calculations. This can be any of the following values: day, hour, minute, second, millisecond.
The illustration below shows an example seeds file.
Example seeds file
See Transformations.

SQL examples for configuring Due dates

Below are some SQL examples that you can use to configure Due dates using transformations.
Attention:
The below SQL examples are based on Event log and Custom process app templates, and use Cases that have a Case_ID. If you want to use the SQL examples to define Due dates for Purchase-to-Pay app templates or Order-to-Cash app templates, make sure to use the appropriate entity and the related internal entity_ID. For Purchase-to-Pay you can use the Purchase_order_item_end_to_end_events event log, the Purchase_order_items entity and the Purchase_order_item_ID_internal as Case_ID. For Order-to-Cash you can use the Sales_order_item_end_to_end_events event log, the Sales_order_items entity and the Sales_order_item_ID_internal as Case_ID.

Activity X done before date Y

This SQL code identifies cases where the last occurrence of activity 'X' was done before date 'Y'.

with Event_log_base as (
    select * from {{ ref('Event_log_base') }}
),

Cases_base as (
    select * from {{ ref('Cases_base') }}
),

-- Last activity X of each case
Last_activity_X as (
    select
        Event_log_base."Case_ID",
        max(Event_log_base."Event_end") as "Event_end",
        max(Event_log_base."Event_ID") as "Event_ID"
    from Event_log_base
    where Event_log_base."Activity" = 'X'
    group by Event_log_base."Case_ID"
),

-- Last activity X should be done before Case date field Y
Activity_X_done_before_date_Y as (
    select
        Last_activity_X."Case_ID",
        {{ pm_utils.as_varchar('Last activity X before Cases date field Y') }} as "Due_date",
        Last_activity_X."Event_end" as "Actual_date",
        Cases_base."Case_date_field_Y" as "Expected_date",
        Last_activity_X."Event_ID"
    from Last_activity_X
    inner join Cases_base
        on Last_activity_X."Case_ID" = Cases_base."Case_ID"
)

select * from Activity_X_done_before_date_Ywith Event_log_base as (
    select * from {{ ref('Event_log_base') }}
),

Cases_base as (
    select * from {{ ref('Cases_base') }}
),

-- Last activity X of each case
Last_activity_X as (
    select
        Event_log_base."Case_ID",
        max(Event_log_base."Event_end") as "Event_end",
        max(Event_log_base."Event_ID") as "Event_ID"
    from Event_log_base
    where Event_log_base."Activity" = 'X'
    group by Event_log_base."Case_ID"
),

-- Last activity X should be done before Case date field Y
Activity_X_done_before_date_Y as (
    select
        Last_activity_X."Case_ID",
        {{ pm_utils.as_varchar('Last activity X before Cases date field Y') }} as "Due_date",
        Last_activity_X."Event_end" as "Actual_date",
        Cases_base."Case_date_field_Y" as "Expected_date",
        Last_activity_X."Event_ID"
    from Last_activity_X
    inner join Cases_base
        on Last_activity_X."Case_ID" = Cases_base."Case_ID"
)

select * from Activity_X_done_before_date_Y

Activity X done within 5 days after activity Y

This SQL code identifies cases for which the last occurence of activity 'X' happened within 5 days after the last occurence of activity 'Y'.

with Event_log_base as (
    select * from {{ ref('Event_log_base') }}
),

-- Last activity X of each case
Last_activity_X as (
    select
        Event_log_base."Case_ID",
        max(Event_log_base."Event_end") as "Event_end",
        max(Event_log_base."Event_ID") as "Event_ID"
    from Event_log_base
    where Event_log_base."Activity" = 'X'
    group by Event_log_base."Case_ID"
),

-- Last activity Y of each case
Last_activity_Y as (
    select
        Event_log_base."Case_ID",
        max(Event_log_base."Event_end") as "Event_end",
        max(Event_log_base."Event_ID") as "Event_ID"
    from Event_log_base
    where Event_log_base."Activity" = 'Y'
    group by Event_log_base."Case_ID"
),

-- Last activity X should be done at date of last Event Y + 5 days
Activity_X_done_within_5_days_after_activity_Y as (
    select
        Last_activity_Y."Case_ID",
        {{ pm_utils.as_varchar('Last activity X before last activity Y + 5 days') }} as "Due_date",
        {{ pm_utils.dateadd('day', 5, 'Last_activity_Y."Event_end"') }} as "Expected_date",
        Last_activity_X."Event_end" as "Actual_date",
        Last_activity_Y."Event_ID" as "Event_ID"
    from Last_activity_Y
    inner join Last_activity_X
        on Last_activity_Y."Case_ID" = Last_activity_X."Case_ID"
)

select * from Activity_X_done_within_5_days_after_activity_Ywith Event_log_base as (
    select * from {{ ref('Event_log_base') }}
),

-- Last activity X of each case
Last_activity_X as (
    select
        Event_log_base."Case_ID",
        max(Event_log_base."Event_end") as "Event_end",
        max(Event_log_base."Event_ID") as "Event_ID"
    from Event_log_base
    where Event_log_base."Activity" = 'X'
    group by Event_log_base."Case_ID"
),

-- Last activity Y of each case
Last_activity_Y as (
    select
        Event_log_base."Case_ID",
        max(Event_log_base."Event_end") as "Event_end",
        max(Event_log_base."Event_ID") as "Event_ID"
    from Event_log_base
    where Event_log_base."Activity" = 'Y'
    group by Event_log_base."Case_ID"
),

-- Last activity X should be done at date of last Event Y + 5 days
Activity_X_done_within_5_days_after_activity_Y as (
    select
        Last_activity_Y."Case_ID",
        {{ pm_utils.as_varchar('Last activity X before last activity Y + 5 days') }} as "Due_date",
        {{ pm_utils.dateadd('day', 5, 'Last_activity_Y."Event_end"') }} as "Expected_date",
        Last_activity_X."Event_end" as "Actual_date",
        Last_activity_Y."Event_ID" as "Event_ID"
    from Last_activity_Y
    inner join Last_activity_X
        on Last_activity_Y."Case_ID" = Last_activity_X."Case_ID"
)

select * from Activity_X_done_within_5_days_after_activity_Y

Analyzing Due dates

Due dates dashboard

The Due dates dashboard enables you to analyze the due dates that occur in the process.

Follow these steps to display the Due dates dashboard.

  1. Select Due dates in the menu on the left of the dashboard.

The Due dates dashboard is displayed.

Below is an overview of the available charts on the Due dates dashboard.

Chart

Description

Available metrics

Due dates detailsA bar chart showing details related to due dates based on the selected metric.
Number of cases
Total time late
Average time late
Percentage on time
Total cost*
Average cost*
Late historyA history chart showing the due date information for the selected period based on the selected metric.
Total time late
Average time late
Percentage on time
Total cost*
Average cost*
Difference distributionA distribution chart showing the number of due dates related to the amount of days late. 
* Total cost late and Average cost late are only available if the Fixed_cost and Cost are provided using the Due_dates_configuration_raw.csv seeds file.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.