Process Mining
latest
false
Banner background image
Process Mining
Last updated Apr 17, 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.

Out-of-the-box Due dates for Purchase-to-Pay app templates

Below is an overview of the Due dates that are available for Purchase-to-Pay related app templates.

Expected payment

The Expected payment due date allows you to analyze whether payments made for invoices are in time or not. For Expected payment due date, the Actual date is based on moment of the Create payment or Create outgoing payment event. The Expected date for the due date is defined based on the Invoices_base.Baseline_date with the Invoices_base.Net_payment_period added to it.
Important:
In case any of the fields are not defined and the Actual date or Expected date cannot be determined, the Expected payment due date will not show up in the Due dates dashboard.
Note:
Only completed payments (Payments.Payment_is_complete = true) are taken into account.

PR to PO throughput time

The PR to PO throughput time due date allows you to analyze the time it takes to between creating a purchase requisition and the creation of the purchase order item.

The Actual date is the Create purchase order item event, the Expected date is based on the Create purchase requisition event combined with the standard deviation of all known throughput times between PR and PO.

Out-of-the-box Due dates for Order-to-Cash app templates

Below is an overview of the Due dates that are available for Order-to-Cash related app templates.

Expected payment

The Expected payment due date allows you to analyze whether payments made for invoices are in time or not. For the Expected payment due date, the Actual date is based on moment of the Create incoming payment event. The Expected date for the due date is defined based on the Invoices_base.Baseline_date with the Invoices_base.Net_payment_period added to it.
Important:
In case any of the fields are not defined and the Actual date or Expected date cannot be determined, the Expected payment due date will not show up in the Due dates dashboard.
Note:
Only completed payments (Payments.Payment_is_complete = true) are taken into account.

Expected delivery

The Expected delivery due date allows you to analyze whether deliveries are done in time or not.

For the Expected delivery due date the Actual date is based on the Deliveries.Delivery_date and the expected date is the Deliveries.Planned_delivery_date.
Important:
In case any of the fields are not defined and the Actual date or Expected date cannot be determined, the Expected delivery due date will not show up in the Due dates dashboard.

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 app template documentation you will find an overview of the available due dates. See 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.

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.
See the illustration below for an example.
docs image
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.
Note:
Depending on the SQL dialect you may need to change the quoting from " to `.

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.