# Trending Late

## Overview

The <code class="expression">space.vars.Product\_TrendingLate</code> feature allows you to display an estimated likelihood for delay on the <code class="expression">space.vars.Product\_OrderStatus</code> to enhance transparency around delivery delays, while reducing customer service inquiries and retaining customer satisfaction. The trending late status is also displayed in tracking records in the <code class="expression">space.vars.Product\_pLApp</code>. &#x20;

The trending late status is calculated using our machine learning algorithm based on thresholds tailored to your shop through our trending late model, which considers factors that may impact delivery timing based on industry and carrier data. All predictions are referenced against the `announced_delivery_date` to predict the probability of a delay for trackings (for example: generated using [Promise](https://docs.parcellab.com/docs/convert/promise)), resulting in highly accurate and reliable predictions.

<figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FPQJ5BYyGZPsFem7PM1fH%2FTrendingLateOrderStatusPage_Warning.png?alt=media&#x26;token=faab2cf6-ac41-43a0-aca2-2c3a55bce7cb" alt="Order Status page with trending late status showing a probability for delay."><figcaption><p>Order Status page with trending late status showing a probability for delay.</p></figcaption></figure>

### Key Benefits

Displaying a trending late status on your <code class="expression">space.vars.Product\_OrderStatus</code> increases transparency around potential delivery delays to customers. This can reduce WISMO inquiries and relieve customer service teams from these requests. &#x20;

The trending late status is also visible in the <code class="expression">space.vars.Product\_App</code>, providing an opportunity for proactive communication to customers who are most likely to be affected by a delayed delivery. &#x20;

## Trending Late Status on the Order Status Page

A trending late status can be displayed on the <code class="expression">space.vars.Product\_OrderStatus</code> to indicate the likelihood of a delay for a tracking.

<figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FRZtXzlhlSB43lm7AdPW1%2FTrendingLateOrderStatusPage_OnTime%20highlighted.png?alt=media&#x26;token=6c2bb37b-3aae-41a0-8c68-13ae91c616e2" alt=""><figcaption></figcaption></figure>

When the trending late model is in use, one of the following statuses can be displayed for the tracking to predict whether or not it might be delayed:

* Tracking is predicted to be on time\
  ![Trending late status predicting timely delivery](https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FZcgaFdVcIRMKqas1MIOx%2FTLOSPComponent_OnTime.png?alt=media\&token=9df6c4e6-64fc-4107-b829-2ef0c9c90aec)
* Tracking might be delayed\
  ![Trending late status predicting a probability for delay](https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FCQkIMFNnEdZoWaTIUqki%2FTLOSPComponent_Warning.png?alt=media\&token=4ad9bb03-8829-414c-a176-06a25a5bf24d)
* Tracking is predicted to be delayed\
  ![Trending late status predicting a high probability for delay](https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FJL2FcCPxJOwAgweJ1nff%2FTLOSPComponent_Delayed.png?alt=media\&token=c5af3e71-0c62-4db7-b2f5-5caa95e0d08c)

Trending late statuses are deactivated by default in the Order Status plugin (that is: `show_trendingLate: false`).

You can activate the display of trending late statuses on the <code class="expression">space.vars.Product\_OrderStatus</code> using the `show_trendingLate` option in one of the following ways:

* In the URL query parameters via `show_trendingLate=true`
* In the JavaScript object via `show_trendingLate: true`

## Trending Late Status in Tracking Records

A trending late status can be shown in the tracking record details to indicate the likelihood of a delay for a tracking.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FLSKD9M2zGcXKpWKtmc3C%2FTLStatusInTrackingDetails.png?alt=media&#x26;token=2f83012e-59d1-4203-a7a3-74e032bc060e" alt=""><figcaption></figcaption></figure></div>

This status is also shown in the Events section of the tracking record on the Trackings page.

<figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FMGdqhzOo1QL9TcpTH9xO%2FTLStatusOnTrackingRecord.png?alt=media&#x26;token=26a4cd84-705c-4170-b09b-023c56ca7136" alt=""><figcaption></figcaption></figure>

When the trending late model is in use, one of the following statuses can be displayed for the tracking record to predict whether or not it might be delayed:

* Tracking is predicted to be on time

  <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FSwshIAFeypjamskVtUlQ%2FTLStatusOnTrackingRecord_OnTime.png?alt=media&#x26;token=9eeee805-cba2-4938-8add-6fee74ce1c69" alt="Trending late status on time" width="141"><figcaption></figcaption></figure></div>
* Tracking might be delayed

  <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fwg0Me7pYzgeIptC9MGi5%2FTLStatusOnTrackingRecord_Warning.png?alt=media&#x26;token=01358177-f77f-4e6e-87fd-a1913aee8ca3" alt="Trending late status delay warning" width="142"><figcaption></figcaption></figure></div>
* Tracking is predicted to be delayed

  <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FPApRslrwVsZYdtT2Niaq%2FTLStatusOnTrackingRecord_Delayed.png?alt=media&#x26;token=dc2c6819-908a-4785-a4d5-24041223dddb" alt="Trending late status delayed" width="142"><figcaption></figcaption></figure></div>

## Configuring the <code class="expression">space.vars.Product\_TrendingLate</code> Feature

This section describes the configuration required for <code class="expression">space.vars.Product\_TrendingLate</code>.

### Customer Requirements

For the feature to work, you need to do one of the following:&#x20;

* Send parcelLab an `announced_delivery_date`.&#x20;
* Use [Promise](https://docs.parcellab.com/docs/convert/promise) to generate a delivery date prediction and provide the service levels from your carriers.&#x20;

### Implementation Process

After confirming that the data requirements are met, parcelLab will activate the trending late model for your account.

{% hint style="info" %}
For further details on the scope and requirements of the trending late model, please contact your parcelLab representative.
{% endhint %}
